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.
This commit is contained in:
Nico Tonnhofer 2017-12-02 04:41:20 +01:00
parent c69b43b876
commit 5d5c169f07
1 changed files with 4 additions and 1 deletions

View File

@ -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.))