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
 #ifndef CONDITIONALS_POST_H
28
 #ifndef CONDITIONALS_POST_H
29
 #define CONDITIONALS_POST_H
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
    * Axis lengths and center
36
    * Axis lengths and center
33
    */
37
    */
43
     #define Y_BED_SIZE Y_MAX_LENGTH
47
     #define Y_BED_SIZE Y_MAX_LENGTH
44
   #endif
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
   #if ENABLED(BED_CENTER_AT_0_0)
56
   #if ENABLED(BED_CENTER_AT_0_0)
47
     #define X_CENTER 0
57
     #define X_CENTER 0
48
     #define Y_CENTER 0
58
     #define Y_CENTER 0
52
   #endif
62
   #endif
53
   #define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2)
63
   #define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2)
54
 
64
 
65
+  // Get the linear boundaries of the bed
55
   #define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2)
66
   #define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2)
56
   #define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2)
67
   #define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2)
57
   #define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
68
   #define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
85
     #endif
96
     #endif
86
   #endif
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
    * No adjustable bed on non-cartesians
100
    * No adjustable bed on non-cartesians
94
    */
101
    */

Loading…
Cancel
Save