Show bedlevel with Bed temp indicator
…and display a third extruder on character display
This commit is contained in:
parent
f9b7659b56
commit
85ca7fed93
@ -632,7 +632,11 @@ FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
FORCE_INLINE void _draw_heater_status(const int8_t heater, const char prefix, const bool blink) {
|
FORCE_INLINE void _draw_heater_status(const int8_t heater, const char prefix, const bool blink) {
|
||||||
|
#if TEMP_SENSOR_BED
|
||||||
const bool isBed = heater < 0;
|
const bool isBed = heater < 0;
|
||||||
|
#else
|
||||||
|
constexpr bool isBed = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
const float t1 = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)),
|
const float t1 = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)),
|
||||||
t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater));
|
t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater));
|
||||||
@ -732,7 +736,7 @@ static void lcd_implementation_status_screen() {
|
|||||||
//
|
//
|
||||||
// Hotend 1 or Bed Temperature
|
// Hotend 1 or Bed Temperature
|
||||||
//
|
//
|
||||||
#if HOTENDS > 1 || TEMP_SENSOR_BED != 0
|
#if HOTENDS > 1 || TEMP_SENSOR_BED
|
||||||
|
|
||||||
lcd.setCursor(8, 0);
|
lcd.setCursor(8, 0);
|
||||||
#if HOTENDS > 1
|
#if HOTENDS > 1
|
||||||
@ -743,7 +747,7 @@ static void lcd_implementation_status_screen() {
|
|||||||
_draw_heater_status(-1, -1, blink);
|
_draw_heater_status(-1, -1, blink);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0
|
#endif // HOTENDS > 1 || TEMP_SENSOR_BED
|
||||||
|
|
||||||
#else // LCD_WIDTH >= 20
|
#else // LCD_WIDTH >= 20
|
||||||
|
|
||||||
@ -755,12 +759,17 @@ static void lcd_implementation_status_screen() {
|
|||||||
//
|
//
|
||||||
// Hotend 1 or Bed Temperature
|
// Hotend 1 or Bed Temperature
|
||||||
//
|
//
|
||||||
#if HOTENDS > 1 || TEMP_SENSOR_BED != 0
|
#if HOTENDS > 1 || TEMP_SENSOR_BED
|
||||||
lcd.setCursor(10, 0);
|
lcd.setCursor(10, 0);
|
||||||
#if HOTENDS > 1
|
#if HOTENDS > 1
|
||||||
_draw_heater_status(1, LCD_STR_THERMOMETER[0], blink);
|
_draw_heater_status(1, LCD_STR_THERMOMETER[0], blink);
|
||||||
#else
|
#else
|
||||||
_draw_heater_status(-1, LCD_BEDTEMP_CHAR, blink);
|
_draw_heater_status(-1, (
|
||||||
|
#if HAS_LEVELING
|
||||||
|
planner.leveling_active && blink ? '_' :
|
||||||
|
#endif
|
||||||
|
LCD_BEDTEMP_CHAR
|
||||||
|
), blink);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0
|
#endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0
|
||||||
@ -789,14 +798,25 @@ static void lcd_implementation_status_screen() {
|
|||||||
|
|
||||||
lcd.setCursor(0, 1);
|
lcd.setCursor(0, 1);
|
||||||
|
|
||||||
#if HOTENDS > 1 && TEMP_SENSOR_BED != 0
|
// If the first line has two extruder temps,
|
||||||
|
// show more temperatures on the next line
|
||||||
|
// instead of
|
||||||
|
|
||||||
// If we both have a 2nd extruder and a heated bed,
|
#if HOTENDS > 2 || (HOTENDS > 1 && TEMP_SENSOR_BED)
|
||||||
// show the heated bed temp on the left,
|
|
||||||
// since the first line is filled with extruder temps
|
|
||||||
_draw_heater_status(-1, LCD_BEDTEMP_CHAR, blink);
|
|
||||||
|
|
||||||
#else
|
#if HOTENDS > 2
|
||||||
|
_draw_heater_status(2, LCD_STR_THERMOMETER[0], blink);
|
||||||
|
lcd.setCursor(10, 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
_draw_heater_status(-1, (
|
||||||
|
#if HAS_LEVELING
|
||||||
|
planner.leveling_active && blink ? '_' :
|
||||||
|
#endif
|
||||||
|
LCD_BEDTEMP_CHAR
|
||||||
|
), blink);
|
||||||
|
|
||||||
|
#else // HOTENDS <= 2 && (HOTENDS <= 1 || !TEMP_SENSOR_BED)
|
||||||
// Before homing the axis letters are blinking 'X' <-> '?'.
|
// Before homing the axis letters are blinking 'X' <-> '?'.
|
||||||
// When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '.
|
// When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '.
|
||||||
// When everything is ok you see a constant 'X'.
|
// When everything is ok you see a constant 'X'.
|
||||||
@ -809,7 +829,7 @@ static void lcd_implementation_status_screen() {
|
|||||||
_draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink);
|
_draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink);
|
||||||
lcd.print(ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])));
|
lcd.print(ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])));
|
||||||
|
|
||||||
#endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0
|
#endif // HOTENDS <= 2 && (HOTENDS <= 1 || !TEMP_SENSOR_BED)
|
||||||
|
|
||||||
#endif // LCD_WIDTH >= 20
|
#endif // LCD_WIDTH >= 20
|
||||||
|
|
||||||
@ -817,7 +837,7 @@ static void lcd_implementation_status_screen() {
|
|||||||
_draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink);
|
_draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink);
|
||||||
lcd.print(ftostr52sp(FIXFLOAT(current_position[Z_AXIS])));
|
lcd.print(ftostr52sp(FIXFLOAT(current_position[Z_AXIS])));
|
||||||
|
|
||||||
#if HAS_LEVELING
|
#if HAS_LEVELING && !TEMP_SENSOR_BED
|
||||||
lcd.write(planner.leveling_active || blink ? '_' : ' ');
|
lcd.write(planner.leveling_active || blink ? '_' : ' ');
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user