From 87b655e59e67189faeea395ef3aa51134f22fa39 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 8 Nov 2017 12:50:40 -0600 Subject: [PATCH] Fix gcode_get_destination E axis --- Marlin/Marlin_main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 4ee02650b0..daef51c91f 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3352,8 +3352,10 @@ static void homeaxis(const AxisEnum axis) { */ void gcode_get_destination() { LOOP_XYZE(i) { - if (parser.seen(axis_codes[i])) - destination[i] = LOGICAL_TO_NATIVE(parser.value_axis_units((AxisEnum)i) + (axis_relative_modes[i] || relative_mode ? current_position[i] : 0), i); + if (parser.seen(axis_codes[i])) { + const float v = parser.value_axis_units((AxisEnum)i) + (axis_relative_modes[i] || relative_mode ? current_position[i] : 0); + destination[i] = (i == E_AXIS ? v : LOGICAL_TO_NATIVE(v, i)); + } else destination[i] = current_position[i]; }