Fix get_destination_from_command for E

This commit is contained in:
Scott Lahteine 2017-11-08 12:54:00 -06:00
parent 967104e1ce
commit e6788bb6ae

View file

@ -93,8 +93,10 @@ bool GcodeSuite::get_target_extruder_from_command() {
*/
void GcodeSuite::get_destination_from_command() {
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];
}