Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define allocated endstop pins on Octopus #22882

Merged
merged 10 commits into from
Oct 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

thinkyhead marked this conversation as resolved.
Show resolved Hide resolved
//
// 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