Skip to content

Commit

Permalink
use matching type
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Mar 15, 2023
1 parent 843db5c commit b1dea90
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
dwin_string.set('X' + axis);
DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black,
#if ENABLED(DWIN_MARLINUI_PORTRAIT)
x + (utf8_strlen(value) * 14 - 14) / 2, y + 2,
x + (utf8_strlen(value) * 14 - 14) / 2, y + 2
#else
x, y,
x, y
#endif
S(dwin_string.string())
, S(dwin_string.string())
);
}

Expand Down Expand Up @@ -188,7 +188,7 @@ 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;
celsius_float_t tc, tt;
bool c_draw, t_draw, i_draw, ta;
const bool isBed = heater < 0;
if (isBed) {
Expand All @@ -215,19 +215,19 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const uint16_t x
}
#elif HAS_HOTEND
constexpr bool isBed = false;
const float tc = thermalManager.degHotend(heater), tt = thermalManager.degTargetHotend(heater);
const celsius_float_t tc = thermalManager.degHotend(heater), tt = thermalManager.degTargetHotend(heater);
const uint8_t ta = thermalManager.isHeatingHotend(heater);
bool c_draw = tc != old_temp[heater], t_draw = tt != old_target[heater], i_draw = ta != old_on[heater];
old_temp[heater] = tc; old_target[heater] = tt; old_on[heater] = ta;
#elif HAS_HEATED_BED
constexpr bool isBed = true;
const float tc = thermalManager.degBed(), tt = thermalManager.degTargetBed();
const celsius_float_t tc = thermalManager.degBed(), tt = thermalManager.degTargetBed();
const uint8_t ta = thermalManager.isHeatingBed();
bool c_draw = tc != old_bed_temp, t_draw = tt != old_bed_target, i_draw = ta != old_bed_on;
old_bed_temp = tc; old_bed_target = tt; old_bed_on = ta;
#else
bool c_draw = false, t_draw = false, i_draw = false;
constexpr float tc = 0, tt = 0;
constexpr celsius_float_t tc = 0, tt = 0;
constexpr uint8_t ta = 0;
#endif

Expand Down

0 comments on commit b1dea90

Please sign in to comment.