Skip to content
Snippets Groups Projects
Commit f11c6d5d authored by Marcio Teixeira's avatar Marcio Teixeira Committed by Scott Lahteine
Browse files

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

parent 64a46492
Branches
Tags
No related merge requests found
...@@ -63,7 +63,8 @@ void GcodeSuite::M106() { ...@@ -63,7 +63,8 @@ void GcodeSuite::M106() {
* M107: Fan Off * M107: Fan Off
*/ */
void GcodeSuite::M107() { 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 #endif // FAN_COUNT > 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment