mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-25 04:48:31 +00:00
Relative movements fix
This commit is contained in:
parent
fb636db61a
commit
81a12b2fac
@ -3112,8 +3112,10 @@ static void homeaxis(const AxisEnum axis) {
|
||||
void gcode_get_destination() {
|
||||
LOOP_XYZE(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);
|
||||
const float v = parser.value_axis_units((AxisEnum)i);
|
||||
destination[i] = (axis_relative_modes[i] || relative_mode)
|
||||
? current_position[i] + v
|
||||
: (i == E_AXIS) ? v : LOGICAL_TO_NATIVE(v, i);
|
||||
}
|
||||
else
|
||||
destination[i] = current_position[i];
|
||||
|
Loading…
Reference in New Issue
Block a user