Browse Source

Minor DOGM status screen fix (#15746)

Robby Candra 5 years ago
parent
commit
7360e9343a
1 changed files with 7 additions and 3 deletions
  1. 7
    3
      Marlin/src/lcd/dogm/status_screen_DOGM.cpp

+ 7
- 3
Marlin/src/lcd/dogm/status_screen_DOGM.cpp View File

388
       #endif
388
       #endif
389
       heat_bits = new_bits;
389
       heat_bits = new_bits;
390
     #endif
390
     #endif
391
+
391
     const xyz_pos_t lpos = current_position.asLogical();
392
     const xyz_pos_t lpos = current_position.asLogical();
392
-    if (showxy)
393
+    strcpy(zstring, ftostr52sp(lpos.z));
394
+
395
+    if (showxy) {
393
       strcpy(xstring, ftostr4sign(lpos.x));
396
       strcpy(xstring, ftostr4sign(lpos.x));
397
+      strcpy(ystring, ftostr4sign(lpos.y));
398
+    }
394
     else {
399
     else {
395
       #if ENABLED(LCD_SHOW_E_TOTAL)
400
       #if ENABLED(LCD_SHOW_E_TOTAL)
396
         const uint8_t escale = e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm
401
         const uint8_t escale = e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm
397
         sprintf_P(xstring, PSTR("%ld%cm"), uint32_t(_MAX(e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm
402
         sprintf_P(xstring, PSTR("%ld%cm"), uint32_t(_MAX(e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm
398
       #endif
403
       #endif
399
     }
404
     }
400
-    strcpy(ystring, ftostr4sign(lpos.y));
401
-    strcpy(zstring, ftostr52sp( lpos.z));
405
+
402
     #if ENABLED(FILAMENT_LCD_DISPLAY)
406
     #if ENABLED(FILAMENT_LCD_DISPLAY)
403
       strcpy(wstring, ftostr12ns(filwidth.measured_mm));
407
       strcpy(wstring, ftostr12ns(filwidth.measured_mm));
404
       strcpy(mstring, i16tostr3(planner.volumetric_percent(parser.volumetric_enabled)));
408
       strcpy(mstring, i16tostr3(planner.volumetric_percent(parser.volumetric_enabled)));

Loading…
Cancel
Save