Browse Source

Fix M107 when dual-nozzles share fan (#12819) (#12909)

Marcio Teixeira 6 years ago
parent
commit
f11c6d5d02
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      Marlin/src/gcode/temperature/M106_M107.cpp

+ 2
- 1
Marlin/src/gcode/temperature/M106_M107.cpp View File

63
  * M107: Fan Off
63
  * M107: Fan Off
64
  */
64
  */
65
 void GcodeSuite::M107() {
65
 void GcodeSuite::M107() {
66
-  thermalManager.set_fan_speed(parser.byteval('P', active_extruder), 0);
66
+  const uint8_t p = parser.byteval('P', MIN(active_extruder, FAN_COUNT - 1));
67
+  thermalManager.set_fan_speed(p, 0);
67
 }
68
 }
68
 
69
 
69
 #endif // FAN_COUNT > 0
70
 #endif // FAN_COUNT > 0

Loading…
Cancel
Save