Преглед на файлове

Some renaming of Z_PROBE to Z_MIN_PROBE (PR#91)

* Fix a couple of renames omission and macro expansion errors.
Christian Lefrançois преди 9 години
родител
ревизия
a7822e3ff7

+ 2
- 2
Marlin/Conditionals.h Целия файл

@@ -239,7 +239,7 @@
239 239
       #define ENDSTOPPULLUP_ZMIN
240 240
     #endif
241 241
     #if DISABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)
242
-      #define ENDSTOPPULLUP_ZPROBE
242
+      #define ENDSTOPPULLUP_ZMIN_PROBE
243 243
     #endif
244 244
   #endif
245 245
 
@@ -447,7 +447,7 @@
447 447
   #define HAS_Z_MAX (PIN_EXISTS(Z_MAX))
448 448
   #define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN))
449 449
   #define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
450
-  #define HAS_Z_PROBE (PIN_EXISTS(Z_PROBE))
450
+  #define HAS_Z_PROBE (PIN_EXISTS(Z_MIN_PROBE))
451 451
   #define HAS_SOLENOID_1 (PIN_EXISTS(SOL1))
452 452
   #define HAS_SOLENOID_2 (PIN_EXISTS(SOL2))
453 453
   #define HAS_SOLENOID_3 (PIN_EXISTS(SOL3))

+ 1
- 1
Marlin/Marlin.h Целия файл

@@ -196,7 +196,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
196 196
  */
197 197
 enum AxisEnum {X_AXIS=0, A_AXIS=0, Y_AXIS=1, B_AXIS=1, Z_AXIS=2, C_AXIS=2, E_AXIS=3, X_HEAD=4, Y_HEAD=5, Z_HEAD=5};
198 198
 
199
-enum EndstopEnum {X_MIN=0, Y_MIN=1, Z_MIN=2, Z_PROBE=3, X_MAX=4, Y_MAX=5, Z_MAX=6, Z2_MIN=7, Z2_MAX=8};
199
+enum EndstopEnum {X_MIN=0, Y_MIN=1, Z_MIN=2, Z_MIN_PROBE=3, X_MAX=4, Y_MAX=5, Z_MAX=6, Z2_MIN=7, Z2_MAX=8};
200 200
 
201 201
 void enable_all_steppers();
202 202
 void disable_all_steppers();

+ 4
- 4
Marlin/SanityCheck.h Целия файл

@@ -132,8 +132,8 @@
132 132
     /**
133 133
      * Require a Z Min pin
134 134
      */
135
-    #if Z_MIN_PIN == -1
136
-      #if Z_MIN_PROBE_PIN == -1 || (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.
135
+    #if !PIN_EXISTS(Z_MIN)
136
+      #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.
137 137
         #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
138 138
           #error You must have a Z_MIN or Z_PROBE endstop to enable Z_MIN_PROBE_REPEATABILITY_TEST.
139 139
         #else
@@ -146,10 +146,10 @@
146 146
      * Require a Z Probe Pin if Z_MIN_PROBE_ENDSTOP is enabled.
147 147
      */
148 148
     #if ENABLED(Z_MIN_PROBE_ENDSTOP)
149
-      #if !PIN_EXISTS(Z_PROBE)
149
+      #ifndef Z_MIN_PROBE_PIN
150 150
         #error You must have a Z_MIN_PROBE_PIN defined in your pins_XXXX.h file if you enable Z_MIN_PROBE_ENDSTOP.
151 151
       #endif
152
-      #if Z_MIN_PROBE_PIN == -1
152
+      #if !PIN_EXISTS(Z_MIN_PROBE)
153 153
         #error You must set Z_MIN_PROBE_PIN to a valid pin if you enable Z_MIN_PROBE_ENDSTOP.
154 154
       #endif
155 155
 // Forcing Servo definitions can break some hall effect sensor setups. Leaving these here for further comment.

+ 1
- 1
Marlin/configurator/config/Configuration.h Целия файл

@@ -327,7 +327,7 @@ Here are some standard links for getting your machine calibrated:
327 327
   // #define ENDSTOPPULLUP_XMIN
328 328
   // #define ENDSTOPPULLUP_YMIN
329 329
   // #define ENDSTOPPULLUP_ZMIN
330
-  // #define ENDSTOPPULLUP_ZPROBE
330
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
331 331
 #endif
332 332
 
333 333
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/Felix/Configuration.h Целия файл

@@ -309,7 +309,7 @@ Here are some standard links for getting your machine calibrated:
309 309
   // #define ENDSTOPPULLUP_XMIN
310 310
   // #define ENDSTOPPULLUP_YMIN
311 311
   // #define ENDSTOPPULLUP_ZMIN
312
-  // #define ENDSTOPPULLUP_ZPROBE
312
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
313 313
 #endif
314 314
 
315 315
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 0
Marlin/example_configurations/Felix/Configuration_DUAL.h Целия файл

@@ -294,6 +294,7 @@ Here are some standard links for getting your machine calibrated:
294 294
   // #define ENDSTOPPULLUP_XMIN
295 295
   // #define ENDSTOPPULLUP_YMIN
296 296
   // #define ENDSTOPPULLUP_ZMIN
297
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
297 298
 #endif
298 299
 
299 300
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/Hephestos/Configuration.h Целия файл

@@ -319,7 +319,7 @@ Here are some standard links for getting your machine calibrated:
319 319
   // #define ENDSTOPPULLUP_XMIN
320 320
   // #define ENDSTOPPULLUP_YMIN
321 321
   // #define ENDSTOPPULLUP_ZMIN
322
-  // #define ENDSTOPPULLUP_ZPROBE
322
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
323 323
 #endif
324 324
 
325 325
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/K8200/Configuration.h Целия файл

@@ -315,7 +315,7 @@ Here are some standard links for getting your machine calibrated:
315 315
   #define ENDSTOPPULLUP_XMIN
316 316
   #define ENDSTOPPULLUP_YMIN
317 317
   #define ENDSTOPPULLUP_ZMIN
318
-  // #define ENDSTOPPULLUP_ZPROBE
318
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
319 319
 #endif
320 320
 
321 321
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Целия файл

@@ -327,7 +327,7 @@ Here are some standard links for getting your machine calibrated:
327 327
   // #define ENDSTOPPULLUP_XMIN
328 328
   // #define ENDSTOPPULLUP_YMIN
329 329
   // #define ENDSTOPPULLUP_ZMIN
330
-  // #define ENDSTOPPULLUP_ZPROBE
330
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
331 331
 #endif
332 332
 
333 333
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/RigidBot/Configuration.h Целия файл

@@ -313,7 +313,7 @@ Here are some standard links for getting your machine calibrated:
313 313
   // #define ENDSTOPPULLUP_XMIN
314 314
   // #define ENDSTOPPULLUP_YMIN
315 315
   // #define ENDSTOPPULLUP_ZMIN
316
-  // #define ENDSTOPPULLUP_ZPROBE
316
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
317 317
 #endif
318 318
 
319 319
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/SCARA/Configuration.h Целия файл

@@ -335,7 +335,7 @@ Here are some standard links for getting your machine calibrated:
335 335
    #define ENDSTOPPULLUP_XMIN  // open pin, inverted
336 336
    #define ENDSTOPPULLUP_YMIN  // open pin, inverted
337 337
   // #define ENDSTOPPULLUP_ZMIN
338
-  // #define ENDSTOPPULLUP_ZPROBE
338
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
339 339
 #endif
340 340
 
341 341
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/WITBOX/Configuration.h Целия файл

@@ -319,7 +319,7 @@ Here are some standard links for getting your machine calibrated:
319 319
   // #define ENDSTOPPULLUP_XMIN
320 320
   // #define ENDSTOPPULLUP_YMIN
321 321
   // #define ENDSTOPPULLUP_ZMIN
322
-  // #define ENDSTOPPULLUP_ZPROBE
322
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
323 323
 #endif
324 324
 
325 325
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/adafruit/ST7565/Configuration.h Целия файл

@@ -327,7 +327,7 @@ Here are some standard links for getting your machine calibrated:
327 327
   // #define ENDSTOPPULLUP_XMIN
328 328
   // #define ENDSTOPPULLUP_YMIN
329 329
   // #define ENDSTOPPULLUP_ZMIN
330
-  // #define ENDSTOPPULLUP_ZPROBE
330
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
331 331
 #endif
332 332
 
333 333
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/delta/biv2.5/Configuration.h Целия файл

@@ -362,7 +362,7 @@ Here are some standard links for getting your machine calibrated:
362 362
   // #define ENDSTOPPULLUP_XMIN
363 363
   // #define ENDSTOPPULLUP_YMIN
364 364
   // #define ENDSTOPPULLUP_ZMIN
365
-  // #define ENDSTOPPULLUP_ZPROBE
365
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
366 366
 #endif
367 367
 
368 368
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/delta/generic/Configuration.h Целия файл

@@ -362,7 +362,7 @@ Here are some standard links for getting your machine calibrated:
362 362
   // #define ENDSTOPPULLUP_XMIN
363 363
   // #define ENDSTOPPULLUP_YMIN
364 364
   // #define ENDSTOPPULLUP_ZMIN
365
-  // #define ENDSTOPPULLUP_ZPROBE
365
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
366 366
 #endif
367 367
 
368 368
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration.h Целия файл

@@ -362,7 +362,7 @@ Here are some standard links for getting your machine calibrated:
362 362
   // #define ENDSTOPPULLUP_XMIN
363 363
   // #define ENDSTOPPULLUP_YMIN
364 364
   // #define ENDSTOPPULLUP_ZMIN
365
-  // #define ENDSTOPPULLUP_ZPROBE
365
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
366 366
 #endif
367 367
 
368 368
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/delta/kossel_pro/Configuration.h Целия файл

@@ -349,7 +349,7 @@ Here are some standard links for getting your machine calibrated:
349 349
   // #define ENDSTOPPULLUP_XMIN
350 350
   // #define ENDSTOPPULLUP_YMIN
351 351
   // #define ENDSTOPPULLUP_ZMIN
352
-  // #define ENDSTOPPULLUP_ZPROBE
352
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
353 353
 #endif
354 354
 
355 355
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/makibox/Configuration.h Целия файл

@@ -330,7 +330,7 @@ Here are some standard links for getting your machine calibrated:
330 330
   // #define ENDSTOPPULLUP_XMIN
331 331
   // #define ENDSTOPPULLUP_YMIN
332 332
   // #define ENDSTOPPULLUP_ZMIN
333
-  // #define ENDSTOPPULLUP_ZPROBE
333
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
334 334
 #endif
335 335
 
336 336
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration.h Целия файл

@@ -317,7 +317,7 @@ Here are some standard links for getting your machine calibrated:
317 317
   // #define ENDSTOPPULLUP_XMIN
318 318
   // #define ENDSTOPPULLUP_YMIN
319 319
   // #define ENDSTOPPULLUP_ZMIN
320
-  // #define ENDSTOPPULLUP_ZPROBE
320
+  // #define ENDSTOPPULLUP_ZMIN_PROBE
321 321
 #endif
322 322
 
323 323
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

+ 1
- 0
Marlin/pins_AZTEEG_X3_PRO.h Целия файл

@@ -37,6 +37,7 @@
37 37
  #if ENABLED(Z_MIN_PROBE_ENDSTOP)
38 38
 //#undef Z_MIN_PIN
39 39
 //#define Z_MIN_PIN        15
40
+  // Define a pin to use as the signal pin on Arduino for the Z probe endstop.
40 41
   #define Z_MIN_PROBE_PIN  19
41 42
  #endif
42 43
 //

+ 6
- 0
Marlin/pins_RUMBA.h Целия файл

@@ -27,6 +27,12 @@
27 27
 #define Z_ENABLE_PIN       62
28 28
 #define Z_MIN_PIN          33
29 29
 #define Z_MAX_PIN          32
30
+#define Z_MIN_PROBE_PIN    -1
31
+
32
+#if ENABLED(Z_MIN_PROBE_ENDSTOP)
33
+  // Define a pin to use as the signal pin on Arduino for the Z probe endstop.
34
+  #define Z_MIN_PROBE_PIN  33
35
+#endif
30 36
 
31 37
 #define E0_STEP_PIN        23
32 38
 #define E0_DIR_PIN         22

+ 8
- 8
Marlin/stepper.cpp Целия файл

@@ -74,14 +74,14 @@ static unsigned short step_loops_nominal;
74 74
 
75 75
 volatile long endstops_trigsteps[3] = { 0 };
76 76
 volatile long endstops_stepsTotal, endstops_stepsDone;
77
-static volatile char endstop_hit_bits = 0; // use X_MIN, Y_MIN, Z_MIN and Z_PROBE as BIT value
77
+static volatile char endstop_hit_bits = 0; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
78 78
 
79 79
 #if DISABLED(Z_DUAL_ENDSTOPS)
80 80
   static byte
81 81
 #else
82 82
   static uint16_t
83 83
 #endif
84
-  old_endstop_bits = 0; // use X_MIN, X_MAX... Z_MAX, Z_PROBE, Z2_MIN, Z2_MAX
84
+  old_endstop_bits = 0; // use X_MIN, X_MAX... Z_MAX, Z_MIN_PROBE, Z2_MIN, Z2_MAX
85 85
 
86 86
 #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
87 87
   bool abort_on_endstop_hit = false;
@@ -264,8 +264,8 @@ void checkHitEndstops() {
264 264
       LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
265 265
     }
266 266
     #if ENABLED(Z_MIN_PROBE_ENDSTOP)
267
-      if (endstop_hit_bits & BIT(Z_PROBE)) {
268
-        SERIAL_ECHOPAIR(" Z_PROBE:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
267
+      if (endstop_hit_bits & BIT(Z_MIN_PROBE)) {
268
+        SERIAL_ECHOPAIR(" Z_MIN_PROBE:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
269 269
         LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "ZP");
270 270
       }
271 271
     #endif
@@ -412,12 +412,12 @@ inline void update_endstops() {
412 412
         #endif // Z_MIN_PIN
413 413
 
414 414
         #if ENABLED(Z_MIN_PROBE_ENDSTOP)
415
-          UPDATE_ENDSTOP(Z, PROBE);
415
+          UPDATE_ENDSTOP(Z, MIN_PROBE);
416 416
 
417
-          if (TEST_ENDSTOP(Z_PROBE))
417
+          if (TEST_ENDSTOP(Z_MIN_PROBE))
418 418
           {
419 419
             endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
420
-            endstop_hit_bits |= BIT(Z_PROBE);
420
+            endstop_hit_bits |= BIT(Z_MIN_PROBE);
421 421
           }
422 422
         #endif
423 423
       }
@@ -973,7 +973,7 @@ void st_init() {
973 973
 
974 974
   #if HAS_Z_PROBE && ENABLED(Z_MIN_PROBE_ENDSTOP) // Check for Z_MIN_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used.
975 975
     SET_INPUT(Z_MIN_PROBE_PIN);
976
-    #if ENABLED(ENDSTOPPULLUP_ZPROBE)
976
+    #if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE)
977 977
       WRITE(Z_MIN_PROBE_PIN,HIGH);
978 978
     #endif
979 979
   #endif

Loading…
Отказ
Запис