Add more Babystep options (#13262)
This commit is contained in:
committed by
Scott Lahteine
parent
f37df28d17
commit
eb4bf93ea4
@ -28,10 +28,6 @@
|
||||
#include "thermistor/thermistors.h"
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
extern uint8_t axis_known_position;
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_POWER_CONTROL)
|
||||
#include "../feature/power.h"
|
||||
#endif
|
||||
@ -220,12 +216,10 @@ class Temperature {
|
||||
static float redundant_temperature;
|
||||
#endif
|
||||
|
||||
#if ENABLED(PIDTEMP)
|
||||
#if ENABLED(PID_EXTRUSION_SCALING)
|
||||
static long last_e_position;
|
||||
static long lpq[LPQ_MAX_LEN];
|
||||
static int lpq_ptr;
|
||||
#endif
|
||||
#if ENABLED(PID_EXTRUSION_SCALING)
|
||||
static long last_e_position;
|
||||
static long lpq[LPQ_MAX_LEN];
|
||||
static int lpq_ptr;
|
||||
#endif
|
||||
|
||||
// Init min and max temp with extreme values to prevent false errors during startup
|
||||
@ -585,39 +579,8 @@ class Temperature {
|
||||
#endif
|
||||
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
|
||||
static void babystep_axis(const AxisEnum axis, const int16_t distance) {
|
||||
if (TEST(axis_known_position, axis)) {
|
||||
#if IS_CORE
|
||||
#if ENABLED(BABYSTEP_XY)
|
||||
switch (axis) {
|
||||
case CORE_AXIS_1: // X on CoreXY and CoreXZ, Y on CoreYZ
|
||||
babystepsTodo[CORE_AXIS_1] += distance * 2;
|
||||
babystepsTodo[CORE_AXIS_2] += distance * 2;
|
||||
break;
|
||||
case CORE_AXIS_2: // Y on CoreXY, Z on CoreXZ and CoreYZ
|
||||
babystepsTodo[CORE_AXIS_1] += CORESIGN(distance * 2);
|
||||
babystepsTodo[CORE_AXIS_2] -= CORESIGN(distance * 2);
|
||||
break;
|
||||
case NORMAL_AXIS: // Z on CoreXY, Y on CoreXZ, X on CoreYZ
|
||||
default:
|
||||
babystepsTodo[NORMAL_AXIS] += distance;
|
||||
break;
|
||||
}
|
||||
#elif CORE_IS_XZ || CORE_IS_YZ
|
||||
// Only Z stepping needs to be handled here
|
||||
babystepsTodo[CORE_AXIS_1] += CORESIGN(distance * 2);
|
||||
babystepsTodo[CORE_AXIS_2] -= CORESIGN(distance * 2);
|
||||
#else
|
||||
babystepsTodo[Z_AXIS] += distance;
|
||||
#endif
|
||||
#else
|
||||
babystepsTodo[axis] += distance;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BABYSTEPPING
|
||||
static void babystep_axis(const AxisEnum axis, const int16_t distance);
|
||||
#endif
|
||||
|
||||
#if ENABLED(PROBING_HEATERS_OFF)
|
||||
static void pause(const bool p);
|
||||
|
Reference in New Issue
Block a user