Sfoglia il codice sorgente

Allow odd mm bed sizes (#15258)

Robby Candra 5 anni fa
parent
commit
acd76e8609
1 ha cambiato i file con 8 aggiunte e 7 eliminazioni
  1. 8
    7
      Marlin/src/inc/Conditionals_post.h

+ 8
- 7
Marlin/src/inc/Conditionals_post.h Vedi File

66
 #endif
66
 #endif
67
 
67
 
68
 // Define center values for future use
68
 // Define center values for future use
69
+#define _X_HALF_BED ((X_BED_SIZE) / 2)
70
+#define _Y_HALF_BED ((Y_BED_SIZE) / 2)
69
 #if ENABLED(BED_CENTER_AT_0_0)
71
 #if ENABLED(BED_CENTER_AT_0_0)
70
   #define X_CENTER 0
72
   #define X_CENTER 0
71
   #define Y_CENTER 0
73
   #define Y_CENTER 0
72
 #else
74
 #else
73
-  #define X_CENTER ((X_BED_SIZE) / 2)
74
-  #define Y_CENTER ((Y_BED_SIZE) / 2)
75
+  #define X_CENTER _X_HALF_BED
76
+  #define Y_CENTER _Y_HALF_BED
75
 #endif
77
 #endif
76
-#define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2)
77
 
78
 
78
 // Get the linear boundaries of the bed
79
 // Get the linear boundaries of the bed
79
-#define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2)
80
-#define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2)
81
-#define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
82
-#define Y_MAX_BED (Y_CENTER + (Y_BED_SIZE) / 2)
80
+#define X_MIN_BED (X_CENTER - _X_HALF_BED)
81
+#define X_MAX_BED (X_MIN_BED + X_BED_SIZE)
82
+#define Y_MIN_BED (Y_CENTER - _Y_HALF_BED)
83
+#define Y_MAX_BED (Y_MIN_BED + Y_BED_SIZE)
83
 
84
 
84
 /**
85
 /**
85
  * Dual X Carriage
86
  * Dual X Carriage

Loading…
Annulla
Salva