From 141cfdde2cfa1691f9af16051bb213cb47430ca1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 13 Apr 2023 04:05:56 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20AUTOFAN=5FCASE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25554 --- Marlin/src/module/temperature.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index ffe3dcc03d..150c51927b 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1262,8 +1262,9 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { #else #define _AUTOFAN_SPEED() EXTRUDER_AUTO_FAN_SPEED #endif - #define _AUTOFAN_CASE(N) case N: _UPDATE_AUTO_FAN(E##N, fan_on, _AUTOFAN_SPEED()); break - #define AUTOFAN_CASE(N) OPTCODE(HAS_AUTO_FAN_##N, _AUTOFAN_CASE(N)) + #define _AUTOFAN_CASE(N) case N: _UPDATE_AUTO_FAN(E##N, fan_on, _AUTOFAN_SPEED()); break; + #define _AUTOFAN_NOT(N) + #define AUTOFAN_CASE(N) TERN(HAS_AUTO_FAN_##N, _AUTOFAN_CASE, _AUTOFAN_NOT)(N) switch (f) { REPEAT(8, AUTOFAN_CASE)