Skip to content

Commit ded9ffa

Browse files
committed
πŸ§‘β€πŸ’» Apply INVERT_DIR to SET_STEP_DIR
1 parent 335ba32 commit ded9ffa

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

β€ŽMarlin/src/module/stepper.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -591,14 +591,14 @@ void Stepper::disable_all_steppers() {
591591
TERN_(EXTENSIBLE_UI, ExtUI::onSteppersDisabled());
592592
}
593593

594-
#define SET_STEP_DIR(A) \
595-
if (motor_direction(_AXIS(A))) { \
596-
A##_APPLY_DIR(INVERT_##A##_DIR, false); \
597-
count_direction[_AXIS(A)] = -1; \
598-
} \
599-
else { \
600-
A##_APPLY_DIR(!INVERT_##A##_DIR, false); \
601-
count_direction[_AXIS(A)] = 1; \
594+
#define SET_STEP_DIR(A) \
595+
if (motor_direction(_AXIS(A))) { \
596+
A##_APPLY_DIR(INVERT_DIR(A, LOW), false); \
597+
count_direction[_AXIS(A)] = -1; \
598+
} \
599+
else { \
600+
A##_APPLY_DIR(INVERT_DIR(A, HIGH), false); \
601+
count_direction[_AXIS(A)] = 1; \
602602
}
603603

604604
/**

0 commit comments

Comments
Β (0)