Browse Source

🔧 HAS_CUSTOM_PROBE_PIN => USES_Z_MIN_PROBE_PIN

Scott Lahteine 4 years ago
parent
commit
363e83731f

+ 2
- 2
Marlin/src/HAL/LPC1768/inc/SanityCheck.h View File

146
     #error "Serial port pins (2) conflict with other pins!"
146
     #error "Serial port pins (2) conflict with other pins!"
147
   #elif Y_HOME_TO_MIN && IS_TX2(Y_STOP_PIN)
147
   #elif Y_HOME_TO_MIN && IS_TX2(Y_STOP_PIN)
148
     #error "Serial port pins (2) conflict with Y endstop pin!"
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
     #error "Serial port pins (2) conflict with probe pin!"
150
     #error "Serial port pins (2) conflict with probe pin!"
151
   #elif ANY_TX(2, X_ENABLE_PIN, Y_ENABLE_PIN) || ANY_RX(2, X_DIR_PIN, Y_DIR_PIN)
151
   #elif ANY_TX(2, X_ENABLE_PIN, Y_ENABLE_PIN) || ANY_RX(2, X_DIR_PIN, Y_DIR_PIN)
152
     #error "Serial port pins (2) conflict with X/Y stepper pins!"
152
     #error "Serial port pins (2) conflict with X/Y stepper pins!"
237
     #define PIN_IS_SCL2(P) (P##_PIN == P0_11)
237
     #define PIN_IS_SCL2(P) (P##_PIN == P0_11)
238
     #if PIN_IS_SDA2(Y_STOP)
238
     #if PIN_IS_SDA2(Y_STOP)
239
       #error "i2c SDA2 overlaps with Y endstop pin!"
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
       #error "i2c SDA2 overlaps with Z probe pin!"
241
       #error "i2c SDA2 overlaps with Z probe pin!"
242
     #elif PIN_IS_SDA2(X_ENABLE) || PIN_IS_SDA2(Y_ENABLE)
242
     #elif PIN_IS_SDA2(X_ENABLE) || PIN_IS_SDA2(Y_ENABLE)
243
       #error "i2c SDA2 overlaps with X/Y ENABLE pin!"
243
       #error "i2c SDA2 overlaps with X/Y ENABLE pin!"

+ 2
- 2
Marlin/src/inc/Conditionals_LCD.h View File

911
     #define HAS_PROBE_XY_OFFSET 1
911
     #define HAS_PROBE_XY_OFFSET 1
912
   #endif
912
   #endif
913
   #if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && !BOTH(DELTA, SENSORLESS_PROBING)
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
   #endif
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
     #define HOMING_Z_WITH_PROBE 1
917
     #define HOMING_Z_WITH_PROBE 1
918
   #endif
918
   #endif
919
   #ifndef Z_PROBE_LOW_POINT
919
   #ifndef Z_PROBE_LOW_POINT

+ 2
- 2
Marlin/src/inc/Conditionals_post.h View File

2092
 //
2092
 //
2093
 
2093
 
2094
 // Is an endstop plug used for extra Z endstops or the probe?
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
 #define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_)
2096
 #define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_)
2097
 #define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_)
2097
 #define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_)
2098
 #define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_)
2098
 #define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_)
2166
 #if PIN_EXISTS(Z4_MAX)
2166
 #if PIN_EXISTS(Z4_MAX)
2167
   #define HAS_Z4_MAX 1
2167
   #define HAS_Z4_MAX 1
2168
 #endif
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
   #define HAS_Z_MIN_PROBE_PIN 1
2170
   #define HAS_Z_MIN_PROBE_PIN 1
2171
 #endif
2171
 #endif
2172
 
2172
 

+ 8
- 8
Marlin/src/module/endstops.cpp View File

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

+ 1
- 1
Marlin/src/module/endstops.h View File

69
   #endif
69
   #endif
70
 
70
 
71
   // Bed Probe state is distinct or shared with Z_MIN (i.e., when the probe is the only Z endstop)
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
   // The total number of states
74
   // The total number of states
75
   NUM_ENDSTOP_STATES
75
   NUM_ENDSTOP_STATES

+ 1
- 1
Marlin/src/module/probe.h View File

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

+ 1
- 1
Marlin/src/pins/pins_postprocess.h View File

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

+ 1
- 1
Marlin/src/pins/sam/pins_RURAMPS4D_11.h View File

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

+ 1
- 1
Marlin/src/pins/sam/pins_RURAMPS4D_13.h View File

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

Loading…
Cancel
Save