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

5v tolerance check logic error #23823

Merged
merged 2 commits into from
Mar 1, 2022
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
10 changes: 7 additions & 3 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -1572,10 +1572,14 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#else
#define _IS_5V_TOLERANT(P) 1 // Assume 5V tolerance
#endif
#if USES_Z_MIN_PROBE_PIN && !_IS_5V_TOLERANT(Z_MIN_PROBE_PIN)
#error "BLTOUCH_SET_5V_MODE is not compatible with the Z_MIN_PROBE_PIN."
#if USES_Z_MIN_PROBE_PIN
#if !_IS_5V_TOLERANT(Z_MIN_PROBE_PIN)
#error "BLTOUCH_SET_5V_MODE is not compatible with the Z_MIN_PROBE_PIN."
#endif
#elif !_IS_5V_TOLERANT(Z_MIN_PIN)
#error "BLTOUCH_SET_5V_MODE is not compatible with the Z_MIN_PIN."
#if !MB(CHITU3D_V6)
Copy link
Member

@thinkyhead thinkyhead Mar 1, 2022

Choose a reason for hiding this comment

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

Maybe this should check that Z_MIN_PIN is still equal to PG9, in case it was overridden. … Unless all pins are 5V tolerant on this board, of course.

#error "BLTOUCH_SET_5V_MODE is not compatible with the Z_MIN_PIN."
#endif
#endif
#undef _IS_5V_TOLERANT
#undef _5V
Expand Down