Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Apply INVERT_DIR to SET_STEP_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 20, 2023
1 parent 335ba32 commit ded9ffa
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Marlin/src/module/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,14 +591,14 @@ void Stepper::disable_all_steppers() {
TERN_(EXTENSIBLE_UI, ExtUI::onSteppersDisabled());
}

#define SET_STEP_DIR(A) \
if (motor_direction(_AXIS(A))) { \
A##_APPLY_DIR(INVERT_##A##_DIR, false); \
count_direction[_AXIS(A)] = -1; \
} \
else { \
A##_APPLY_DIR(!INVERT_##A##_DIR, false); \
count_direction[_AXIS(A)] = 1; \
#define SET_STEP_DIR(A) \
if (motor_direction(_AXIS(A))) { \
A##_APPLY_DIR(INVERT_DIR(A, LOW), false); \
count_direction[_AXIS(A)] = -1; \
} \
else { \
A##_APPLY_DIR(INVERT_DIR(A, HIGH), false); \
count_direction[_AXIS(A)] = 1; \
}

/**
Expand Down

0 comments on commit ded9ffa

Please sign in to comment.