Browse Source

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

pull/1/head
Marcio Teixeira 6 years ago
committed by Scott Lahteine
parent
commit
f11c6d5d02
  1. 3
      Marlin/src/gcode/temperature/M106_M107.cpp

3
Marlin/src/gcode/temperature/M106_M107.cpp

@ -63,7 +63,8 @@ void GcodeSuite::M106() {
* M107: Fan Off
*/
void GcodeSuite::M107() {
thermalManager.set_fan_speed(parser.byteval('P', active_extruder), 0);
const uint8_t p = parser.byteval('P', MIN(active_extruder, FAN_COUNT - 1));
thermalManager.set_fan_speed(p, 0);
}
#endif // FAN_COUNT > 0

Loading…
Cancel
Save