Skip to content

Commit

Permalink
🐛 Fix auto pullup/down settings
Browse files Browse the repository at this point in the history
Followup to #25748
  • Loading branch information
thinkyhead committed Apr 28, 2023
1 parent a872232 commit 7d95928
Showing 1 changed file with 106 additions and 120 deletions.
226 changes: 106 additions & 120 deletions Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -1012,126 +1012,6 @@

#endif // Z_MULTI_ENDSTOPS

/**
* Set ENDSTOPPULLUPS for active endstop switches
*/
#if ENABLED(ENDSTOPPULLUPS)
#if HAS_X_MAX
#define ENDSTOPPULLUP_XMAX
#endif
#if HAS_Y_MAX
#define ENDSTOPPULLUP_YMAX
#endif
#if HAS_Z_MAX
#define ENDSTOPPULLUP_ZMAX
#endif
#if HAS_I_MAX
#define ENDSTOPPULLUP_IMAX
#endif
#if HAS_J_MAX
#define ENDSTOPPULLUP_JMAX
#endif
#if HAS_K_MAX
#define ENDSTOPPULLUP_KMAX
#endif
#if HAS_U_MAX
#define ENDSTOPPULLUP_UMAX
#endif
#if HAS_V_MAX
#define ENDSTOPPULLUP_VMAX
#endif
#if HAS_W_MAX
#define ENDSTOPPULLUP_WMAX
#endif
#if HAS_X_MIN
#define ENDSTOPPULLUP_XMIN
#endif
#if HAS_Y_MIN
#define ENDSTOPPULLUP_YMIN
#endif
#if HAS_Z_MIN_PIN
#define ENDSTOPPULLUP_ZMIN
#endif
#if HAS_I_MIN
#define ENDSTOPPULLUP_IMIN
#endif
#if HAS_J_MIN
#define ENDSTOPPULLUP_JMIN
#endif
#if HAS_K_MIN
#define ENDSTOPPULLUP_KMIN
#endif
#if HAS_U_MIN
#define ENDSTOPPULLUP_UMIN
#endif
#if HAS_V_MIN
#define ENDSTOPPULLUP_VMIN
#endif
#if HAS_W_MIN
#define ENDSTOPPULLUP_WMIN
#endif
#endif

/**
* Set ENDSTOPPULLDOWNS for active endstop switches
*/
#if ENABLED(ENDSTOPPULLDOWNS)
#if HAS_X_MAX
#define ENDSTOPPULLDOWN_XMAX
#endif
#if HAS_Y_MAX
#define ENDSTOPPULLDOWN_YMAX
#endif
#if HAS_Z_MAX
#define ENDSTOPPULLDOWN_ZMAX
#endif
#if HAS_I_MAX
#define ENDSTOPPULLDOWN_IMAX
#endif
#if HAS_J_MAX
#define ENDSTOPPULLDOWN_JMAX
#endif
#if HAS_K_MAX
#define ENDSTOPPULLDOWN_KMAX
#endif
#if HAS_U_MAX
#define ENDSTOPPULLDOWN_UMAX
#endif
#if HAS_V_MAX
#define ENDSTOPPULLDOWN_VMAX
#endif
#if HAS_W_MAX
#define ENDSTOPPULLDOWN_WMAX
#endif
#if HAS_X_MIN
#define ENDSTOPPULLDOWN_XMIN
#endif
#if HAS_Y_MIN
#define ENDSTOPPULLDOWN_YMIN
#endif
#if HAS_Z_MIN_PIN
#define ENDSTOPPULLDOWN_ZMIN
#endif
#if HAS_I_MIN
#define ENDSTOPPULLDOWN_IMIN
#endif
#if HAS_J_MIN
#define ENDSTOPPULLDOWN_JMIN
#endif
#if HAS_K_MIN
#define ENDSTOPPULLDOWN_KMIN
#endif
#if HAS_U_MIN
#define ENDSTOPPULLDOWN_UMIN
#endif
#if HAS_V_MIN
#define ENDSTOPPULLDOWN_VMIN
#endif
#if HAS_W_MIN
#define ENDSTOPPULLDOWN_WMIN
#endif
#endif

/**
* Shorthand for pin tests, used wherever needed
*/
Expand Down Expand Up @@ -2207,6 +2087,112 @@

#undef _HAS_STOP

/**
* Set ENDSTOPPULLUPS for active endstop switches
*/
#if ENABLED(ENDSTOPPULLUPS)
#if HAS_X_MIN
#define ENDSTOPPULLUP_XMIN
#endif
#if HAS_X_MAX
#define ENDSTOPPULLUP_XMAX
#endif
#if HAS_Y_MIN
#define ENDSTOPPULLUP_YMIN
#elif HAS_Y_MAX
#define ENDSTOPPULLUP_YMAX
#endif
#if HAS_Z_MIN_PIN
#define ENDSTOPPULLUP_ZMIN
#endif
#if HAS_Z_MAX
#define ENDSTOPPULLUP_ZMAX
#endif
#if HAS_I_MIN
#define ENDSTOPPULLUP_IMIN
#elif HAS_I_MAX
#define ENDSTOPPULLUP_IMAX
#endif
#if HAS_J_MIN
#define ENDSTOPPULLUP_JMIN
#elif HAS_J_MAX
#define ENDSTOPPULLUP_JMAX
#endif
#if HAS_K_MIN
#define ENDSTOPPULLUP_KMIN
#elif HAS_K_MAX
#define ENDSTOPPULLUP_KMAX
#endif
#if HAS_U_MIN
#define ENDSTOPPULLUP_UMIN
#elif HAS_U_MAX
#define ENDSTOPPULLUP_UMAX
#endif
#if HAS_V_MIN
#define ENDSTOPPULLUP_VMIN
#elif HAS_V_MAX
#define ENDSTOPPULLUP_VMAX
#endif
#if HAS_W_MIN
#define ENDSTOPPULLUP_WMIN
#elif HAS_W_MAX
#define ENDSTOPPULLUP_WMAX
#endif
#endif

/**
* Set ENDSTOPPULLDOWNS for active endstop switches
*/
#if ENABLED(ENDSTOPPULLDOWNS)
#if HAS_X_MIN
#define ENDSTOPPULLDOWN_XMIN
#endif
#if HAS_X_MAX
#define ENDSTOPPULLDOWN_XMAX
#endif
#if HAS_Y_MIN
#define ENDSTOPPULLDOWN_YMIN
#elif HAS_Y_MAX
#define ENDSTOPPULLDOWN_YMAX
#endif
#if HAS_Z_MIN_PIN
#define ENDSTOPPULLDOWN_ZMIN
#endif
#if HAS_Z_MAX
#define ENDSTOPPULLDOWN_ZMAX
#endif
#if HAS_I_MIN
#define ENDSTOPPULLDOWN_IMIN
#elif HAS_I_MAX
#define ENDSTOPPULLDOWN_IMAX
#endif
#if HAS_J_MIN
#define ENDSTOPPULLDOWN_JMIN
#elif HAS_J_MAX
#define ENDSTOPPULLDOWN_JMAX
#endif
#if HAS_K_MIN
#define ENDSTOPPULLDOWN_KMIN
#elif HAS_K_MAX
#define ENDSTOPPULLDOWN_KMAX
#endif
#if HAS_U_MIN
#define ENDSTOPPULLDOWN_UMIN
#elif HAS_U_MAX
#define ENDSTOPPULLDOWN_UMAX
#endif
#if HAS_V_MIN
#define ENDSTOPPULLDOWN_VMIN
#elif HAS_V_MAX
#define ENDSTOPPULLDOWN_VMAX
#endif
#if HAS_W_MIN
#define ENDSTOPPULLDOWN_WMIN
#elif HAS_W_MAX
#define ENDSTOPPULLDOWN_WMAX
#endif
#endif

//
// ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface)
//
Expand Down

0 comments on commit 7d95928

Please sign in to comment.