From 5d5c169f0753315eb63deb3463d8c5a4b3f48a42 Mon Sep 17 00:00:00 2001 From: Nico Tonnhofer Date: Sat, 2 Dec 2017 04:41:20 +0100 Subject: [PATCH] gcode_process: change E-axis behavior of M83/G91 Only real relative mode with M83. G91 moves the E-axis relative but position will be absolute. M83 moves the E-axis relative. Position will be also relative. --- gcode_process.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcode_process.c b/gcode_process.c index 6378cdb..c202246 100644 --- a/gcode_process.c +++ b/gcode_process.c @@ -54,11 +54,14 @@ void process_gcode_command() { // E relative movement. // Matches Sprinter's behaviour as of March 2012. - if (next_target.option_all_relative || next_target.option_e_relative) + if (next_target.option_e_relative) next_target.target.e_relative = 1; else next_target.target.e_relative = 0; + if (next_target.option_all_relative && !next_target.option_e_relative) + next_target.target.axis[E] += startpoint.axis[E]; + // implement axis limits #ifdef X_MIN if (next_target.target.axis[X] < (int32_t)(X_MIN * 1000.))