Quellcode durchsuchen

Make LOGICAL and RAW position macros ternary-compatible

Scott Lahteine vor 7 Jahren
Ursprung
Commit
ee50928eee
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2
    2
      Marlin/Marlin.h

+ 2
- 2
Marlin/Marlin.h Datei anzeigen

@@ -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)

Laden…
Abbrechen
Speichern