Explorar el Código

🔧 HAS_CUSTOM_PROBE_PIN => USES_Z_MIN_PROBE_PIN

Scott Lahteine hace 3 años
padre
commit
363e83731f

+ 2
- 2
Marlin/src/HAL/LPC1768/inc/SanityCheck.h Ver fichero

@@ -146,7 +146,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
146 146
     #error "Serial port pins (2) conflict with other pins!"
147 147
   #elif Y_HOME_TO_MIN && IS_TX2(Y_STOP_PIN)
148 148
     #error "Serial port pins (2) conflict with Y endstop pin!"
149
-  #elif HAS_CUSTOM_PROBE_PIN && IS_TX2(Z_MIN_PROBE_PIN)
149
+  #elif USES_Z_MIN_PROBE_PIN && IS_TX2(Z_MIN_PROBE_PIN)
150 150
     #error "Serial port pins (2) conflict with probe pin!"
151 151
   #elif ANY_TX(2, X_ENABLE_PIN, Y_ENABLE_PIN) || ANY_RX(2, X_DIR_PIN, Y_DIR_PIN)
152 152
     #error "Serial port pins (2) conflict with X/Y stepper pins!"
@@ -237,7 +237,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
237 237
     #define PIN_IS_SCL2(P) (P##_PIN == P0_11)
238 238
     #if PIN_IS_SDA2(Y_STOP)
239 239
       #error "i2c SDA2 overlaps with Y endstop pin!"
240
-    #elif HAS_CUSTOM_PROBE_PIN && PIN_IS_SDA2(Z_MIN_PROBE)
240
+    #elif USES_Z_MIN_PROBE_PIN && PIN_IS_SDA2(Z_MIN_PROBE)
241 241
       #error "i2c SDA2 overlaps with Z probe pin!"
242 242
     #elif PIN_IS_SDA2(X_ENABLE) || PIN_IS_SDA2(Y_ENABLE)
243 243
       #error "i2c SDA2 overlaps with X/Y ENABLE pin!"

+ 2
- 2
Marlin/src/inc/Conditionals_LCD.h Ver fichero

@@ -911,9 +911,9 @@
911 911
     #define HAS_PROBE_XY_OFFSET 1
912 912
   #endif
913 913
   #if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && !BOTH(DELTA, SENSORLESS_PROBING)
914
-    #define HAS_CUSTOM_PROBE_PIN 1
914
+    #define USES_Z_MIN_PROBE_PIN 1
915 915
   #endif
916
-  #if Z_HOME_TO_MIN && (!HAS_CUSTOM_PROBE_PIN || ENABLED(USE_PROBE_FOR_Z_HOMING))
916
+  #if Z_HOME_TO_MIN && (!USES_Z_MIN_PROBE_PIN || ENABLED(USE_PROBE_FOR_Z_HOMING))
917 917
     #define HOMING_Z_WITH_PROBE 1
918 918
   #endif
919 919
   #ifndef Z_PROBE_LOW_POINT

+ 2
- 2
Marlin/src/inc/Conditionals_post.h Ver fichero

@@ -2092,7 +2092,7 @@
2092 2092
 //
2093 2093
 
2094 2094
 // Is an endstop plug used for extra Z endstops or the probe?
2095
-#define IS_PROBE_PIN(A,M) (HAS_CUSTOM_PROBE_PIN && Z_MIN_PROBE_PIN == A##_##M##_PIN)
2095
+#define IS_PROBE_PIN(A,M) (USES_Z_MIN_PROBE_PIN && Z_MIN_PROBE_PIN == A##_##M##_PIN)
2096 2096
 #define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_)
2097 2097
 #define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_)
2098 2098
 #define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_)
@@ -2166,7 +2166,7 @@
2166 2166
 #if PIN_EXISTS(Z4_MAX)
2167 2167
   #define HAS_Z4_MAX 1
2168 2168
 #endif
2169
-#if BOTH(HAS_BED_PROBE, HAS_CUSTOM_PROBE_PIN) && PIN_EXISTS(Z_MIN_PROBE)
2169
+#if BOTH(HAS_BED_PROBE, USES_Z_MIN_PROBE_PIN) && PIN_EXISTS(Z_MIN_PROBE)
2170 2170
   #define HAS_Z_MIN_PROBE_PIN 1
2171 2171
 #endif
2172 2172
 

+ 8
- 8
Marlin/src/module/endstops.cpp Ver fichero

@@ -329,7 +329,7 @@ void Endstops::init() {
329 329
     #endif
330 330
   #endif
331 331
 
332
-  #if HAS_CUSTOM_PROBE_PIN
332
+  #if USES_Z_MIN_PROBE_PIN
333 333
     #if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE)
334 334
       SET_INPUT_PULLUP(Z_MIN_PROBE_PIN);
335 335
     #elif ENABLED(ENDSTOPPULLDOWN_ZMIN_PROBE)
@@ -453,7 +453,7 @@ void Endstops::event_handler() {
453 453
       _ENDSTOP_HIT_TEST(K,'K')
454 454
     );
455 455
 
456
-    #if HAS_CUSTOM_PROBE_PIN
456
+    #if USES_Z_MIN_PROBE_PIN
457 457
       #define P_AXIS Z_AXIS
458 458
       if (TEST(hit_state, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P');
459 459
     #endif
@@ -566,7 +566,7 @@ void _O2 Endstops::report_states() {
566 566
   #if BOTH(MARLIN_DEV_MODE, PROBE_ACTIVATION_SWITCH)
567 567
     print_es_state(probe_switch_activated(), PSTR(STR_PROBE_EN));
568 568
   #endif
569
-  #if HAS_CUSTOM_PROBE_PIN
569
+  #if USES_Z_MIN_PROBE_PIN
570 570
     print_es_state(PROBE_TRIGGERED(), PSTR(STR_Z_PROBE));
571 571
   #endif
572 572
   #if MULTI_FILAMENT_SENSOR
@@ -720,7 +720,7 @@ void Endstops::update() {
720 720
   #if HAS_BED_PROBE
721 721
     // When closing the gap check the enabled probe
722 722
     if (probe_switch_activated())
723
-      UPDATE_ENDSTOP_BIT(Z, TERN(HAS_CUSTOM_PROBE_PIN, MIN_PROBE, MIN));
723
+      UPDATE_ENDSTOP_BIT(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN));
724 724
   #endif
725 725
 
726 726
   #if HAS_Z_MAX && !Z_SPI_SENSORLESS
@@ -746,7 +746,7 @@ void Endstops::update() {
746 746
           COPY_LIVE_STATE(Z_MAX, Z4_MAX);
747 747
         #endif
748 748
       #endif
749
-    #elif !HAS_CUSTOM_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN
749
+    #elif !USES_Z_MIN_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN
750 750
       // If this pin isn't the bed probe it's the Z endstop
751 751
       UPDATE_ENDSTOP_BIT(Z, MAX);
752 752
     #endif
@@ -1021,7 +1021,7 @@ void Endstops::update() {
1021 1021
 
1022 1022
         #if HAS_Z_MIN || (Z_SPI_SENSORLESS && Z_HOME_TO_MIN)
1023 1023
           if ( TERN1(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, z_probe_enabled)
1024
-            && TERN1(HAS_CUSTOM_PROBE_PIN, !z_probe_enabled)
1024
+            && TERN1(USES_Z_MIN_PROBE_PIN, !z_probe_enabled)
1025 1025
           ) PROCESS_ENDSTOP_Z(MIN);
1026 1026
           #if   CORE_DIAG(XZ, X, MIN)
1027 1027
             PROCESS_CORE_ENDSTOP(X,MIN,Z,MIN);
@@ -1035,7 +1035,7 @@ void Endstops::update() {
1035 1035
         #endif
1036 1036
 
1037 1037
         // When closing the gap check the enabled probe
1038
-        #if HAS_CUSTOM_PROBE_PIN
1038
+        #if USES_Z_MIN_PROBE_PIN
1039 1039
           if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN_PROBE);
1040 1040
         #endif
1041 1041
       }
@@ -1043,7 +1043,7 @@ void Endstops::update() {
1043 1043
         #if HAS_Z_MAX || (Z_SPI_SENSORLESS && Z_HOME_TO_MAX)
1044 1044
           #if ENABLED(Z_MULTI_ENDSTOPS)
1045 1045
             PROCESS_ENDSTOP_Z(MAX);
1046
-          #elif !HAS_CUSTOM_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN  // No probe or probe is Z_MIN || Probe is not Z_MAX
1046
+          #elif !USES_Z_MIN_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN  // No probe or probe is Z_MIN || Probe is not Z_MAX
1047 1047
             PROCESS_ENDSTOP(Z, MAX);
1048 1048
           #endif
1049 1049
           #if   CORE_DIAG(XZ, X, MIN)

+ 1
- 1
Marlin/src/module/endstops.h Ver fichero

@@ -69,7 +69,7 @@ enum EndstopEnum : char {
69 69
   #endif
70 70
 
71 71
   // Bed Probe state is distinct or shared with Z_MIN (i.e., when the probe is the only Z endstop)
72
-  _ES_ITEM(HAS_BED_PROBE, Z_MIN_PROBE IF_DISABLED(HAS_CUSTOM_PROBE_PIN, = Z_MIN))
72
+  _ES_ITEM(HAS_BED_PROBE, Z_MIN_PROBE IF_DISABLED(USES_Z_MIN_PROBE_PIN, = Z_MIN))
73 73
 
74 74
   // The total number of states
75 75
   NUM_ENDSTOP_STATES

+ 1
- 1
Marlin/src/module/probe.h Ver fichero

@@ -38,7 +38,7 @@
38 38
   };
39 39
 #endif
40 40
 
41
-#if HAS_CUSTOM_PROBE_PIN
41
+#if USES_Z_MIN_PROBE_PIN
42 42
   #define PROBE_TRIGGERED() (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING)
43 43
 #else
44 44
   #define PROBE_TRIGGERED() (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING)

+ 1
- 1
Marlin/src/pins/pins_postprocess.h Ver fichero

@@ -1134,7 +1134,7 @@
1134 1134
   #define USE_ZMIN_PLUG
1135 1135
 #endif
1136 1136
 #undef _STOP_IN_USE
1137
-#if !HAS_CUSTOM_PROBE_PIN
1137
+#if !USES_Z_MIN_PROBE_PIN
1138 1138
   #undef Z_MIN_PROBE_PIN
1139 1139
   #define Z_MIN_PROBE_PIN    -1
1140 1140
 #endif

+ 1
- 1
Marlin/src/pins/sam/pins_RURAMPS4D_11.h Ver fichero

@@ -117,7 +117,7 @@
117 117
 //#define E3_MS2_PIN         ?
118 118
 //#define E3_MS3_PIN         ?
119 119
 
120
-#if HAS_CUSTOM_PROBE_PIN
120
+#if USES_Z_MIN_PROBE_PIN
121 121
   #define Z_MIN_PROBE_PIN                     49
122 122
 #endif
123 123
 

+ 1
- 1
Marlin/src/pins/sam/pins_RURAMPS4D_13.h Ver fichero

@@ -105,7 +105,7 @@
105 105
   #define E2_CS_PIN                           61
106 106
 #endif
107 107
 
108
-#if HAS_CUSTOM_PROBE_PIN
108
+#if USES_Z_MIN_PROBE_PIN
109 109
   #define Z_MIN_PROBE_PIN                     49
110 110
 #endif
111 111
 

Loading…
Cancelar
Guardar