瀏覽代碼

Merge pull request #4517 from thinkyhead/rc_min_probe_pin

Define Z_MIN_PROBE_PIN always, allowing override
Scott Lahteine 8 年之前
父節點
當前提交
bd7a96ed42
共有 7 個檔案被更改,包括 44 行新增53 行删除
  1. 9
    12
      Marlin/SanityCheck.h
  2. 2
    6
      Marlin/pins_AZTEEG_X3_PRO.h
  3. 7
    4
      Marlin/pins_BRAINWAVE_PRO.h
  4. 10
    6
      Marlin/pins_RAMBO.h
  5. 11
    12
      Marlin/pins_RAMPS.h
  6. 4
    11
      Marlin/pins_RIGIDBOARD.h
  7. 1
    2
      Marlin/pins_RUMBA.h

+ 9
- 12
Marlin/SanityCheck.h 查看文件

270
   #endif
270
   #endif
271
 
271
 
272
   /**
272
   /**
273
-   * Z_MIN_PIN and Z_MIN_PROBE_PIN can't co-exist when Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
273
+   * Require a Z min pin
274
    */
274
    */
275
-  #if HAS_Z_MIN && HAS_Z_MIN_PROBE_PIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
276
-    #error "A probe cannot have more than one pin! Use Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN or Z_MIN_PROBE_PIN."
275
+  #if HAS_Z_MIN
276
+     // Z_MIN_PIN and Z_MIN_PROBE_PIN can't co-exist when Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
277
+    #if HAS_Z_MIN_PROBE_PIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
278
+      #error "A probe cannot have more than one pin! Use Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN or Z_MIN_PROBE_PIN."
279
+    #endif
280
+  #elif !HAS_Z_MIN_PROBE_PIN || (DISABLED(Z_MIN_PROBE_ENDSTOP) || ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP))
281
+    // A pin was set for the Z probe, but not enabled.
282
+    #error "A probe requires a Z_MIN or Z_PROBE pin. Z_MIN_PIN or Z_MIN_PROBE_PIN must point to a valid hardware pin."
277
   #endif
283
   #endif
278
 
284
 
279
   /**
285
   /**
385
   #endif
391
   #endif
386
 
392
 
387
   /**
393
   /**
388
-   * Require a Z min pin
389
-   */
390
-  #if !PIN_EXISTS(Z_MIN)
391
-    #if !PIN_EXISTS(Z_MIN_PROBE) || (DISABLED(Z_MIN_PROBE_ENDSTOP) || ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)) // It's possible for someone to set a pin for the Z probe, but not enable it.
392
-      #error "AUTO_BED_LEVELING_FEATURE requires a Z_MIN or Z_PROBE endstop. Z_MIN_PIN or Z_MIN_PROBE_PIN must point to a valid hardware pin."
393
-    #endif
394
-  #endif
395
-
396
-  /**
397
    * Check if Probe_Offset * Grid Points is greater than Probing Range
394
    * Check if Probe_Offset * Grid Points is greater than Probing Range
398
    */
395
    */
399
   #if ENABLED(AUTO_BED_LEVELING_GRID)
396
   #if ENABLED(AUTO_BED_LEVELING_GRID)

+ 2
- 6
Marlin/pins_AZTEEG_X3_PRO.h 查看文件

60
   #define Z_MAX_PIN        18
60
   #define Z_MAX_PIN        18
61
 #endif
61
 #endif
62
 
62
 
63
-
64
-#if ENABLED(Z_MIN_PROBE_ENDSTOP)
65
-  //#undef Z_MIN_PIN
66
-  //#define Z_MIN_PIN        15
67
-  // Define a pin to use as the signal pin on Arduino for the Z probe endstop.
63
+#ifndef Z_MIN_PROBE_PIN
68
   #define Z_MIN_PROBE_PIN  19
64
   #define Z_MIN_PROBE_PIN  19
69
 #endif
65
 #endif
70
-//
66
+
71
 #define E2_STEP_PIN        23
67
 #define E2_STEP_PIN        23
72
 #define E2_DIR_PIN         25
68
 #define E2_DIR_PIN         25
73
 #define E2_ENABLE_PIN      40
69
 #define E2_ENABLE_PIN      40

+ 7
- 4
Marlin/pins_BRAINWAVE_PRO.h 查看文件

41
 
41
 
42
 #define LARGE_FLASH        true
42
 #define LARGE_FLASH        true
43
 
43
 
44
+#define X_STOP_PIN         47
45
+#define Y_STOP_PIN         18
46
+#define Z_MAX_PIN          36
47
+#ifndef Z_MIN_PROBE_PIN
48
+  #define Z_MIN_PROBE_PIN  17
49
+#endif
50
+
44
 #define X_STEP_PIN         33
51
 #define X_STEP_PIN         33
45
 #define X_DIR_PIN          32
52
 #define X_DIR_PIN          32
46
 #define X_ENABLE_PIN       11
53
 #define X_ENABLE_PIN       11
47
-#define X_STOP_PIN         47
48
 
54
 
49
 #define Y_STEP_PIN         31
55
 #define Y_STEP_PIN         31
50
 #define Y_DIR_PIN          30
56
 #define Y_DIR_PIN          30
51
 #define Y_ENABLE_PIN        8
57
 #define Y_ENABLE_PIN        8
52
-#define Y_STOP_PIN         18
53
 
58
 
54
 #define Z_STEP_PIN         29
59
 #define Z_STEP_PIN         29
55
 #define Z_DIR_PIN          28
60
 #define Z_DIR_PIN          28
56
 #define Z_ENABLE_PIN       37
61
 #define Z_ENABLE_PIN       37
57
-#define Z_MAX_PIN          36
58
-#define Z_MIN_PROBE_PIN    17  // Bed Z probe
59
 
62
 
60
 #define E0_STEP_PIN        35
63
 #define E0_STEP_PIN        35
61
 #define E0_DIR_PIN         34
64
 #define E0_DIR_PIN         34

+ 10
- 6
Marlin/pins_RAMBO.h 查看文件

42
   #define SLED_PIN         -1
42
   #define SLED_PIN         -1
43
 #endif
43
 #endif
44
 
44
 
45
-#define X_STEP_PIN 37
46
-#define X_DIR_PIN 48
47
 #define X_MIN_PIN 12
45
 #define X_MIN_PIN 12
48
 #define X_MAX_PIN 24
46
 #define X_MAX_PIN 24
47
+#define Y_MIN_PIN 11
48
+#define Y_MAX_PIN 23
49
+#define Z_MIN_PIN 10
50
+#define Z_MAX_PIN 30
51
+#ifndef Z_MIN_PROBE_PIN
52
+  #define Z_MIN_PROBE_PIN 10
53
+#endif
54
+
55
+#define X_STEP_PIN 37
56
+#define X_DIR_PIN 48
49
 #define X_ENABLE_PIN 29
57
 #define X_ENABLE_PIN 29
50
 #define X_MS1_PIN 40
58
 #define X_MS1_PIN 40
51
 #define X_MS2_PIN 41
59
 #define X_MS2_PIN 41
52
 
60
 
53
 #define Y_STEP_PIN 36
61
 #define Y_STEP_PIN 36
54
 #define Y_DIR_PIN 49
62
 #define Y_DIR_PIN 49
55
-#define Y_MIN_PIN 11
56
-#define Y_MAX_PIN 23
57
 #define Y_ENABLE_PIN 28
63
 #define Y_ENABLE_PIN 28
58
 #define Y_MS1_PIN 69
64
 #define Y_MS1_PIN 69
59
 #define Y_MS2_PIN 39
65
 #define Y_MS2_PIN 39
60
 
66
 
61
 #define Z_STEP_PIN 35
67
 #define Z_STEP_PIN 35
62
 #define Z_DIR_PIN 47
68
 #define Z_DIR_PIN 47
63
-#define Z_MIN_PIN 10
64
-#define Z_MAX_PIN 30
65
 #define Z_ENABLE_PIN 27
69
 #define Z_ENABLE_PIN 27
66
 #define Z_MS1_PIN 68
70
 #define Z_MS1_PIN 68
67
 #define Z_MS2_PIN 67
71
 #define Z_MS2_PIN 67

+ 11
- 12
Marlin/pins_RAMPS.h 查看文件

63
 #define SERVO2_PIN          5
63
 #define SERVO2_PIN          5
64
 #define SERVO3_PIN          4
64
 #define SERVO3_PIN          4
65
 
65
 
66
-#define X_STEP_PIN         54
67
-#define X_DIR_PIN          55
68
-#define X_ENABLE_PIN       38
69
 #define X_MIN_PIN           3
66
 #define X_MIN_PIN           3
70
 #ifndef X_MAX_PIN
67
 #ifndef X_MAX_PIN
71
   #define X_MAX_PIN         2
68
   #define X_MAX_PIN         2
72
 #endif
69
 #endif
70
+#define Y_MIN_PIN          14
71
+#define Y_MAX_PIN          15
72
+#define Z_MIN_PIN          18
73
+#define Z_MAX_PIN          19
74
+#ifndef Z_MIN_PROBE_PIN
75
+  #define Z_MIN_PROBE_PIN  32
76
+#endif
77
+
78
+#define X_STEP_PIN         54
79
+#define X_DIR_PIN          55
80
+#define X_ENABLE_PIN       38
73
 
81
 
74
 #define Y_STEP_PIN         60
82
 #define Y_STEP_PIN         60
75
 #define Y_DIR_PIN          61
83
 #define Y_DIR_PIN          61
76
 #define Y_ENABLE_PIN       56
84
 #define Y_ENABLE_PIN       56
77
-#define Y_MIN_PIN          14
78
-#define Y_MAX_PIN          15
79
 
85
 
80
 #define Z_STEP_PIN         46
86
 #define Z_STEP_PIN         46
81
 #define Z_DIR_PIN          48
87
 #define Z_DIR_PIN          48
82
 #define Z_ENABLE_PIN       62
88
 #define Z_ENABLE_PIN       62
83
-#define Z_MIN_PIN          18
84
-#define Z_MAX_PIN          19
85
 
89
 
86
 #define E0_STEP_PIN        26
90
 #define E0_STEP_PIN        26
87
 #define E0_DIR_PIN         28
91
 #define E0_DIR_PIN         28
97
 // Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
101
 // Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
98
 #define FILWIDTH_PIN        5 // ANALOG NUMBERING
102
 #define FILWIDTH_PIN        5 // ANALOG NUMBERING
99
 
103
 
100
-#if ENABLED(Z_MIN_PROBE_ENDSTOP)
101
-  // Define a pin to use as the signal pin on Arduino for the Z_PROBE endstop.
102
-  #define Z_MIN_PROBE_PIN  32
103
-#endif
104
-
105
 // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
104
 // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
106
 #define FIL_RUNOUT_PIN      4
105
 #define FIL_RUNOUT_PIN      4
107
 
106
 

+ 4
- 11
Marlin/pins_RIGIDBOARD.h 查看文件

24
  * RIGIDBOARD Arduino Mega with RAMPS v1.4 pin assignments
24
  * RIGIDBOARD Arduino Mega with RAMPS v1.4 pin assignments
25
  */
25
  */
26
 
26
 
27
-#include "pins_RAMPS.h"
28
-
29
-#undef BOARD_NAME
30
 #define BOARD_NAME "RigidBoard"
27
 #define BOARD_NAME "RigidBoard"
31
 
28
 
32
-#if ENABLED(Z_MIN_PROBE_ENDSTOP)
33
-  #undef Z_MAX_PIN
34
-  #define Z_MAX_PIN -1
35
-  #undef Z_MIN_PROBE_PIN
29
+#define RAMPS_D10_PIN       9    // EXTRUDER 1
30
+#define MOSFET_D_PIN       12    // EXTRUDER 2 or FAN
31
+#ifndef Z_MIN_PROBE_PIN
36
   #define Z_MIN_PROBE_PIN  19    // Z-MAX pin J14 End Stops
32
   #define Z_MIN_PROBE_PIN  19    // Z-MAX pin J14 End Stops
37
 #endif
33
 #endif
38
 
34
 
39
-#undef HEATER_0_PIN
40
-#undef HEATER_1_PIN
41
-#define HEATER_0_PIN        9    // EXTRUDER 1
42
-#define HEATER_1_PIN       12    // EXTRUDER 2 (FAN On Sprinter)
35
+#include "pins_RAMPS.h"
43
 
36
 
44
 #undef TEMP_0_PIN
37
 #undef TEMP_0_PIN
45
 #undef TEMP_1_PIN
38
 #undef TEMP_1_PIN

+ 1
- 2
Marlin/pins_RUMBA.h 查看文件

53
 #define Z_MIN_PIN          33
53
 #define Z_MIN_PIN          33
54
 #define Z_MAX_PIN          32
54
 #define Z_MAX_PIN          32
55
 
55
 
56
-#if ENABLED(Z_MIN_PROBE_ENDSTOP)
57
-  // Define a pin to use as the signal pin on Arduino for the Z probe endstop.
56
+#ifndef Z_MIN_PROBE_PIN
58
   #define Z_MIN_PROBE_PIN  33
57
   #define Z_MIN_PROBE_PIN  33
59
 #endif
58
 #endif
60
 
59
 

Loading…
取消
儲存