From 7360e9343a70e966234dfe69046394a93c2792f7 Mon Sep 17 00:00:00 2001 From: Robby Candra Date: Sat, 2 Nov 2019 19:04:31 +0700 Subject: [PATCH] Minor DOGM status screen fix (#15746) --- Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index f2b6ae002f..f93a72e582 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -388,17 +388,21 @@ void MarlinUI::draw_status_screen() { #endif heat_bits = new_bits; #endif + const xyz_pos_t lpos = current_position.asLogical(); - if (showxy) + strcpy(zstring, ftostr52sp(lpos.z)); + + if (showxy) { strcpy(xstring, ftostr4sign(lpos.x)); + strcpy(ystring, ftostr4sign(lpos.y)); + } 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) strcpy(wstring, ftostr12ns(filwidth.measured_mm)); strcpy(mstring, i16tostr3(planner.volumetric_percent(parser.volumetric_enabled)));