PFW-1386 st_get_position_mm() is more accurate when using endstops (not homed printer)
If the endstops kick in, then st_get_position_mm shows the actual travel distance. current_position[Z-AXIS] does not get updated correctly thus we cannot use it when unhomed. current_position[Z-AXIS] is later set to Z_MAX_POS, we cannot use that either to calculate the travel distance
This commit is contained in:
parent
f409426bdc
commit
2616df66af
|
|
@ -2128,7 +2128,7 @@ float raise_z(float delta)
|
|||
st_synchronize();
|
||||
|
||||
// Get the final travel distance
|
||||
travel_z = current_position[Z_AXIS] - travel_z;
|
||||
travel_z = st_get_position_mm(Z_AXIS) - travel_z;
|
||||
#ifdef TMC2130
|
||||
if (endstop_z_hit_on_purpose())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue