Skip to content

Commit

Permalink
馃帹 Define Octopus allocated endstop pins (MarlinFirmware#22882)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
  • Loading branch information
ellensp and thinkyhead committed Oct 13, 2021
1 parent d137f30 commit 036f763
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

//
// Servos
//
#define SERVO0_PIN PB6

//
Expand All @@ -56,12 +57,30 @@
#define E2_DIAG_PIN PG14 // E2DET
#define E3_DIAG_PIN PG15 // E3DET

//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN PB7
#endif

//
// Check for additional used endstop pins
//
#if HAS_EXTRA_ENDSTOPS
#define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES
#if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_)
#define NEEDS_X_MINMAX 1
#endif
#if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_)
#define NEEDS_Y_MINMAX 1
#endif
#if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_)
#define NEEDS_Z_MINMAX 1
#endif
#undef _ENDSTOP_IS_ANY
#endif

//
// Limit Switches
//
Expand All @@ -72,7 +91,7 @@
#else
#define X_MIN_PIN E0_DIAG_PIN // E0DET
#endif
#elif EITHER(X_DUAL_ENDSTOPS, DUAL_X_CARRIAGE)
#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX)
#ifndef X_MIN_PIN
#define X_MIN_PIN X_DIAG_PIN // X-STOP
#endif
Expand All @@ -90,7 +109,7 @@
#else
#define Y_MIN_PIN E1_DIAG_PIN // E1DET
#endif
#elif ENABLED(Y_DUAL_ENDSTOPS)
#elif NEEDS_Y_MINMAX
#ifndef Y_MIN_PIN
#define Y_MIN_PIN Y_DIAG_PIN // Y-STOP
#endif
Expand All @@ -108,7 +127,7 @@
#else
#define Z_MIN_PIN E2_DIAG_PIN // PWRDET
#endif
#elif ENABLED(Z_MULTI_ENDSTOPS)
#elif NEEDS_Z_MINMAX
#ifndef Z_MIN_PIN
#define Z_MIN_PIN Z_DIAG_PIN // Z-STOP
#endif
Expand All @@ -119,6 +138,10 @@
#define Z_STOP_PIN Z_DIAG_PIN // Z-STOP
#endif

#undef NEEDS_X_MINMAX
#undef NEEDS_Y_MINMAX
#undef NEEDS_Z_MINMAX

//
// Filament Runout Sensor
//
Expand Down

0 comments on commit 036f763

Please sign in to comment.