Browse Source

Duplicate fan speed in M106/7 IDEX Duplication Mode (#21208)

vanilla_fb_2.0.x
Kachidoki 4 years ago
committed by GitHub
parent
commit
969268166e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      Marlin/src/gcode/temp/M106_M107.cpp

12
Marlin/src/gcode/temp/M106_M107.cpp

@ -81,6 +81,9 @@ void GcodeSuite::M106() {
// Set speed, with constraint // Set speed, with constraint
thermalManager.set_fan_speed(pfan, speed); thermalManager.set_fan_speed(pfan, speed);
if (TERN0(DUAL_X_CARRIAGE, idex_is_duplicating())) // pfan == 0 when duplicating
thermalManager.set_fan_speed(1 - pfan, speed);
} }
} }
@ -88,8 +91,13 @@ void GcodeSuite::M106() {
* M107: Fan Off * M107: Fan Off
*/ */
void GcodeSuite::M107() { void GcodeSuite::M107() {
const uint8_t p = parser.byteval('P', _ALT_P); const uint8_t pfan = parser.byteval('P', _ALT_P);
thermalManager.set_fan_speed(p, 0); if (pfan < _CNT_P) {
thermalManager.set_fan_speed(pfan, 0);
if (TERN0(DUAL_X_CARRIAGE, idex_is_duplicating())) // pfan == 0 when duplicating
thermalManager.set_fan_speed(1 - pfan, 0);
}
} }
#endif // HAS_FAN #endif // HAS_FAN

Loading…
Cancel
Save