From 78899fc24178d84f78c87ec5de287d9afbaf9f1a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 27 Oct 2019 17:58:28 -0500 Subject: [PATCH] Followup to E Total --- Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index e16a938da0..0d4ff7f471 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -298,7 +298,13 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const bool blin // Homed and known, display constantly. // FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink) { - const uint8_t offs = (XYZ_SPACING) * axis; + const AxisEnum a = ( + #if ENABLED(LCD_SHOW_E_TOTAL) + axis == E_AXIS ? X_AXIS : + #endif + axis + ); + const uint8_t offs = (XYZ_SPACING) * a; lcd_put_wchar(X_LABEL_POS + offs, XYZ_BASELINE, axis_codes[axis]); lcd_moveto(X_VALUE_POS + offs, XYZ_BASELINE); if (blink) @@ -361,6 +367,12 @@ void MarlinUI::draw_status_screen() { #endif #endif + const bool showxy = (true + #if ENABLED(LCD_SHOW_E_TOTAL) + && !printingIsActive() + #endif + ); + // At the first page, generate new display values if (first_page) { #if ANIM_HBC @@ -377,11 +389,6 @@ 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 {