BigTreeTech GTR V1.0 / Support 8 extruders, heaters, temp sensors, fans (#16595)
This commit is contained in:
committed by
Scott Lahteine
parent
0d166f9c7d
commit
248b7dfa59
@ -47,23 +47,38 @@ void GcodeSuite::M42() {
|
||||
|
||||
const pin_t pin = GET_PIN_MAP_PIN(pin_index);
|
||||
|
||||
#if FAN_COUNT > 0
|
||||
switch (pin) {
|
||||
#if HAS_FAN0
|
||||
case FAN0_PIN: thermalManager.fan_speed[0] = pin_status; return;
|
||||
#endif
|
||||
#if HAS_FAN1
|
||||
case FAN1_PIN: thermalManager.fan_speed[1] = pin_status; return;
|
||||
#endif
|
||||
#if HAS_FAN2
|
||||
case FAN2_PIN: thermalManager.fan_speed[2] = pin_status; return;
|
||||
#endif
|
||||
#if HAS_FAN3
|
||||
case FAN3_PIN: thermalManager.fan_speed[3] = pin_status; return;
|
||||
#endif
|
||||
#if HAS_FAN4
|
||||
case FAN4_PIN: thermalManager.fan_speed[4] = pin_status; return;
|
||||
#endif
|
||||
#if HAS_FAN5
|
||||
case FAN5_PIN: thermalManager.fan_speed[5] = pin_status; return;
|
||||
#endif
|
||||
#if HAS_FAN6
|
||||
case FAN6_PIN: thermalManager.fan_speed[6] = pin_status; return;
|
||||
#endif
|
||||
#if HAS_FAN7
|
||||
case FAN7_PIN: thermalManager.fan_speed[7] = pin_status; return;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!parser.boolval('I') && pin_is_protected(pin)) return protected_pin_err();
|
||||
|
||||
pinMode(pin, OUTPUT);
|
||||
extDigitalWrite(pin, pin_status);
|
||||
analogWrite(pin, pin_status);
|
||||
|
||||
#if FAN_COUNT > 0
|
||||
switch (pin) {
|
||||
#if HAS_FAN0
|
||||
case FAN0_PIN: thermalManager.fan_speed[0] = pin_status; break;
|
||||
#endif
|
||||
#if HAS_FAN1
|
||||
case FAN1_PIN: thermalManager.fan_speed[1] = pin_status; break;
|
||||
#endif
|
||||
#if HAS_FAN2
|
||||
case FAN2_PIN: thermalManager.fan_speed[2] = pin_status; break;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user