Browse Source

Make LOGICAL and RAW position macros ternary-compatible

Scott Lahteine 7 years ago
parent
commit
ee50928eee
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/Marlin.h

+ 2
- 2
Marlin/Marlin.h View File

294
 extern float soft_endstop_min[XYZ];
294
 extern float soft_endstop_min[XYZ];
295
 extern float soft_endstop_max[XYZ];
295
 extern float soft_endstop_max[XYZ];
296
 
296
 
297
-#define LOGICAL_POSITION(POS, AXIS) (POS + home_offset[AXIS] + position_shift[AXIS])
298
-#define RAW_POSITION(POS, AXIS)     (POS - home_offset[AXIS] - position_shift[AXIS])
297
+#define LOGICAL_POSITION(POS, AXIS) ((POS) + home_offset[AXIS] + position_shift[AXIS])
298
+#define RAW_POSITION(POS, AXIS)     ((POS) - home_offset[AXIS] - position_shift[AXIS])
299
 #define LOGICAL_X_POSITION(POS)     LOGICAL_POSITION(POS, X_AXIS)
299
 #define LOGICAL_X_POSITION(POS)     LOGICAL_POSITION(POS, X_AXIS)
300
 #define LOGICAL_Y_POSITION(POS)     LOGICAL_POSITION(POS, Y_AXIS)
300
 #define LOGICAL_Y_POSITION(POS)     LOGICAL_POSITION(POS, Y_AXIS)
301
 #define LOGICAL_Z_POSITION(POS)     LOGICAL_POSITION(POS, Z_AXIS)
301
 #define LOGICAL_Z_POSITION(POS)     LOGICAL_POSITION(POS, Z_AXIS)

Loading…
Cancel
Save