Apply remaining ENABLED/DISABLED conditionals
This commit is contained in:
committed by
Richard Wackerbarth
parent
4a72d2ba9c
commit
46453905d6
@ -289,7 +289,7 @@ void enable_endstops(bool check) { check_endstops = check; }
|
||||
// Check endstops
|
||||
inline void update_endstops() {
|
||||
|
||||
#ifdef Z_DUAL_ENDSTOPS
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
uint16_t
|
||||
#else
|
||||
byte
|
||||
@ -317,12 +317,12 @@ inline void update_endstops() {
|
||||
step_events_completed = current_block->step_event_count; \
|
||||
}
|
||||
|
||||
#ifdef COREXY
|
||||
#if ENABLED(COREXY)
|
||||
// Head direction in -X axis for CoreXY bots.
|
||||
// If DeltaX == -DeltaY, the movement is only in Y axis
|
||||
if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) == TEST(out_bits, B_AXIS))) {
|
||||
if (TEST(out_bits, X_HEAD))
|
||||
#elif defined(COREXZ)
|
||||
#elif ENABLED(COREXZ)
|
||||
// Head direction in -X axis for CoreXZ bots.
|
||||
// If DeltaX == -DeltaZ, the movement is only in Z axis
|
||||
if ((current_block->steps[A_AXIS] != current_block->steps[C_AXIS]) || (TEST(out_bits, A_AXIS) == TEST(out_bits, C_AXIS))) {
|
||||
@ -331,7 +331,7 @@ inline void update_endstops() {
|
||||
if (TEST(out_bits, X_AXIS)) // stepping along -X axis (regular Cartesian bot)
|
||||
#endif
|
||||
{ // -direction
|
||||
#ifdef DUAL_X_CARRIAGE
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
// with 2 x-carriages, endstops are only checked in the homing direction for the active extruder
|
||||
if ((current_block->active_extruder == 0 && X_HOME_DIR == -1) || (current_block->active_extruder != 0 && X2_HOME_DIR == -1))
|
||||
#endif
|
||||
@ -342,7 +342,7 @@ inline void update_endstops() {
|
||||
}
|
||||
}
|
||||
else { // +direction
|
||||
#ifdef DUAL_X_CARRIAGE
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
// with 2 x-carriages, endstops are only checked in the homing direction for the active extruder
|
||||
if ((current_block->active_extruder == 0 && X_HOME_DIR == 1) || (current_block->active_extruder != 0 && X2_HOME_DIR == 1))
|
||||
#endif
|
||||
@ -352,11 +352,11 @@ inline void update_endstops() {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#if defined(COREXY) || defined(COREXZ)
|
||||
#if ENABLED(COREXY) || ENABLED(COREXZ)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef COREXY
|
||||
#if ENABLED(COREXY)
|
||||
// Head direction in -Y axis for CoreXY bots.
|
||||
// If DeltaX == DeltaY, the movement is only in X axis
|
||||
if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) != TEST(out_bits, B_AXIS))) {
|
||||
@ -374,11 +374,11 @@ inline void update_endstops() {
|
||||
UPDATE_ENDSTOP(Y, MAX);
|
||||
#endif
|
||||
}
|
||||
#if defined(COREXY)
|
||||
#if ENABLED(COREXY)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef COREXZ
|
||||
#if ENABLED(COREXZ)
|
||||
// Head direction in -Z axis for CoreXZ bots.
|
||||
// If DeltaX == DeltaZ, the movement is only in X axis
|
||||
if ((current_block->steps[A_AXIS] != current_block->steps[C_AXIS]) || (TEST(out_bits, A_AXIS) != TEST(out_bits, C_AXIS))) {
|
||||
@ -389,7 +389,7 @@ inline void update_endstops() {
|
||||
{ // z -direction
|
||||
#if HAS_Z_MIN
|
||||
|
||||
#ifdef Z_DUAL_ENDSTOPS
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
SET_ENDSTOP_BIT(Z, MIN);
|
||||
#if HAS_Z2_MIN
|
||||
SET_ENDSTOP_BIT(Z2, MIN);
|
||||
@ -411,7 +411,7 @@ inline void update_endstops() {
|
||||
#endif // !Z_DUAL_ENDSTOPS
|
||||
#endif // Z_MIN_PIN
|
||||
|
||||
#ifdef Z_PROBE_ENDSTOP
|
||||
#if ENABLED(Z_PROBE_ENDSTOP)
|
||||
UPDATE_ENDSTOP(Z, PROBE);
|
||||
|
||||
if (TEST_ENDSTOP(Z_PROBE))
|
||||
@ -424,7 +424,7 @@ inline void update_endstops() {
|
||||
else { // z +direction
|
||||
#if HAS_Z_MAX
|
||||
|
||||
#ifdef Z_DUAL_ENDSTOPS
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
|
||||
SET_ENDSTOP_BIT(Z, MAX);
|
||||
#if HAS_Z2_MAX
|
||||
@ -449,7 +449,7 @@ inline void update_endstops() {
|
||||
#endif // !Z_DUAL_ENDSTOPS
|
||||
#endif // Z_MAX_PIN
|
||||
|
||||
#ifdef Z_PROBE_ENDSTOP
|
||||
#if ENABLED(Z_PROBE_ENDSTOP)
|
||||
UPDATE_ENDSTOP(Z, PROBE);
|
||||
|
||||
if (TEST_ENDSTOP(Z_PROBE))
|
||||
@ -459,7 +459,7 @@ inline void update_endstops() {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#if defined(COREXZ)
|
||||
#if ENABLED(COREXZ)
|
||||
}
|
||||
#endif
|
||||
old_endstop_bits = current_endstop_bits;
|
||||
|
Reference in New Issue
Block a user