Skip to content

Commit

Permalink
move draw flags around
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 1, 2022
1 parent 54c85c1 commit 280cb90
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,18 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const uint16_t x
constexpr bool isBed = false;
const float tc = thermalManager.degHotend(heater), tt = thermalManager.degTargetHotend(heater);
const uint8_t ta = thermalManager.isHeatingHotend(heater);
const bool c_draw = tc != old_temp[heater], t_draw = tt != old_target[heater], i_draw = ta != old_on[heater];
#if HAS_HEATED_BED
old_temp[heater] = tc; old_target[heater] = tt; old_on[heater] = ta;
#endif
#elif HAS_HEATED_BED
constexpr bool isBed = true;
const bool c_draw = tc != old_bed_temp, t_draw = tt != old_bed_target, i_draw = ta != old_bed_on;
const float tc = thermalManager.degBed(), tt = thermalManager.degTargetBed();
const uint8_t ta = thermalManager.isHeatingBed();
bool c_draw = tc != old_temp[heater], t_draw = tt != old_target[heater], i_draw = ta != old_on[heater];
const bool c_draw = tc != old_bed_temp, t_draw = tt != old_bed_target;
bool i_draw = ta != old_bed_on;
#if HAS_LEVELING
if (!idraw && planner.leveling_active != old_leveling_on) i_draw = true;
if (!i_draw && planner.leveling_active != old_leveling_on) i_draw = true;
old_leveling_on = tl;
#endif
old_bed_temp = tc; old_bed_target = tt; old_bed_on = ta;
Expand Down

0 comments on commit 280cb90

Please sign in to comment.