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