소스 검색

Followup to _AXIS patch

Scott Lahteine 6 년 전
부모
커밋
ba4c32eec5

+ 1
- 1
Marlin/src/feature/bedlevel/abl/abl.cpp 파일 보기

@@ -386,7 +386,7 @@ float bilinear_z_offset(const float raw[XYZ]) {
386 386
       return;
387 387
     }
388 388
 
389
-    #define LINE_SEGMENT_END(A) (current_position[A ##_AXIS] + (destination[A ##_AXIS] - current_position[A ##_AXIS]) * normalized_dist)
389
+    #define LINE_SEGMENT_END(A) (current_position[_AXIS(A)] + (destination[_AXIS(A)] - current_position[_AXIS(A)]) * normalized_dist)
390 390
 
391 391
     float normalized_dist, end[XYZE];
392 392
     const int8_t gcx = MAX(cx1, cx2), gcy = MAX(cy1, cy2);

+ 1
- 1
Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp 파일 보기

@@ -73,7 +73,7 @@
73 73
         return;
74 74
       }
75 75
 
76
-      #define MBL_SEGMENT_END(A) (current_position[A ##_AXIS] + (destination[A ##_AXIS] - current_position[A ##_AXIS]) * normalized_dist)
76
+      #define MBL_SEGMENT_END(A) (current_position[_AXIS(A)] + (destination[_AXIS(A)] - current_position[_AXIS(A)]) * normalized_dist)
77 77
 
78 78
       float normalized_dist, end[XYZE];
79 79
       const int8_t gcx = MAX(cx1, cx2), gcy = MAX(cy1, cy2);

+ 1
- 1
Marlin/src/module/endstops.cpp 파일 보기

@@ -208,7 +208,7 @@ void Endstops::report_state() {
208 208
     #endif
209 209
 
210 210
     #define _ENDSTOP_HIT_ECHO(A,C) do{ \
211
-      SERIAL_ECHOPAIR(" " STRINGIFY(A) ":", stepper.triggered_position_mm(A ##_AXIS)); \
211
+      SERIAL_ECHOPAIR(" " STRINGIFY(A) ":", stepper.triggered_position_mm(_AXIS(A))); \
212 212
       _SET_STOP_CHAR(A,C); }while(0)
213 213
 
214 214
     #define _ENDSTOP_HIT_TEST(A,C) \

+ 6
- 6
Marlin/src/module/stepper.cpp 파일 보기

@@ -287,14 +287,14 @@ void Stepper::wake_up() {
287 287
  */
288 288
 void Stepper::set_directions() {
289 289
 
290
-  #define SET_STEP_DIR(AXIS) \
291
-    if (motor_direction(AXIS ##_AXIS)) { \
292
-      AXIS ##_APPLY_DIR(INVERT_## AXIS ##_DIR, false); \
293
-      count_direction[AXIS ##_AXIS] = -1; \
290
+  #define SET_STEP_DIR(A) \
291
+    if (motor_direction(_AXIS(A))) { \
292
+      A##_APPLY_DIR(INVERT_## A##_DIR, false); \
293
+      count_direction[_AXIS(A)] = -1; \
294 294
     } \
295 295
     else { \
296
-      AXIS ##_APPLY_DIR(!INVERT_## AXIS ##_DIR, false); \
297
-      count_direction[AXIS ##_AXIS] = 1; \
296
+      A##_APPLY_DIR(!INVERT_## A##_DIR, false); \
297
+      count_direction[_AXIS(A)] = 1; \
298 298
     }
299 299
 
300 300
   #if HAS_X_DIR

Loading…
취소
저장