Browse Source

Enforce BED_CENTER_AT_0_0 on Delta, SCARA

Scott Lahteine 8 years ago
parent
commit
353c23b16e
1 changed files with 11 additions and 4 deletions
  1. 11
    4
      Marlin/Conditionals_post.h

+ 11
- 4
Marlin/Conditionals_post.h View File

@@ -28,6 +28,10 @@
28 28
 #ifndef CONDITIONALS_POST_H
29 29
 #define CONDITIONALS_POST_H
30 30
 
31
+  #define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
32
+  #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
33
+  #define IS_CARTESIAN !IS_KINEMATIC
34
+
31 35
   /**
32 36
    * Axis lengths and center
33 37
    */
@@ -43,6 +47,12 @@
43 47
     #define Y_BED_SIZE Y_MAX_LENGTH
44 48
   #endif
45 49
 
50
+  // Require 0,0 bed center for Delta and SCARA
51
+  #if IS_KINEMATIC
52
+    #define BED_CENTER_AT_0_0
53
+  #endif
54
+
55
+  // Define center values for future use
46 56
   #if ENABLED(BED_CENTER_AT_0_0)
47 57
     #define X_CENTER 0
48 58
     #define Y_CENTER 0
@@ -52,6 +62,7 @@
52 62
   #endif
53 63
   #define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2)
54 64
 
65
+  // Get the linear boundaries of the bed
55 66
   #define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2)
56 67
   #define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2)
57 68
   #define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
@@ -85,10 +96,6 @@
85 96
     #endif
86 97
   #endif
87 98
 
88
-  #define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
89
-  #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
90
-  #define IS_CARTESIAN !IS_KINEMATIC
91
-
92 99
   /**
93 100
    * No adjustable bed on non-cartesians
94 101
    */

Loading…
Cancel
Save