mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 20:18:52 +00:00
Tweak G92 to call plan_set_position only once, yes?
This commit is contained in:
parent
f47fc879fe
commit
2b0c25a091
@ -2494,15 +2494,17 @@ inline void gcode_G92() {
|
||||
if (!code_seen(axis_codes[E_AXIS]))
|
||||
st_synchronize();
|
||||
|
||||
bool didXYZ = false;
|
||||
for (int i = 0; i < NUM_AXIS; i++) {
|
||||
if (code_seen(axis_codes[i])) {
|
||||
current_position[i] = code_value();
|
||||
float v = current_position[i] = code_value();
|
||||
if (i == E_AXIS)
|
||||
plan_set_e_position(current_position[E_AXIS]);
|
||||
plan_set_e_position(v);
|
||||
else
|
||||
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
||||
didXYZ = true;
|
||||
}
|
||||
}
|
||||
if (didXYZ) plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
||||
}
|
||||
|
||||
#ifdef ULTIPANEL
|
||||
|
Loading…
Reference in New Issue
Block a user