Skip to content

Commit

Permalink
Draw flags followup
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 1, 2022
1 parent 0c366d3 commit 931e243
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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];
Expand Down

0 comments on commit 931e243

Please sign in to comment.