Add CONTROLLER_FAN_IGNORE_Z (#18735)

This commit is contained in:
InsanityAutomation
2020-07-23 22:27:40 -04:00
committed by GitHub
parent 9156c32a54
commit 2c61e6ba28
5 changed files with 23 additions and 22 deletions

View File

@ -55,30 +55,24 @@ void ControllerFan::update() {
#define MOTOR_IS_ON(A,B) (A##_ENABLE_READ() == bool(B##_ENABLE_ON))
#define _OR_ENABLED_E(N) || MOTOR_IS_ON(E##N,E)
const bool motor_on = MOTOR_IS_ON(Z,Z)
#if HAS_Z2_ENABLE
|| MOTOR_IS_ON(Z2,Z)
#endif
#if HAS_Z3_ENABLE
|| MOTOR_IS_ON(Z3,Z)
#endif
#if HAS_Z4_ENABLE
|| MOTOR_IS_ON(Z4,Z)
#endif
|| (DISABLED(CONTROLLER_FAN_USE_Z_ONLY) && (
MOTOR_IS_ON(X,X) || MOTOR_IS_ON(Y,Y)
#if HAS_X2_ENABLE
|| MOTOR_IS_ON(X2,X)
#endif
#if HAS_Y2_ENABLE
|| MOTOR_IS_ON(Y2,Y)
#endif
const bool motor_on = (
( DISABLED(CONTROLLER_FAN_IGNORE_Z) &&
( MOTOR_IS_ON(Z,Z)
|| TERN0(HAS_Z2_ENABLE, MOTOR_IS_ON(Z2,Z))
|| TERN0(HAS_Z3_ENABLE, MOTOR_IS_ON(Z3,Z))
|| TERN0(HAS_Z4_ENABLE, MOTOR_IS_ON(Z4,Z))
)
) || (
DISABLED(CONTROLLER_FAN_USE_Z_ONLY) &&
( MOTOR_IS_ON(X,X) || MOTOR_IS_ON(Y,Y)
|| TERN0(HAS_X2_ENABLE, MOTOR_IS_ON(X2,X))
|| TERN0(HAS_Y2_ENABLE, MOTOR_IS_ON(Y2,Y))
#if E_STEPPERS
REPEAT(E_STEPPERS, _OR_ENABLED_E)
#endif
)
)
;
);
// 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))

View File

@ -466,7 +466,7 @@ void MMU2::check_version() {
}
}
static bool mmu2_not_responding() {
static void mmu2_not_responding() {
LCD_MESSAGEPGM(MSG_MMU2_NOT_RESPONDING);
BUZZ(100, 659);
BUZZ(200, 698);

View File

@ -197,6 +197,10 @@
#endif
#endif
#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN EX2_FAN_PIN
#endif
//
// Misc. Functions
//