From beb51c2d58100fa6959d7216d85294f3dbe2e1c5 Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Wed, 5 Sep 2018 08:18:08 -0600 Subject: [PATCH] Show manual extrusion moves as relative in LCD - Implements FR#11724 - Old behavior can be restored by commenting out MANUAL_E_MOVES_RELATIVE --- Marlin/Configuration_adv.h | 1 + Marlin/src/config/default/Configuration_adv.h | 1 + Marlin/src/lcd/ultralcd.cpp | 13 ++++++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index a3684ff0bb..05701ce19c 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -425,6 +425,7 @@ #if ENABLED(ULTIPANEL) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel + #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index a3684ff0bb..05701ce19c 100755 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -425,6 +425,7 @@ #if ENABLED(ULTIPANEL) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel + #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index eafa20f277..66bfbd958a 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -477,6 +477,10 @@ uint16_t max_display_update_time = 0; #define manual_move_e_index 0 #endif + #if ENABLED(MANUAL_E_MOVES_RELATIVE) + float manual_move_e_origin = 0; + #endif + #if IS_KINEMATIC bool processing_manual_move = false; float manual_move_offset = 0; @@ -3066,6 +3070,9 @@ void lcd_quick_feedback(const bool clear_buttons) { #if IS_KINEMATIC + manual_move_offset #endif + #if ENABLED(MANUAL_E_MOVES_RELATIVE) + - manual_move_e_origin + #endif )); } } @@ -3114,7 +3121,11 @@ void lcd_quick_feedback(const bool clear_buttons) { case Z_AXIS: STATIC_ITEM(MSG_MOVE_Z, true, true); break; default: - STATIC_ITEM(MSG_MOVE_E, true, true); break; + #if ENABLED(MANUAL_E_MOVES_RELATIVE) + manual_move_e_origin = current_position[E_AXIS]; + #endif + STATIC_ITEM(MSG_MOVE_E, true, true); + break; } } MENU_BACK(MSG_MOVE_AXIS);