Skip to content

Commit 11689ea

Browse files
committed
HD44780
1 parent 00e897c commit 11689ea

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Marlin/src/lcd/HD44780/marlinui_HD44780.cpp

+12-2
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
537537
*/
538538
FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char prefix, const bool blink) {
539539
#if HAS_HEATED_BED
540-
const bool isBed = TERN(HAS_HEATED_CHAMBER, heater_id == H_BED, heater_id < 0);
540+
const bool isBed = heater_id == H_BED;
541541
const celsius_t t1 = (isBed ? thermalManager.wholeDegBed() : thermalManager.wholeDegHotend(heater_id)),
542542
t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id));
543543
#else
@@ -546,7 +546,17 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char pr
546546

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

549-
lcd_put_u8str(t1 < 0 ? "err" : i16tostr3rj(t1));
549+
if (t1 < 0) {
550+
#if DISABLED(SHOW_TEMPERATURE_ERROR_BELOW_ZERO)
551+
lcd_put_u8str(F("err"));
552+
#else
553+
char * const str = i16tostr3rj(t1);
554+
lcd_put_u8str(&str[1]);
555+
#endif
556+
}
557+
else
558+
lcd_put_u8str(ui16tostr3rj(t1));
559+
550560
lcd_put_u8str(F("/"));
551561

552562
#if !HEATER_IDLE_HANDLER

0 commit comments

Comments
 (0)