Procházet zdrojové kódy

Show manual extrusion moves as relative in LCD

- Implements FR#11724
- Old behavior can be restored by commenting out MANUAL_E_MOVES_RELATIVE
Marcio Teixeira před 6 roky
rodič
revize
beb51c2d58

+ 1
- 0
Marlin/Configuration_adv.h Zobrazit soubor

@@ -425,6 +425,7 @@
425 425
 
426 426
 #if ENABLED(ULTIPANEL)
427 427
   #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
428
+  #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions
428 429
   #define ULTIPANEL_FEEDMULTIPLY  // Comment to disable setting feedrate multiplier via encoder
429 430
 #endif
430 431
 

+ 1
- 0
Marlin/src/config/default/Configuration_adv.h Zobrazit soubor

@@ -425,6 +425,7 @@
425 425
 
426 426
 #if ENABLED(ULTIPANEL)
427 427
   #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
428
+  #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions
428 429
   #define ULTIPANEL_FEEDMULTIPLY  // Comment to disable setting feedrate multiplier via encoder
429 430
 #endif
430 431
 

+ 12
- 1
Marlin/src/lcd/ultralcd.cpp Zobrazit soubor

@@ -477,6 +477,10 @@ uint16_t max_display_update_time = 0;
477 477
     #define manual_move_e_index 0
478 478
   #endif
479 479
 
480
+  #if ENABLED(MANUAL_E_MOVES_RELATIVE)
481
+    float manual_move_e_origin = 0;
482
+  #endif
483
+
480 484
   #if IS_KINEMATIC
481 485
     bool processing_manual_move = false;
482 486
     float manual_move_offset = 0;
@@ -3066,6 +3070,9 @@ void lcd_quick_feedback(const bool clear_buttons) {
3066 3070
         #if IS_KINEMATIC
3067 3071
           + manual_move_offset
3068 3072
         #endif
3073
+        #if ENABLED(MANUAL_E_MOVES_RELATIVE)
3074
+          - manual_move_e_origin
3075
+        #endif
3069 3076
       ));
3070 3077
     }
3071 3078
   }
@@ -3114,7 +3121,11 @@ void lcd_quick_feedback(const bool clear_buttons) {
3114 3121
         case Z_AXIS:
3115 3122
           STATIC_ITEM(MSG_MOVE_Z, true, true); break;
3116 3123
         default:
3117
-          STATIC_ITEM(MSG_MOVE_E, true, true); break;
3124
+          #if ENABLED(MANUAL_E_MOVES_RELATIVE)
3125
+            manual_move_e_origin = current_position[E_AXIS];
3126
+          #endif
3127
+          STATIC_ITEM(MSG_MOVE_E, true, true);
3128
+          break;
3118 3129
       }
3119 3130
     }
3120 3131
     MENU_BACK(MSG_MOVE_AXIS);

Loading…
Zrušit
Uložit