SCARA support in homeaxis
This commit is contained in:
parent
92b4459f6c
commit
1c5f9821c4
@ -2228,10 +2228,15 @@ static void do_homing_move(AxisEnum axis, float where, float fr_mm_s = 0.0) {
|
|||||||
#define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS)
|
#define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS)
|
||||||
|
|
||||||
static void homeaxis(AxisEnum axis) {
|
static void homeaxis(AxisEnum axis) {
|
||||||
|
|
||||||
|
#if IS_SCARA
|
||||||
|
// Only Z homing (with probe) is permitted
|
||||||
|
if (axis != Z_AXIS) { BUZZ(100, 880); return; }
|
||||||
|
#else
|
||||||
#define CAN_HOME(A) \
|
#define CAN_HOME(A) \
|
||||||
(axis == A##_AXIS && ((A##_MIN_PIN > -1 && A##_HOME_DIR < 0) || (A##_MAX_PIN > -1 && A##_HOME_DIR > 0)))
|
(axis == A##_AXIS && ((A##_MIN_PIN > -1 && A##_HOME_DIR < 0) || (A##_MAX_PIN > -1 && A##_HOME_DIR > 0)))
|
||||||
|
|
||||||
if (!CAN_HOME(X) && !CAN_HOME(Y) && !CAN_HOME(Z)) return;
|
if (!CAN_HOME(X) && !CAN_HOME(Y) && !CAN_HOME(Z)) return;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
if (DEBUGGING(LEVELING)) {
|
if (DEBUGGING(LEVELING)) {
|
||||||
@ -2294,10 +2299,16 @@ static void homeaxis(AxisEnum axis) {
|
|||||||
} // Z_AXIS
|
} // Z_AXIS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if IS_SCARA
|
||||||
|
|
||||||
|
set_axis_is_at_home(axis);
|
||||||
|
SYNC_PLAN_POSITION_KINEMATIC();
|
||||||
|
|
||||||
|
#elif ENABLED(DELTA)
|
||||||
|
|
||||||
// Delta has already moved all three towers up in G28
|
// Delta has already moved all three towers up in G28
|
||||||
// so here it re-homes each tower in turn.
|
// so here it re-homes each tower in turn.
|
||||||
// Delta homing treats the axes as normal linear axes.
|
// Delta homing treats the axes as normal linear axes.
|
||||||
#if ENABLED(DELTA)
|
|
||||||
|
|
||||||
// retrace by the amount specified in endstop_adj
|
// retrace by the amount specified in endstop_adj
|
||||||
if (endstop_adj[axis] * Z_HOME_DIR < 0) {
|
if (endstop_adj[axis] * Z_HOME_DIR < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user