Browse Source

Fix probe fan compiling error (#13930)

Ludy 6 years ago
parent
commit
a504366138

+ 1
- 1
Marlin/src/gcode/control/M80_M81.cpp View File

97
     thermalManager.zero_fan_speeds();
97
     thermalManager.zero_fan_speeds();
98
     #if ENABLED(PROBING_FANS_OFF)
98
     #if ENABLED(PROBING_FANS_OFF)
99
       thermalManager.fans_paused = false;
99
       thermalManager.fans_paused = false;
100
-      ZERO(thermalManager.paused_fan_speed);
100
+      ZERO(thermalManager.saved_fan_speed);
101
     #endif
101
     #endif
102
   #endif
102
   #endif
103
 
103
 

+ 2
- 2
Marlin/src/module/temperature.cpp View File

138
 
138
 
139
   #endif
139
   #endif
140
 
140
 
141
-  #if ENABLED(PROBING_FANS_OFF)
141
+  #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE)
142
     bool Temperature::fans_paused; // = false;
142
     bool Temperature::fans_paused; // = false;
143
+    uint8_t Temperature::saved_fan_speed[FAN_COUNT]; // = { 0 }
143
   #endif
144
   #endif
144
 
145
 
145
   #if ENABLED(ADAPTIVE_FAN_SLOWING)
146
   #if ENABLED(ADAPTIVE_FAN_SLOWING)
181
   #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE)
182
   #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE)
182
 
183
 
183
     void Temperature::set_fans_paused(const bool p) {
184
     void Temperature::set_fans_paused(const bool p) {
184
-      static uint8_t saved_fan_speed[FAN_COUNT]; // = { 0 }
185
       if (p != fans_paused) {
185
       if (p != fans_paused) {
186
         fans_paused = p;
186
         fans_paused = p;
187
         if (p)
187
         if (p)

+ 2
- 1
Marlin/src/module/temperature.h View File

459
 
459
 
460
       static void set_fan_speed(const uint8_t target, const uint16_t speed);
460
       static void set_fan_speed(const uint8_t target, const uint16_t speed);
461
 
461
 
462
-      #if ENABLED(PROBING_FANS_OFF)
462
+      #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE)
463
         static bool fans_paused;
463
         static bool fans_paused;
464
+        static uint8_t saved_fan_speed[FAN_COUNT];
464
       #endif
465
       #endif
465
 
466
 
466
       static constexpr inline uint8_t fanPercent(const uint8_t speed) { return ui8_to_percent(speed); }
467
       static constexpr inline uint8_t fanPercent(const uint8_t speed) { return ui8_to_percent(speed); }

Loading…
Cancel
Save