diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 957b2db2ab..1c22df4d1e 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -136,7 +136,6 @@ hotend_info_t Temperature::temp_hotend[HOTENDS]; // = { 0 } #if ENABLED(PROBING_FANS_OFF) bool Temperature::fans_paused; // = false; - uint8_t Temperature::paused_fan_speed[FAN_COUNT]; // = { 0 } #endif #if ENABLED(ADAPTIVE_FAN_SLOWING) @@ -178,12 +177,13 @@ hotend_info_t Temperature::temp_hotend[HOTENDS]; // = { 0 } #if ENABLED(PROBING_FANS_OFF) void Temperature::set_fans_paused(const bool p) { + static uint8_t saved_fan_speed[FAN_COUNT]; // = { 0 } if (p != fans_paused) { fans_paused = p; if (p) - FANS_LOOP(x) { paused_fan_speed[x] = fan_speed[x]; fan_speed[x] = 0; } + FANS_LOOP(i) { saved_fan_speed[i] = fan_speed[i]; fan_speed[i] = 0; } else - FANS_LOOP(x) fan_speed[x] = paused_fan_speed[x]; + FANS_LOOP(i) fan_speed[i] = saved_fan_speed[i]; } } diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index b24f84fb58..3dadaf2b77 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -405,7 +405,6 @@ class Temperature { #if ENABLED(PROBING_FANS_OFF) static bool fans_paused; - static uint8_t paused_fan_speed[FAN_COUNT]; #endif static constexpr inline uint8_t fanPercent(const uint8_t speed) { return ui8_to_percent(speed); }