Parcourir la source

M600: Fix bug where fan is not turned off

The firmware saves the current fanspeed before parking,
and the fanspeed is restored after unparking. The problem is the fan
was never actually paused.

Fixes #3670
Guðni Már Gilbert il y a 2 ans
Parent
commit
c86c961d4e
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      Firmware/Marlin_main.cpp

+ 3 - 0
Firmware/Marlin_main.cpp

@@ -3538,6 +3538,9 @@ static void gcode_M600(bool automatic, float x_position, float y_position, float
 
 
     memcpy(lastpos, current_position, sizeof(lastpos));
     memcpy(lastpos, current_position, sizeof(lastpos));
 
 
+    // Turn off the fan
+    fanSpeed = 0;
+
     // Retract E
     // Retract E
     current_position[E_AXIS] += e_shift;
     current_position[E_AXIS] += e_shift;
     plan_buffer_line_curposXYZE(FILAMENTCHANGE_RFEED);
     plan_buffer_line_curposXYZE(FILAMENTCHANGE_RFEED);