|
|
@ -299,7 +299,7 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const bool blin |
|
|
|
//
|
|
|
|
FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink) { |
|
|
|
const uint8_t offs = (XYZ_SPACING) * axis; |
|
|
|
lcd_put_wchar(X_LABEL_POS + offs, XYZ_BASELINE, 'X' + axis); |
|
|
|
lcd_put_wchar(X_LABEL_POS + offs, XYZ_BASELINE, axis_codes[axis]); |
|
|
|
lcd_moveto(X_VALUE_POS + offs, XYZ_BASELINE); |
|
|
|
if (blink) |
|
|
|
lcd_put_u8str(value); |
|
|
@ -328,7 +328,11 @@ void MarlinUI::draw_status_screen() { |
|
|
|
if (first_page) count_renders++; |
|
|
|
#endif |
|
|
|
|
|
|
|
static char xstring[5], ystring[5], zstring[8]; |
|
|
|
static char xstring[5 |
|
|
|
#if ENABLED(LCD_SHOW_E_TOTAL) |
|
|
|
+ 7 |
|
|
|
#endif |
|
|
|
], ystring[5], zstring[8]; |
|
|
|
#if ENABLED(FILAMENT_LCD_DISPLAY) |
|
|
|
static char wstring[5], mstring[4]; |
|
|
|
#endif |
|
|
@ -373,7 +377,19 @@ void MarlinUI::draw_status_screen() { |
|
|
|
heat_bits = new_bits; |
|
|
|
#endif |
|
|
|
const xyz_pos_t lpos = current_position.asLogical(); |
|
|
|
const bool showxy = (true |
|
|
|
#if ENABLED(LCD_SHOW_E_TOTAL) |
|
|
|
&& !printingIsActive() |
|
|
|
#endif |
|
|
|
); |
|
|
|
if (showxy) |
|
|
|
strcpy(xstring, ftostr4sign(lpos.x)); |
|
|
|
else { |
|
|
|
#if ENABLED(LCD_SHOW_E_TOTAL) |
|
|
|
const uint8_t escale = e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm
|
|
|
|
sprintf_P(xstring, PSTR("%ld%cm"), uint32_t(_MAX(e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm
|
|
|
|
#endif |
|
|
|
} |
|
|
|
strcpy(ystring, ftostr4sign(lpos.y)); |
|
|
|
strcpy(zstring, ftostr52sp( lpos.z)); |
|
|
|
#if ENABLED(FILAMENT_LCD_DISPLAY) |
|
|
@ -692,8 +708,14 @@ void MarlinUI::draw_status_screen() { |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
if (showxy) { |
|
|
|
_draw_axis_value(X_AXIS, xstring, blink); |
|
|
|
_draw_axis_value(Y_AXIS, ystring, blink); |
|
|
|
} |
|
|
|
else { |
|
|
|
_draw_axis_value(E_AXIS, xstring, true); |
|
|
|
lcd_put_u8str_P(PSTR(" ")); |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|