Only queue babysteps if axis is in a known position
This commit is contained in:
parent
5e9726530f
commit
72a7fac461
|
@ -431,31 +431,33 @@ class Temperature {
|
||||||
#if ENABLED(BABYSTEPPING)
|
#if ENABLED(BABYSTEPPING)
|
||||||
|
|
||||||
static void babystep_axis(const AxisEnum axis, const int distance) {
|
static void babystep_axis(const AxisEnum axis, const int distance) {
|
||||||
#if IS_CORE
|
if (axis_known_position[axis]) {
|
||||||
#if ENABLED(BABYSTEP_XY)
|
#if IS_CORE
|
||||||
switch (axis) {
|
#if ENABLED(BABYSTEP_XY)
|
||||||
case CORE_AXIS_1: // X on CoreXY and CoreXZ, Y on CoreYZ
|
switch (axis) {
|
||||||
babystepsTodo[CORE_AXIS_1] += distance * 2;
|
case CORE_AXIS_1: // X on CoreXY and CoreXZ, Y on CoreYZ
|
||||||
babystepsTodo[CORE_AXIS_2] += distance * 2;
|
babystepsTodo[CORE_AXIS_1] += distance * 2;
|
||||||
break;
|
babystepsTodo[CORE_AXIS_2] += distance * 2;
|
||||||
case CORE_AXIS_2: // Y on CoreXY, Z on CoreXZ and CoreYZ
|
break;
|
||||||
babystepsTodo[CORE_AXIS_1] += CORESIGN(distance * 2);
|
case CORE_AXIS_2: // Y on CoreXY, Z on CoreXZ and CoreYZ
|
||||||
babystepsTodo[CORE_AXIS_2] -= CORESIGN(distance * 2);
|
babystepsTodo[CORE_AXIS_1] += CORESIGN(distance * 2);
|
||||||
break;
|
babystepsTodo[CORE_AXIS_2] -= CORESIGN(distance * 2);
|
||||||
case NORMAL_AXIS: // Z on CoreXY, Y on CoreXZ, X on CoreYZ
|
break;
|
||||||
babystepsTodo[NORMAL_AXIS] += distance;
|
case NORMAL_AXIS: // Z on CoreXY, Y on CoreXZ, X on CoreYZ
|
||||||
break;
|
babystepsTodo[NORMAL_AXIS] += distance;
|
||||||
}
|
break;
|
||||||
#elif CORE_IS_XZ || CORE_IS_YZ
|
}
|
||||||
// Only Z stepping needs to be handled here
|
#elif CORE_IS_XZ || CORE_IS_YZ
|
||||||
babystepsTodo[CORE_AXIS_1] += CORESIGN(distance * 2);
|
// Only Z stepping needs to be handled here
|
||||||
babystepsTodo[CORE_AXIS_2] -= CORESIGN(distance * 2);
|
babystepsTodo[CORE_AXIS_1] += CORESIGN(distance * 2);
|
||||||
|
babystepsTodo[CORE_AXIS_2] -= CORESIGN(distance * 2);
|
||||||
|
#else
|
||||||
|
babystepsTodo[Z_AXIS] += distance;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
babystepsTodo[Z_AXIS] += distance;
|
babystepsTodo[axis] += distance;
|
||||||
#endif
|
#endif
|
||||||
#else
|
}
|
||||||
babystepsTodo[axis] += distance;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // BABYSTEPPING
|
#endif // BABYSTEPPING
|
||||||
|
|
Loading…
Reference in a new issue