|
@@ -55,30 +55,24 @@ void ControllerFan::update() {
|
55
|
55
|
#define MOTOR_IS_ON(A,B) (A##_ENABLE_READ() == bool(B##_ENABLE_ON))
|
56
|
56
|
#define _OR_ENABLED_E(N) || MOTOR_IS_ON(E##N,E)
|
57
|
57
|
|
58
|
|
- const bool motor_on = MOTOR_IS_ON(Z,Z)
|
59
|
|
- #if HAS_Z2_ENABLE
|
60
|
|
- || MOTOR_IS_ON(Z2,Z)
|
61
|
|
- #endif
|
62
|
|
- #if HAS_Z3_ENABLE
|
63
|
|
- || MOTOR_IS_ON(Z3,Z)
|
64
|
|
- #endif
|
65
|
|
- #if HAS_Z4_ENABLE
|
66
|
|
- || MOTOR_IS_ON(Z4,Z)
|
67
|
|
- #endif
|
68
|
|
- || (DISABLED(CONTROLLER_FAN_USE_Z_ONLY) && (
|
69
|
|
- MOTOR_IS_ON(X,X) || MOTOR_IS_ON(Y,Y)
|
70
|
|
- #if HAS_X2_ENABLE
|
71
|
|
- || MOTOR_IS_ON(X2,X)
|
72
|
|
- #endif
|
73
|
|
- #if HAS_Y2_ENABLE
|
74
|
|
- || MOTOR_IS_ON(Y2,Y)
|
75
|
|
- #endif
|
|
58
|
+ const bool motor_on = (
|
|
59
|
+ ( DISABLED(CONTROLLER_FAN_IGNORE_Z) &&
|
|
60
|
+ ( MOTOR_IS_ON(Z,Z)
|
|
61
|
+ || TERN0(HAS_Z2_ENABLE, MOTOR_IS_ON(Z2,Z))
|
|
62
|
+ || TERN0(HAS_Z3_ENABLE, MOTOR_IS_ON(Z3,Z))
|
|
63
|
+ || TERN0(HAS_Z4_ENABLE, MOTOR_IS_ON(Z4,Z))
|
|
64
|
+ )
|
|
65
|
+ ) || (
|
|
66
|
+ DISABLED(CONTROLLER_FAN_USE_Z_ONLY) &&
|
|
67
|
+ ( MOTOR_IS_ON(X,X) || MOTOR_IS_ON(Y,Y)
|
|
68
|
+ || TERN0(HAS_X2_ENABLE, MOTOR_IS_ON(X2,X))
|
|
69
|
+ || TERN0(HAS_Y2_ENABLE, MOTOR_IS_ON(Y2,Y))
|
76
|
70
|
#if E_STEPPERS
|
77
|
71
|
REPEAT(E_STEPPERS, _OR_ENABLED_E)
|
78
|
72
|
#endif
|
79
|
73
|
)
|
80
|
74
|
)
|
81
|
|
- ;
|
|
75
|
+ );
|
82
|
76
|
|
83
|
77
|
// If any of the drivers or the heated bed are enabled...
|
84
|
78
|
if (motor_on || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0))
|