|
@@ -256,21 +256,32 @@ void MarlinUI::draw_status_screen() {
|
256
|
256
|
tft.set_background(COLOR_BACKGROUND);
|
257
|
257
|
tft.add_rectangle(0, 0, 312, 24, COLOR_AXIS_HOMED);
|
258
|
258
|
|
259
|
|
- tft.add_text( 10, 3, COLOR_AXIS_HOMED , "X");
|
260
|
|
- tft.add_text(127, 3, COLOR_AXIS_HOMED , "Y");
|
261
|
|
- tft.add_text(219, 3, COLOR_AXIS_HOMED , "Z");
|
262
|
|
-
|
263
|
|
- bool not_homed = axis_should_home(X_AXIS);
|
264
|
|
- tft_string.set(blink && not_homed ? "?" : ftostr4sign(LOGICAL_X_POSITION(current_position.x)));
|
265
|
|
- tft.add_text( 68 - tft_string.width(), 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
|
266
|
|
-
|
267
|
|
- not_homed = axis_should_home(Y_AXIS);
|
268
|
|
- tft_string.set(blink && not_homed ? "?" : ftostr4sign(LOGICAL_Y_POSITION(current_position.y)));
|
269
|
|
- tft.add_text(185 - tft_string.width(), 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
|
|
259
|
+ if (TERN0(LCD_SHOW_E_TOTAL, printingIsActive())) {
|
|
260
|
+ #if ENABLED(LCD_SHOW_E_TOTAL)
|
|
261
|
+ tft.add_text( 10, 3, COLOR_AXIS_HOMED , "E");
|
|
262
|
+ const uint8_t escale = e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm
|
|
263
|
+ tft_string.set(ftostr4sign(e_move_accumulator / escale));
|
|
264
|
+ tft_string.add(escale == 10 ? 'c' : 'm');
|
|
265
|
+ tft_string.add('m');
|
|
266
|
+ tft.add_text(127 - tft_string.width(), 3, COLOR_AXIS_HOMED, tft_string);
|
|
267
|
+ #endif
|
|
268
|
+ }
|
|
269
|
+ else {
|
|
270
|
+ tft.add_text( 10, 3, COLOR_AXIS_HOMED , "X");
|
|
271
|
+ const bool nhx = axis_should_home(X_AXIS);
|
|
272
|
+ tft_string.set(blink && nhx ? "?" : ftostr4sign(LOGICAL_X_POSITION(current_position.x)));
|
|
273
|
+ tft.add_text( 68 - tft_string.width(), 3, nhx ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
|
|
274
|
+
|
|
275
|
+ tft.add_text(127, 3, COLOR_AXIS_HOMED , "Y");
|
|
276
|
+ const bool nhy = axis_should_home(Y_AXIS);
|
|
277
|
+ tft_string.set(blink && nhy ? "?" : ftostr4sign(LOGICAL_Y_POSITION(current_position.y)));
|
|
278
|
+ tft.add_text(185 - tft_string.width(), 3, nhy ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
|
|
279
|
+ }
|
270
|
280
|
|
271
|
|
- not_homed = axis_should_home(Z_AXIS);
|
|
281
|
+ tft.add_text(219, 3, COLOR_AXIS_HOMED , "Z");
|
|
282
|
+ const bool nhz = axis_should_home(Z_AXIS);
|
272
|
283
|
uint16_t offset = 25;
|
273
|
|
- if (blink && not_homed)
|
|
284
|
+ if (blink && nhz)
|
274
|
285
|
tft_string.set("?");
|
275
|
286
|
else {
|
276
|
287
|
const float z = LOGICAL_Z_POSITION(current_position.z);
|
|
@@ -281,7 +292,7 @@ void MarlinUI::draw_status_screen() {
|
281
|
292
|
tft_string.set(ftostr52sp(z));
|
282
|
293
|
offset -= tft_string.width();
|
283
|
294
|
}
|
284
|
|
- tft.add_text(301 - tft_string.width() - offset, 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
|
|
295
|
+ tft.add_text(301 - tft_string.width() - offset, 3, nhz ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
|
285
|
296
|
TERN_(TOUCH_SCREEN, touch.add_control(MOVE_AXIS, 0, 103, 312, 24));
|
286
|
297
|
|
287
|
298
|
// feed rate
|