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
 // Homed and known, display constantly.
298
 // Homed and known, display constantly.
299
 //
299
 //
300
 FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink) {
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
   lcd_put_wchar(X_LABEL_POS + offs, XYZ_BASELINE, axis_codes[axis]);
308
   lcd_put_wchar(X_LABEL_POS + offs, XYZ_BASELINE, axis_codes[axis]);
303
   lcd_moveto(X_VALUE_POS + offs, XYZ_BASELINE);
309
   lcd_moveto(X_VALUE_POS + offs, XYZ_BASELINE);
304
   if (blink)
310
   if (blink)
361
     #endif
367
     #endif
362
   #endif
368
   #endif
363
 
369
 
370
+  const bool showxy = (true
371
+    #if ENABLED(LCD_SHOW_E_TOTAL)
372
+      && !printingIsActive()
373
+    #endif
374
+  );
375
+
364
   // At the first page, generate new display values
376
   // At the first page, generate new display values
365
   if (first_page) {
377
   if (first_page) {
366
     #if ANIM_HBC
378
     #if ANIM_HBC
377
       heat_bits = new_bits;
389
       heat_bits = new_bits;
378
     #endif
390
     #endif
379
     const xyz_pos_t lpos = current_position.asLogical();
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
     if (showxy)
392
     if (showxy)
386
       strcpy(xstring, ftostr4sign(lpos.x));
393
       strcpy(xstring, ftostr4sign(lpos.x));
387
     else {
394
     else {

Notiek ielāde…
Atcelt
Saglabāt