diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 4e36b726c8..ad8d9d36fd 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2605,14 +2605,13 @@ #define MAX_FANS 8 // Max supported fans #endif -#define _NOT_E_AUTO(N,F) (E##N##_AUTO_FAN_PIN != FAN##F##_PIN) -#define _HAS_FAN(F) (PIN_EXISTS(FAN##F) \ +#define _IS_E_AUTO(N,F) (PIN_EXISTS(E##N##_AUTO_FAN) && E##N##_AUTO_FAN_PIN == FAN##F##_PIN) +#define _HAS_FAN(F) (F < MAX_FANS && PIN_EXISTS(FAN##F) \ && CONTROLLER_FAN_PIN != FAN##F##_PIN \ - && _NOT_E_AUTO(0,F) && _NOT_E_AUTO(1,F) \ - && _NOT_E_AUTO(2,F) && _NOT_E_AUTO(3,F) \ - && _NOT_E_AUTO(4,F) && _NOT_E_AUTO(5,F) \ - && _NOT_E_AUTO(6,F) && _NOT_E_AUTO(7,F) \ - && F < MAX_FANS) + && !_IS_E_AUTO(0,F) && !_IS_E_AUTO(1,F) \ + && !_IS_E_AUTO(2,F) && !_IS_E_AUTO(3,F) \ + && !_IS_E_AUTO(4,F) && !_IS_E_AUTO(5,F) \ + && !_IS_E_AUTO(6,F) && !_IS_E_AUTO(7,F)) #if _HAS_FAN(0) #define HAS_FAN0 1 #endif diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index d90e4df5af..d4b4280671 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -38,7 +38,6 @@ #include "../../../module/planner.h" #include "../../../module/settings.h" #include "../../../libs/buzzer.h" -#include "../../../inc/Conditionals_post.h" //#define DEBUG_OUT 1 #include "../../../core/debug_out.h"