Skip to content

Commit 931e243

Browse files
committed
Draw flags followup
1 parent 0c366d3 commit 931e243

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp

+8-5
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,13 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const uint16_t x
210210
#endif
211211

212212
#if HAS_HOTEND && HAS_HEATED_BED
213+
float tc, tt;
214+
bool c_draw, t_draw, i_draw, ta;
213215
const bool isBed = heater < 0;
214-
bool c_draw, t_draw, i_draw;
215216
if (isBed) {
216-
const float tc = thermalManager.degBed(), tt = thermalManager.degTargetBed();
217-
const bool ta = thermalManager.isHeatingBed();
217+
tc = thermalManager.degBed();
218+
tt = thermalManager.degTargetBed();
219+
ta = thermalManager.isHeatingBed();
218220
c_draw = tc != old_bed_temp;
219221
t_draw = tt != old_bed_target;
220222
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
223225
old_bed_on = ta;
224226
}
225227
else {
226-
const float tc = thermalManager.degHotend(heater), tt = thermalManager.degTargetHotend(heater);
227-
const bool ta = thermalManager.isHeatingHotend(heater);
228+
tc = thermalManager.degHotend(heater);
229+
tt = thermalManager.degTargetHotend(heater);
230+
ta = thermalManager.isHeatingHotend(heater);
228231
c_draw = tc != old_temp[heater];
229232
t_draw = tt != old_target[heater];
230233
i_draw = ta != old_on[heater];

0 commit comments

Comments
 (0)