Welcome! Log In Create A New Profile

Advanced

how is X_CENTER/Y_CENTER defined

Posted by doug_scott 
how is X_CENTER/Y_CENTER defined
December 07, 2020 04:17PM
Looking at the z_safe_homing section in the configuration.h file and it has #define Z_SAFE_HOMING_X_POINT X_CENTER. Where is it getting the value for X_CENTER? Same for Y_CENTER. It used to use a calculation in older versions of Marlin, has that been hard-coded into Marlin now?
Re: how is X_CENTER/Y_CENTER defined
December 07, 2020 04:57PM
Please learn how to search all files

In platformio CTRL-SHIFT-F

// Define center values for future use
#define _X_HALF_BED ((X_BED_SIZE) / 2)
#define _Y_HALF_BED ((Y_BED_SIZE) / 2)
#define X_CENTER TERN(BED_CENTER_AT_0_0, 0, _X_HALF_BED)
#define Y_CENTER TERN(BED_CENTER_AT_0_0, 0, _Y_HALF_BED)
#define XY_CENTER { X_CENTER, Y_CENTER }
Re: how is X_CENTER/Y_CENTER defined
December 08, 2020 05:16AM
Thank you. That will come in handy.
Sorry, only registered users may post in this forum.

Click here to login