1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-30 07:17:59 +00:00

Make LOGICAL and RAW position macros ternary-compatible

This commit is contained in:
Scott Lahteine 2016-11-27 21:07:23 -06:00
parent 56dd15c0ad
commit ee50928eee

View File

@ -294,8 +294,8 @@ void update_software_endstops(AxisEnum axis);
extern float soft_endstop_min[XYZ];
extern float soft_endstop_max[XYZ];
#define LOGICAL_POSITION(POS, AXIS) (POS + home_offset[AXIS] + position_shift[AXIS])
#define RAW_POSITION(POS, AXIS) (POS - home_offset[AXIS] - position_shift[AXIS])
#define LOGICAL_POSITION(POS, AXIS) ((POS) + home_offset[AXIS] + position_shift[AXIS])
#define RAW_POSITION(POS, AXIS) ((POS) - home_offset[AXIS] - position_shift[AXIS])
#define LOGICAL_X_POSITION(POS) LOGICAL_POSITION(POS, X_AXIS)
#define LOGICAL_Y_POSITION(POS) LOGICAL_POSITION(POS, Y_AXIS)
#define LOGICAL_Z_POSITION(POS) LOGICAL_POSITION(POS, Z_AXIS)