Add typedef celsius_t (#21374)
This commit is contained in:
@ -434,33 +434,32 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char *p
|
||||
uint8_t pic_hot_bits;
|
||||
#if HAS_HEATED_BED
|
||||
const bool isBed = heater_id < 0;
|
||||
const float t1 = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater_id));
|
||||
const float t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id));
|
||||
const celsius_t t1 = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater_id)),
|
||||
t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id));
|
||||
#else
|
||||
const float t1 = thermalManager.degHotend(heater_id);
|
||||
const float t2 = thermalManager.degTargetHotend(heater_id);
|
||||
const celsius_t t1 = thermalManager.degHotend(heater_id), t2 = thermalManager.degTargetHotend(heater_id);
|
||||
#endif
|
||||
|
||||
#if HOTENDS < 2
|
||||
if (heater_id == H_E0) {
|
||||
lcd.setCursor(2, 5); lcd.print(prefix); //HE
|
||||
lcd.setCursor(1, 6); lcd.print(i16tostr3rj(t1 + 0.5));
|
||||
lcd.setCursor(1, 6); lcd.print(i16tostr3rj(t1));
|
||||
lcd.setCursor(1, 7);
|
||||
}
|
||||
else {
|
||||
lcd.setCursor(6, 5); lcd.print(prefix); //BED
|
||||
lcd.setCursor(6, 6); lcd.print(i16tostr3rj(t1 + 0.5));
|
||||
lcd.setCursor(6, 6); lcd.print(i16tostr3rj(t1));
|
||||
lcd.setCursor(6, 7);
|
||||
}
|
||||
#else
|
||||
if (heater_id > H_BED) {
|
||||
lcd.setCursor(heater_id * 4, 5); lcd.print(prefix); //HE1 or HE2 or HE3
|
||||
lcd.setCursor(heater_id * 4, 6); lcd.print(i16tostr3rj(t1 + 0.5));
|
||||
lcd.setCursor(heater_id * 4, 5); lcd.print(prefix); // HE1 or HE2 or HE3
|
||||
lcd.setCursor(heater_id * 4, 6); lcd.print(i16tostr3rj(t1));
|
||||
lcd.setCursor(heater_id * 4, 7);
|
||||
}
|
||||
else {
|
||||
lcd.setCursor(13, 5); lcd.print(prefix); //BED
|
||||
lcd.setCursor(13, 6); lcd.print(i16tostr3rj(t1 + 0.5));
|
||||
lcd.setCursor(13, 6); lcd.print(i16tostr3rj(t1));
|
||||
lcd.setCursor(13, 7);
|
||||
}
|
||||
#endif // HOTENDS <= 1
|
||||
@ -475,7 +474,7 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char *p
|
||||
}
|
||||
else
|
||||
#endif // !HEATER_IDLE_HANDLER
|
||||
lcd.print(i16tostr3rj(t2 + 0.5));
|
||||
lcd.print(i16tostr3rj(t2));
|
||||
|
||||
switch (heater_id) {
|
||||
case H_BED: pic_hot_bits = ICON_BED; break;
|
||||
|
Reference in New Issue
Block a user