Browse Source
Merge pull request #8336 from thinkyhead/bf2_fix_get_destination
[2.0] Fix get_destination_from_command for E
pull/1/head
Scott Lahteine
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
Marlin/src/gcode/gcode.cpp
|
@ -93,8 +93,10 @@ bool GcodeSuite::get_target_extruder_from_command() { |
|
|
*/ |
|
|
*/ |
|
|
void GcodeSuite::get_destination_from_command() { |
|
|
void GcodeSuite::get_destination_from_command() { |
|
|
LOOP_XYZE(i) { |
|
|
LOOP_XYZE(i) { |
|
|
if (parser.seen(axis_codes[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); |
|
|
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 |
|
|
else |
|
|
destination[i] = current_position[i]; |
|
|
destination[i] = current_position[i]; |
|
|
} |
|
|
} |
|
|