Browse Source

Sanity Check for probe raises

Scott Lahteine 9 years ago
parent
commit
d7e9647505
2 changed files with 19 additions and 7 deletions
  1. 4
    7
      Marlin/Conditionals.h
  2. 15
    0
      Marlin/SanityCheck.h

+ 4
- 7
Marlin/Conditionals.h View File

783
         #define XY_PROBE_SPEED 4000
783
         #define XY_PROBE_SPEED 4000
784
       #endif
784
       #endif
785
     #endif
785
     #endif
786
-    #ifndef Z_RAISE_PROBE_DEPLOY_STOW
787
-      #if defined(Z_RAISE_BEFORE_PROBING) && defined(Z_RAISE_AFTER_PROBING)
788
-        #define Z_RAISE_PROBE_DEPLOY_STOW (max(Z_RAISE_BEFORE_PROBING, Z_RAISE_AFTER_PROBING))
789
-      #else
790
-        #error "You must set Z_RAISE_PROBE_DEPLOY_STOW in your configuration."
791
-      #endif
786
+    #if Z_RAISE_BETWEEN_PROBINGS > Z_RAISE_PROBE_DEPLOY_STOW
787
+      #define _Z_RAISE_PROBE_DEPLOY_STOW Z_RAISE_BETWEEN_PROBINGS
788
+    #else
789
+      #define _Z_RAISE_PROBE_DEPLOY_STOW Z_RAISE_PROBE_DEPLOY_STOW
792
     #endif
790
     #endif
793
-    #define _Z_RAISE_PROBE_DEPLOY_STOW (max(Z_RAISE_PROBE_DEPLOY_STOW, Z_RAISE_BETWEEN_PROBINGS))
794
   #endif
791
   #endif
795
 
792
 
796
   /**
793
   /**

+ 15
- 0
Marlin/SanityCheck.h View File

293
     //#endif
293
     //#endif
294
   #endif
294
   #endif
295
 
295
 
296
+  /**
297
+   * Make sure Z raise values are set
298
+   */
299
+  #if defined(Z_RAISE_BEFORE_PROBING) || defined(Z_RAISE_AFTER_PROBING)
300
+    #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_RAISE_PROBE_DEPLOY_STOW instead."
301
+  #elif !defined(Z_RAISE_PROBE_DEPLOY_STOW)
302
+    #error "You must set Z_RAISE_PROBE_DEPLOY_STOW in your configuration."
303
+  #elif !defined(Z_RAISE_BETWEEN_PROBINGS)
304
+    #error "You must set Z_RAISE_BETWEEN_PROBINGS in your configuration."
305
+  #elif Z_RAISE_PROBE_DEPLOY_STOW < 1
306
+    #error "Probes need Z_RAISE_PROBE_DEPLOY_STOW >= 1."
307
+  #elif Z_RAISE_BETWEEN_PROBINGS < 1
308
+    #error "Probes need Z_RAISE_BETWEEN_PROBINGS >= 1."
309
+  #endif
310
+
296
 #else
311
 #else
297
 
312
 
298
   /**
313
   /**

Loading…
Cancel
Save