Przeglądaj źródła

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

Marcio Teixeira 6 lat temu
rodzic
commit
f11c6d5d02
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2
    1
      Marlin/src/gcode/temperature/M106_M107.cpp

+ 2
- 1
Marlin/src/gcode/temperature/M106_M107.cpp Wyświetl plik

@@ -63,7 +63,8 @@ void GcodeSuite::M106() {
63 63
  * M107: Fan Off
64 64
  */
65 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 70
 #endif // FAN_COUNT > 0

Ładowanie…
Anuluj
Zapisz