Skip to content

Commit 216df60

Browse files
committed
use a flag
1 parent e6fb5b2 commit 216df60

File tree

3 files changed

+29
-27
lines changed

3 files changed

+29
-27
lines changed

Marlin/src/inc/Conditionals_LCD.h

-26
Original file line numberDiff line numberDiff line change
@@ -1068,32 +1068,6 @@
10681068
#ifndef Z_PROBE_SERVO_NR
10691069
#define Z_PROBE_SERVO_NR 0
10701070
#endif
1071-
#ifdef DEACTIVATE_SERVOS_AFTER_MOVE
1072-
#error "BLTOUCH requires DEACTIVATE_SERVOS_AFTER_MOVE to be to disabled. Please update your Configuration.h file."
1073-
#endif
1074-
1075-
// Always disable probe pin inverting for BLTouch
1076-
#if !MB(K8400)
1077-
#if Z_MIN_PROBE_ENDSTOP_INVERTING
1078-
#error "BLTOUCH requires Z_MIN_PROBE_ENDSTOP_INVERTING set to false. Please update your Configuration.h file."
1079-
#endif
1080-
#else // Special case for BOARD_K8400
1081-
#if !Z_MIN_PROBE_ENDSTOP_INVERTING
1082-
#error "BLTOUCH requires Z_MIN_PROBE_ENDSTOP_INVERTING set to true. Please update your Configuration.h file."
1083-
#endif
1084-
#endif
1085-
1086-
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
1087-
#if !MB(K8400)
1088-
#if Z_MIN_ENDSTOP_INVERTING
1089-
#error "BLTOUCH requires Z_MIN_ENDSTOP_INVERTING set to false. Please update your Configuration.h file."
1090-
#endif
1091-
#else // Special case for BOARD_K8400, Endstops are electronically inverted
1092-
#if !Z_MIN_ENDSTOP_INVERTING
1093-
#error "BLTOUCH requires Z_MIN_ENDSTOP_INVERTING set to true. Please update your Configuration.h file."
1094-
#endif
1095-
#endif
1096-
#endif
10971071
#endif
10981072

10991073
/**

Marlin/src/inc/SanityCheck.h

+25-1
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,31 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
17771777
#if BLTOUCH_DELAY < 200
17781778
#error "BLTOUCH_DELAY less than 200 is unsafe and is not supported."
17791779
#endif
1780-
#endif
1780+
1781+
#ifdef DEACTIVATE_SERVOS_AFTER_MOVE
1782+
#error "BLTOUCH requires DEACTIVATE_SERVOS_AFTER_MOVE to be to disabled. Please update your Configuration.h file."
1783+
#endif
1784+
1785+
// BLTouch requires a particular Z_MIN_PROBE_ENDSTOP_INVERTING setting
1786+
#if HAS_INVERTED_PROBE
1787+
#if !Z_MIN_PROBE_ENDSTOP_INVERTING
1788+
#error "BLTOUCH requires Z_MIN_PROBE_ENDSTOP_INVERTING set to true."
1789+
#endif
1790+
#elif Z_MIN_PROBE_ENDSTOP_INVERTING
1791+
#error "BLTOUCH requires Z_MIN_PROBE_ENDSTOP_INVERTING set to false."
1792+
#endif
1793+
1794+
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
1795+
#if HAS_INVERTED_PROBE
1796+
#if !Z_MIN_ENDSTOP_INVERTING
1797+
#error "BLTOUCH requires Z_MIN_ENDSTOP_INVERTING set to true."
1798+
#endif
1799+
#elif Z_MIN_ENDSTOP_INVERTING
1800+
#error "BLTOUCH requires Z_MIN_ENDSTOP_INVERTING set to false."
1801+
#endif
1802+
#endif
1803+
1804+
#endif // BLTOUCH
17811805

17821806
#if ENABLED(RACK_AND_PINION_PROBE) && !(defined(Z_PROBE_DEPLOY_X) && defined(Z_PROBE_RETRACT_X))
17831807
#error "RACK_AND_PINION_PROBE requires Z_PROBE_DEPLOY_X and Z_PROBE_RETRACT_X."

Marlin/src/pins/ramps/pins_K8400.h

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
#define X_STOP_PIN 3
5151
#define Y_STOP_PIN 14
5252

53+
#if ENABLED(BLTOUCH)
54+
#define HAS_INVERTED_PROBE
55+
#endif
56+
5357
#include "pins_3DRAG.h" // ... RAMPS
5458

5559
//

0 commit comments

Comments
 (0)