소스 검색

Make LOGICAL and RAW position macros ternary-compatible

Scott Lahteine 7 년 전
부모
커밋
ee50928eee
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      Marlin/Marlin.h

+ 2
- 2
Marlin/Marlin.h 파일 보기

@@ -294,8 +294,8 @@ void update_software_endstops(AxisEnum axis);
294 294
 extern float soft_endstop_min[XYZ];
295 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 299
 #define LOGICAL_X_POSITION(POS)     LOGICAL_POSITION(POS, X_AXIS)
300 300
 #define LOGICAL_Y_POSITION(POS)     LOGICAL_POSITION(POS, Y_AXIS)
301 301
 #define LOGICAL_Z_POSITION(POS)     LOGICAL_POSITION(POS, Z_AXIS)

Loading…
취소
저장