|
@ -55,30 +55,24 @@ void ControllerFan::update() { |
|
|
#define MOTOR_IS_ON(A,B) (A##_ENABLE_READ() == bool(B##_ENABLE_ON)) |
|
|
#define MOTOR_IS_ON(A,B) (A##_ENABLE_READ() == bool(B##_ENABLE_ON)) |
|
|
#define _OR_ENABLED_E(N) || MOTOR_IS_ON(E##N,E) |
|
|
#define _OR_ENABLED_E(N) || MOTOR_IS_ON(E##N,E) |
|
|
|
|
|
|
|
|
const bool motor_on = MOTOR_IS_ON(Z,Z) |
|
|
const bool motor_on = ( |
|
|
#if HAS_Z2_ENABLE |
|
|
( DISABLED(CONTROLLER_FAN_IGNORE_Z) && |
|
|
|| MOTOR_IS_ON(Z2,Z) |
|
|
( MOTOR_IS_ON(Z,Z) |
|
|
#endif |
|
|
|| TERN0(HAS_Z2_ENABLE, MOTOR_IS_ON(Z2,Z)) |
|
|
#if HAS_Z3_ENABLE |
|
|
|| TERN0(HAS_Z3_ENABLE, MOTOR_IS_ON(Z3,Z)) |
|
|
|| MOTOR_IS_ON(Z3,Z) |
|
|
|| TERN0(HAS_Z4_ENABLE, MOTOR_IS_ON(Z4,Z)) |
|
|
#endif |
|
|
) |
|
|
#if HAS_Z4_ENABLE |
|
|
) || ( |
|
|
|| MOTOR_IS_ON(Z4,Z) |
|
|
DISABLED(CONTROLLER_FAN_USE_Z_ONLY) && |
|
|
#endif |
|
|
( MOTOR_IS_ON(X,X) || MOTOR_IS_ON(Y,Y) |
|
|
|| (DISABLED(CONTROLLER_FAN_USE_Z_ONLY) && ( |
|
|
|| TERN0(HAS_X2_ENABLE, MOTOR_IS_ON(X2,X)) |
|
|
MOTOR_IS_ON(X,X) || MOTOR_IS_ON(Y,Y) |
|
|
|| TERN0(HAS_Y2_ENABLE, MOTOR_IS_ON(Y2,Y)) |
|
|
#if HAS_X2_ENABLE |
|
|
|
|
|
|| MOTOR_IS_ON(X2,X) |
|
|
|
|
|
#endif |
|
|
|
|
|
#if HAS_Y2_ENABLE |
|
|
|
|
|
|| MOTOR_IS_ON(Y2,Y) |
|
|
|
|
|
#endif |
|
|
|
|
|
#if E_STEPPERS |
|
|
#if E_STEPPERS |
|
|
REPEAT(E_STEPPERS, _OR_ENABLED_E) |
|
|
REPEAT(E_STEPPERS, _OR_ENABLED_E) |
|
|
#endif |
|
|
#endif |
|
|
) |
|
|
) |
|
|
) |
|
|
) |
|
|
; |
|
|
); |
|
|
|
|
|
|
|
|
// If any of the drivers or the heated bed are enabled...
|
|
|
// If any of the drivers or the heated bed are enabled...
|
|
|
if (motor_on || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0)) |
|
|
if (motor_on || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0)) |
|
|