Fix set_home_offset bug from bad porting
This commit is contained in:
parent
a19656e7cb
commit
51c7b5d46f
@ -1376,15 +1376,10 @@ void homeaxis(const AxisEnum axis) {
|
|||||||
|
|
||||||
#if HAS_M206_COMMAND
|
#if HAS_M206_COMMAND
|
||||||
/**
|
/**
|
||||||
* Change the home offset for an axis, update the current
|
* Change the home offset for an axis.
|
||||||
* position and the software endstops to retain the same
|
* Also refreshes the workspace offset.
|
||||||
* relative distance to the new home.
|
|
||||||
*
|
|
||||||
* Since this changes the current_position, code should
|
|
||||||
* call sync_plan_position soon after this.
|
|
||||||
*/
|
*/
|
||||||
void set_home_offset(const AxisEnum axis, const float v) {
|
void set_home_offset(const AxisEnum axis, const float v) {
|
||||||
current_position[axis] += v - home_offset[axis];
|
|
||||||
home_offset[axis] = v;
|
home_offset[axis] = v;
|
||||||
update_software_endstops(axis);
|
update_software_endstops(axis);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user