|
|
|
@ -258,21 +258,31 @@ void MarlinUI::draw_status_screen() {
|
|
|
|
|
tft.set_background(COLOR_BACKGROUND);
|
|
|
|
|
tft.add_rectangle(0, 0, TFT_WIDTH - 8, FONT_LINE_HEIGHT, COLOR_AXIS_HOMED);
|
|
|
|
|
|
|
|
|
|
if (TERN0(LCD_SHOW_E_TOTAL, printingIsActive())) {
|
|
|
|
|
#if ENABLED(LCD_SHOW_E_TOTAL)
|
|
|
|
|
tft.add_text( 16, 3, COLOR_AXIS_HOMED , "E");
|
|
|
|
|
const uint8_t escale = e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm
|
|
|
|
|
tft_string.set(ftostr4sign(e_move_accumulator / escale));
|
|
|
|
|
tft_string.add(escale == 10 ? 'c' : 'm');
|
|
|
|
|
tft_string.add('m');
|
|
|
|
|
tft.add_text(192 - tft_string.width(), 3, COLOR_AXIS_HOMED, tft_string);
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
tft.add_text( 16, 3, COLOR_AXIS_HOMED , "X");
|
|
|
|
|
const bool nhx = axis_should_home(X_AXIS);
|
|
|
|
|
tft_string.set(blink && nhx ? "?" : ftostr4sign(LOGICAL_X_POSITION(current_position.x)));
|
|
|
|
|
tft.add_text(102 - tft_string.width(), 3, nhx ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
|
|
|
|
|
|
|
|
|
|
tft.add_text(192, 3, COLOR_AXIS_HOMED , "Y");
|
|
|
|
|
const bool nhy = axis_should_home(Y_AXIS);
|
|
|
|
|
tft_string.set(blink && nhy ? "?" : ftostr4sign(LOGICAL_Y_POSITION(current_position.y)));
|
|
|
|
|
tft.add_text(280 - tft_string.width(), 3, nhy ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
|
|
|
|
|
}
|
|
|
|
|
tft.add_text(330, 3, COLOR_AXIS_HOMED , "Z");
|
|
|
|
|
|
|
|
|
|
bool not_homed = axis_should_home(X_AXIS);
|
|
|
|
|
tft_string.set(blink && not_homed ? "?" : ftostr4sign(LOGICAL_X_POSITION(current_position.x)));
|
|
|
|
|
tft.add_text(102 - tft_string.width(), 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
|
|
|
|
|
|
|
|
|
|
not_homed = axis_should_home(Y_AXIS);
|
|
|
|
|
tft_string.set(blink && not_homed ? "?" : ftostr4sign(LOGICAL_Y_POSITION(current_position.y)));
|
|
|
|
|
tft.add_text(280 - tft_string.width(), 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
|
|
|
|
|
|
|
|
|
|
uint16_t offset = 32;
|
|
|
|
|
not_homed = axis_should_home(Z_AXIS);
|
|
|
|
|
if (blink && not_homed)
|
|
|
|
|
const bool nhz = axis_should_home(Z_AXIS);
|
|
|
|
|
if (blink && nhz)
|
|
|
|
|
tft_string.set("?");
|
|
|
|
|
else {
|
|
|
|
|
const float z = LOGICAL_Z_POSITION(current_position.z);
|
|
|
|
@ -283,7 +293,7 @@ void MarlinUI::draw_status_screen() {
|
|
|
|
|
tft_string.set(ftostr52sp(z));
|
|
|
|
|
offset -= tft_string.width();
|
|
|
|
|
}
|
|
|
|
|
tft.add_text(455 - tft_string.width() - offset, 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
|
|
|
|
|
tft.add_text(455 - tft_string.width() - offset, 3, nhz ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
|
|
|
|
|
TERN_(TOUCH_SCREEN, touch.add_control(MOVE_AXIS, 4, y, TFT_WIDTH - 8, FONT_LINE_HEIGHT));
|
|
|
|
|
|
|
|
|
|
y += TERN(HAS_UI_480x272, 38, 48);
|
|
|
|
|