Browse Source

Followup to _AXIS patch

pull/1/head
Scott Lahteine 6 years ago
parent
commit
ba4c32eec5
  1. 2
      Marlin/src/feature/bedlevel/abl/abl.cpp
  2. 2
      Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp
  3. 2
      Marlin/src/module/endstops.cpp
  4. 12
      Marlin/src/module/stepper.cpp

2
Marlin/src/feature/bedlevel/abl/abl.cpp

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

2
Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp

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

2
Marlin/src/module/endstops.cpp

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

12
Marlin/src/module/stepper.cpp

@ -287,14 +287,14 @@ void Stepper::wake_up() {
*/ */
void Stepper::set_directions() { void Stepper::set_directions() {
#define SET_STEP_DIR(AXIS) \ #define SET_STEP_DIR(A) \
if (motor_direction(AXIS ##_AXIS)) { \ if (motor_direction(_AXIS(A))) { \
AXIS ##_APPLY_DIR(INVERT_## AXIS ##_DIR, false); \ A##_APPLY_DIR(INVERT_## A##_DIR, false); \
count_direction[AXIS ##_AXIS] = -1; \ count_direction[_AXIS(A)] = -1; \
} \ } \
else { \ else { \
AXIS ##_APPLY_DIR(!INVERT_## AXIS ##_DIR, false); \ A##_APPLY_DIR(!INVERT_## A##_DIR, false); \
count_direction[AXIS ##_AXIS] = 1; \ count_direction[_AXIS(A)] = 1; \
} }
#if HAS_X_DIR #if HAS_X_DIR

Loading…
Cancel
Save