Browse Source

Allow odd mm bed sizes (#15258)

pull/1/head
Robby Candra 5 years ago
committed by Scott Lahteine
parent
commit
acd76e8609
  1. 15
      Marlin/src/inc/Conditionals_post.h

15
Marlin/src/inc/Conditionals_post.h

@ -66,20 +66,21 @@
#endif
// Define center values for future use
#define _X_HALF_BED ((X_BED_SIZE) / 2)
#define _Y_HALF_BED ((Y_BED_SIZE) / 2)
#if ENABLED(BED_CENTER_AT_0_0)
#define X_CENTER 0
#define Y_CENTER 0
#else
#define X_CENTER ((X_BED_SIZE) / 2)
#define Y_CENTER ((Y_BED_SIZE) / 2)
#define X_CENTER _X_HALF_BED
#define Y_CENTER _Y_HALF_BED
#endif
#define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2)
// Get the linear boundaries of the bed
#define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2)
#define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2)
#define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
#define Y_MAX_BED (Y_CENTER + (Y_BED_SIZE) / 2)
#define X_MIN_BED (X_CENTER - _X_HALF_BED)
#define X_MAX_BED (X_MIN_BED + X_BED_SIZE)
#define Y_MIN_BED (Y_CENTER - _Y_HALF_BED)
#define Y_MAX_BED (Y_MIN_BED + Y_BED_SIZE)
/**
* Dual X Carriage

Loading…
Cancel
Save