REPORT_ADAPTIVE_FAN_SLOWING (#25537)

This commit is contained in:
StevilKnevil
2023-03-19 00:57:34 +00:00
committed by GitHub
parent 432aeeefe3
commit 7e25e87807
3 changed files with 13 additions and 4 deletions

View File

@@ -303,9 +303,12 @@
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
#if ENABLED(ADAPTIVE_FAN_SLOWING) && EITHER(MPCTEMP, PIDTEMP)
//#define TEMP_TUNING_MAINTAIN_FAN // Don't slow fan speed during M303 or M306 T
//#define ADAPTIVE_FAN_SLOWING // Slow down the part-cooling fan if the temperature drops
#if ENABLED(ADAPTIVE_FAN_SLOWING)
//#define REPORT_ADAPTIVE_FAN_SLOWING // Report fan slowing activity to the console
#if EITHER(MPCTEMP, PIDTEMP)
//#define TEMP_TUNING_MAINTAIN_FAN // Don't slow down the fan speed during M303 or M306 T
#endif
#endif
/**

View File

@@ -2976,6 +2976,12 @@ void Temperature::init() {
else
scale = 0;
if (TERN0(REPORT_ADAPTIVE_FAN_SLOWING, DEBUGGING(INFO))) {
const uint8_t fss7 = fan_speed_scaler[fan_index] & 0x80;
if (fss7 ^ (scale & 0x80))
serial_ternary(fss7, F("Adaptive Fan Slowing "), nullptr, F("de"), F("activated.\n"));
}
fan_speed_scaler[fan_index] = scale;
}
#endif // ADAPTIVE_FAN_SLOWING