Pārlūkot izejas kodu

Followup to E Total

Scott Lahteine 5 gadus atpakaļ
vecāks
revīzija
78899fc241
1 mainītis faili ar 13 papildinājumiem un 6 dzēšanām
  1. 13
    6
      Marlin/src/lcd/dogm/status_screen_DOGM.cpp

+ 13
- 6
Marlin/src/lcd/dogm/status_screen_DOGM.cpp Parādīt failu

@@ -298,7 +298,13 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const bool blin
298 298
 // Homed and known, display constantly.
299 299
 //
300 300
 FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink) {
301
-  const uint8_t offs = (XYZ_SPACING) * axis;
301
+  const AxisEnum a = (
302
+    #if ENABLED(LCD_SHOW_E_TOTAL)
303
+      axis == E_AXIS ? X_AXIS :
304
+    #endif
305
+    axis
306
+  );
307
+  const uint8_t offs = (XYZ_SPACING) * a;
302 308
   lcd_put_wchar(X_LABEL_POS + offs, XYZ_BASELINE, axis_codes[axis]);
303 309
   lcd_moveto(X_VALUE_POS + offs, XYZ_BASELINE);
304 310
   if (blink)
@@ -361,6 +367,12 @@ void MarlinUI::draw_status_screen() {
361 367
     #endif
362 368
   #endif
363 369
 
370
+  const bool showxy = (true
371
+    #if ENABLED(LCD_SHOW_E_TOTAL)
372
+      && !printingIsActive()
373
+    #endif
374
+  );
375
+
364 376
   // At the first page, generate new display values
365 377
   if (first_page) {
366 378
     #if ANIM_HBC
@@ -377,11 +389,6 @@ void MarlinUI::draw_status_screen() {
377 389
       heat_bits = new_bits;
378 390
     #endif
379 391
     const xyz_pos_t lpos = current_position.asLogical();
380
-    const bool showxy = (true
381
-      #if ENABLED(LCD_SHOW_E_TOTAL)
382
-        && !printingIsActive()
383
-      #endif
384
-    );
385 392
     if (showxy)
386 393
       strcpy(xstring, ftostr4sign(lpos.x));
387 394
     else {

Notiek ielāde…
Atcelt
Saglabāt