Skip to content

Commit fd9f280

Browse files
ellenspimp67
authored andcommitted
🩹 Inverted probe pin flag (K8400) (MarlinFirmware#25085)
1 parent 1ce38ba commit fd9f280

File tree

3 files changed

+44
-18
lines changed

3 files changed

+44
-18
lines changed

Marlin/src/inc/Conditionals_LCD.h

-14
Original file line numberDiff line numberDiff line change
@@ -1069,20 +1069,6 @@
10691069
#ifndef Z_PROBE_SERVO_NR
10701070
#define Z_PROBE_SERVO_NR 0
10711071
#endif
1072-
#ifdef DEACTIVATE_SERVOS_AFTER_MOVE
1073-
#error "BLTOUCH requires DEACTIVATE_SERVOS_AFTER_MOVE to be to disabled. Please update your Configuration.h file."
1074-
#endif
1075-
1076-
// Always disable probe pin inverting for BLTouch
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-
1081-
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
1082-
#if Z_MIN_ENDSTOP_INVERTING
1083-
#error "BLTOUCH requires Z_MIN_ENDSTOP_INVERTING set to false. Please update your Configuration.h file."
1084-
#endif
1085-
#endif
10861072
#endif
10871073

10881074
/**

Marlin/src/inc/SanityCheck.h

+40-4
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,29 @@ 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+
#if HAS_INVERTED_PROBE
1786+
#if !Z_MIN_PROBE_ENDSTOP_INVERTING
1787+
#error "BLTOUCH requires Z_MIN_PROBE_ENDSTOP_INVERTING set to true."
1788+
#endif
1789+
#elif Z_MIN_PROBE_ENDSTOP_INVERTING
1790+
#error "BLTOUCH requires Z_MIN_PROBE_ENDSTOP_INVERTING set to false."
1791+
#endif
1792+
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
1793+
#if HAS_INVERTED_PROBE
1794+
#if !Z_MIN_ENDSTOP_INVERTING
1795+
#error "BLTOUCH requires Z_MIN_ENDSTOP_INVERTING set to true."
1796+
#endif
1797+
#elif Z_MIN_ENDSTOP_INVERTING
1798+
#error "BLTOUCH requires Z_MIN_ENDSTOP_INVERTING set to false."
1799+
#endif
1800+
#endif
1801+
1802+
#endif // BLTOUCH
17811803

17821804
#if ENABLED(RACK_AND_PINION_PROBE) && !(defined(Z_PROBE_DEPLOY_X) && defined(Z_PROBE_RETRACT_X))
17831805
#error "RACK_AND_PINION_PROBE requires Z_PROBE_DEPLOY_X and Z_PROBE_RETRACT_X."
@@ -1795,14 +1817,28 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
17951817
#error "TOUCH_MI_PROBE requires Z_AFTER_PROBING to be disabled."
17961818
#elif Z_HOMING_HEIGHT < 10
17971819
#error "TOUCH_MI_PROBE requires Z_HOMING_HEIGHT >= 10."
1798-
#elif Z_MIN_PROBE_ENDSTOP_INVERTING
1799-
#error "TOUCH_MI_PROBE requires Z_MIN_PROBE_ENDSTOP_INVERTING to be set to false."
18001820
#elif DISABLED(BABYSTEP_ZPROBE_OFFSET)
18011821
#error "TOUCH_MI_PROBE requires BABYSTEPPING with BABYSTEP_ZPROBE_OFFSET."
18021822
#elif !HAS_RESUME_CONTINUE
18031823
#error "TOUCH_MI_PROBE currently requires an LCD controller or EMERGENCY_PARSER."
18041824
#endif
1805-
#endif
1825+
#if HAS_INVERTED_PROBE
1826+
#if !Z_MIN_PROBE_ENDSTOP_INVERTING
1827+
#error "TOUCH_MI_PROBE requires Z_MIN_PROBE_ENDSTOP_INVERTING set to true."
1828+
#endif
1829+
#elif Z_MIN_PROBE_ENDSTOP_INVERTING
1830+
#error "TOUCH_MI_PROBE requires Z_MIN_PROBE_ENDSTOP_INVERTING set to false."
1831+
#endif
1832+
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
1833+
#if HAS_INVERTED_PROBE
1834+
#if !Z_MIN_ENDSTOP_INVERTING
1835+
#error "TOUCH_MI_PROBE requires Z_MIN_ENDSTOP_INVERTING set to true."
1836+
#endif
1837+
#elif Z_MIN_ENDSTOP_INVERTING
1838+
#error "TOUCH_MI_PROBE requires Z_MIN_ENDSTOP_INVERTING set to false."
1839+
#endif
1840+
#endif
1841+
#endif // TOUCH_MI_PROBE
18061842

18071843
/**
18081844
* Mag mounted probe requirements

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 EITHER(BLTOUCH, TOUCH_MI_PROBE)
54+
#define HAS_INVERTED_PROBE
55+
#endif
56+
5357
#include "pins_3DRAG.h" // ... RAMPS
5458

5559
//

0 commit comments

Comments
 (0)