From f50603ff1d380f759addffd2e54ac008ebec5985 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 18 Mar 2023 01:22:50 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20More=20Inte?= =?UTF-8?q?lliSense-friendly=20declares?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/temperature.cpp | 16 ++++++++++++---- Marlin/src/module/temperature.h | 14 +++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index bc978077f0..bafade45dd 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -508,8 +508,12 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); // Init min and max temp with extreme values to prevent false errors during startup raw_adc_t Temperature::mintemp_raw_BED = TEMP_SENSOR_BED_RAW_LO_TEMP, Temperature::maxtemp_raw_BED = TEMP_SENSOR_BED_RAW_HI_TEMP; - TERN_(WATCH_BED, bed_watch_t Temperature::watch_bed); // = { 0 } - IF_DISABLED(PIDTEMPBED, millis_t Temperature::next_bed_check_ms); + #if WATCH_BED + bed_watch_t Temperature::watch_bed; // = { 0 } + #endif + #if DISABLED(PIDTEMPBED) + millis_t Temperature::next_bed_check_ms; + #endif #endif #if HAS_TEMP_CHAMBER @@ -519,8 +523,12 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); celsius_float_t old_temp = 9999; raw_adc_t Temperature::mintemp_raw_CHAMBER = TEMP_SENSOR_CHAMBER_RAW_LO_TEMP, Temperature::maxtemp_raw_CHAMBER = TEMP_SENSOR_CHAMBER_RAW_HI_TEMP; - TERN_(WATCH_CHAMBER, chamber_watch_t Temperature::watch_chamber{0}); - IF_DISABLED(PIDTEMPCHAMBER, millis_t Temperature::next_chamber_check_ms); + #if WATCH_CHAMBER + chamber_watch_t Temperature::watch_chamber; // = { 0 } + #endif + #if DISABLED(PIDTEMPCHAMBER) + millis_t Temperature::next_chamber_check_ms; + #endif #endif #endif diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 4178973a9d..b8bf03bf31 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -725,23 +725,27 @@ class Temperature { #endif #if HAS_HEATED_BED - #if ENABLED(WATCH_BED) + #if WATCH_BED static bed_watch_t watch_bed; #endif - IF_DISABLED(PIDTEMPBED, static millis_t next_bed_check_ms); + #if DISABLED(PIDTEMPBED) + static millis_t next_bed_check_ms; + #endif static raw_adc_t mintemp_raw_BED, maxtemp_raw_BED; #endif #if HAS_HEATED_CHAMBER - #if ENABLED(WATCH_CHAMBER) + #if WATCH_CHAMBER static chamber_watch_t watch_chamber; #endif - TERN(PIDTEMPCHAMBER,,static millis_t next_chamber_check_ms); + #if DISABLED(PIDTEMPCHAMBER) + static millis_t next_chamber_check_ms; + #endif static raw_adc_t mintemp_raw_CHAMBER, maxtemp_raw_CHAMBER; #endif #if HAS_COOLER - #if ENABLED(WATCH_COOLER) + #if WATCH_COOLER static cooler_watch_t watch_cooler; #endif static millis_t next_cooler_check_ms, cooler_fan_flush_ms;