Skip to content

Commit

Permalink
HD44780
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Feb 3, 2023
1 parent 29436cb commit c40132d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Marlin/src/lcd/HD44780/marlinui_HD44780.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
*/
FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char prefix, const bool blink) {
#if HAS_HEATED_BED
const bool isBed = TERN(HAS_HEATED_CHAMBER, heater_id == H_BED, heater_id < 0);
const bool isBed = heater_id == H_BED;
const celsius_t t1 = (isBed ? thermalManager.wholeDegBed() : thermalManager.wholeDegHotend(heater_id)),
t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id));
#else
Expand All @@ -546,7 +546,17 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char pr

if (prefix >= 0) lcd_put_lchar(prefix);

lcd_put_u8str(t1 < 0 ? "err" : i16tostr3rj(t1));
if (t1 < 0) {
#if DISABLED(SHOW_TEMPERATURE_ERROR_BELOW_ZERO)
lcd_put_u8str(F("err"));
#else
char * const str = i16tostr3rj(t1);
lcd_put_u8str(&str[1]);
#endif
}
else
lcd_put_u8str(ui16tostr3rj(t1));

lcd_put_u8str(F("/"));

#if !HEATER_IDLE_HANDLER
Expand Down

0 comments on commit c40132d

Please sign in to comment.