Browse Source

Add [XYZ]_CENTER conditionals

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

+ 4
- 1
Marlin/Conditionals_post.h View File

35
   #endif
35
   #endif
36
 
36
 
37
   /**
37
   /**
38
-   * Axis lengths
38
+   * Axis lengths and center
39
    */
39
    */
40
   #define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS))
40
   #define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS))
41
   #define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS))
41
   #define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS))
42
   #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
42
   #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
43
+  #define X_CENTER float((X_MIN_POS + X_MAX_POS) * 0.5)
44
+  #define Y_CENTER float((Y_MIN_POS + Y_MAX_POS) * 0.5)
45
+  #define Z_CENTER float((Z_MIN_POS + Z_MAX_POS) * 0.5)
43
 
46
 
44
   /**
47
   /**
45
    * CoreXY and CoreXZ
48
    * CoreXY and CoreXZ

Loading…
Cancel
Save