Skip to content

Commit

Permalink
✨ REPORT_ADAPTIVE_FAN_SLOWING (MarlinFirmware#25537)
Browse files Browse the repository at this point in the history
  • Loading branch information
StevilKnevil authored and EvilGremlin committed Apr 8, 2023
1 parent d533d84 commit 22a6a9e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down
6 changes: 6 additions & 0 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion buildroot/tests/LPC1769
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ opt_set MOTHERBOARD BOARD_SMOOTHIEBOARD \
GRID_MAX_POINTS_X 16 \
NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 }, { 10, 10, 3 } }" \
NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 }, { 10, 20, 3 } }"
opt_enable TFTGLCD_PANEL_SPI SDSUPPORT ADAPTIVE_FAN_SLOWING TEMP_TUNING_MAINTAIN_FAN \
opt_enable TFTGLCD_PANEL_SPI SDSUPPORT ADAPTIVE_FAN_SLOWING REPORT_ADAPTIVE_FAN_SLOWING TEMP_TUNING_MAINTAIN_FAN \
MAX31865_SENSOR_OHMS_0 MAX31865_CALIBRATION_OHMS_0 \
MAG_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR G29_RETRY_AND_RECOVER Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BED_TRAMMING_USE_PROBE BED_TRAMMING_VERIFY_RAISED \
Expand Down

0 comments on commit 22a6a9e

Please sign in to comment.