Skip to content

Commit

Permalink
🐛 Define required endstop enums (#23425)
Browse files Browse the repository at this point in the history
  • Loading branch information
descipher authored and thinkyhead committed Jan 9, 2022
1 parent 93126c0 commit 4fd1de7
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions Marlin/src/module/endstops.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,26 @@ enum EndstopEnum : char {
_ES_ITEM(HAS_K_MAX, K_MAX)

// Extra Endstops for XYZ
_ES_ITEM(HAS_X2_MIN, X2_MIN)
_ES_ITEM(HAS_X2_MAX, X2_MAX)
_ES_ITEM(HAS_Y2_MIN, Y2_MIN)
_ES_ITEM(HAS_Y2_MAX, Y2_MAX)
_ES_ITEM(HAS_Z2_MIN, Z2_MIN)
_ES_ITEM(HAS_Z2_MAX, Z2_MAX)
_ES_ITEM(HAS_Z3_MIN, Z3_MIN)
_ES_ITEM(HAS_Z3_MAX, Z3_MAX)
_ES_ITEM(HAS_Z4_MIN, Z4_MIN)
_ES_ITEM(HAS_Z4_MAX, Z4_MAX)
#if ENABLED(X_DUAL_ENDSTOPS)
_ES_ITEM(HAS_X_MIN, X2_MIN)
_ES_ITEM(HAS_X_MAX, X2_MAX)
#endif
#if ENABLED(Y_DUAL_ENDSTOPS)
_ES_ITEM(HAS_Y_MIN, Y2_MIN)
_ES_ITEM(HAS_Y_MAX, Y2_MAX)
#endif
#if ENABLED(Z_MULTI_ENDSTOPS)
_ES_ITEM(HAS_Z_MIN, Z2_MIN)
_ES_ITEM(HAS_Z_MAX, Z2_MAX)
#if NUM_Z_STEPPER_DRIVERS >= 3
_ES_ITEM(HAS_Z_MIN, Z3_MIN)
_ES_ITEM(HAS_Z_MAX, Z3_MAX)
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
_ES_ITEM(HAS_Z_MIN, Z4_MIN)
_ES_ITEM(HAS_Z_MAX, Z4_MAX)
#endif
#endif

// Bed Probe state is distinct or shared with Z_MIN (i.e., when the probe is the only Z endstop)
#if !HAS_DELTA_SENSORLESS_PROBING
Expand Down

1 comment on commit 4fd1de7

@aughey
Copy link

@aughey aughey commented on 4fd1de7 Jul 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit blew away a change Fix up endstop flags #22487 3685b85

At least partially. I'm trying to build with dual endstops on X that zero in the positive direction. This endstop flags #22487 claimed to fix it, but someone's commit later on undid some of the fix. I'm working on trying to restore what's necessary.

Please sign in to comment.