From 931e24311686a0d4637985f376e9c45a17414d68 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 1 Apr 2022 04:57:41 -0500 Subject: [PATCH] Draw flags followup --- Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp index 822b73a44c..2a4909d921 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp @@ -210,11 +210,13 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const uint16_t x #endif #if HAS_HOTEND && HAS_HEATED_BED + float tc, tt; + bool c_draw, t_draw, i_draw, ta; const bool isBed = heater < 0; - bool c_draw, t_draw, i_draw; if (isBed) { - const float tc = thermalManager.degBed(), tt = thermalManager.degTargetBed(); - const bool ta = thermalManager.isHeatingBed(); + tc = thermalManager.degBed(); + tt = thermalManager.degTargetBed(); + ta = thermalManager.isHeatingBed(); c_draw = tc != old_bed_temp; t_draw = tt != old_bed_target; i_draw = ta != old_bed_on; @@ -223,8 +225,9 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const uint16_t x old_bed_on = ta; } else { - const float tc = thermalManager.degHotend(heater), tt = thermalManager.degTargetHotend(heater); - const bool ta = thermalManager.isHeatingHotend(heater); + tc = thermalManager.degHotend(heater); + tt = thermalManager.degTargetHotend(heater); + ta = thermalManager.isHeatingHotend(heater); c_draw = tc != old_temp[heater]; t_draw = tt != old_target[heater]; i_draw = ta != old_on[heater];