Skip to content

Commit 9de8199

Browse files
committed
tweak e motor direction
1 parent 14a45be commit 9de8199

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

Marlin/src/module/stepper.cpp

+12-13
Original file line numberDiff line numberDiff line change
@@ -618,27 +618,26 @@ void Stepper::set_directions() {
618618
TERN_(HAS_V_DIR, SET_STEP_DIR(V));
619619
TERN_(HAS_W_DIR, SET_STEP_DIR(W));
620620

621-
#if ENABLED(MIXING_EXTRUDER)
621+
#if HAS_EXTRUDERS
622622
// Because this is valid for the whole block we don't know
623623
// what E steppers will step. Likely all. Set all.
624624
if (motor_direction(E_AXIS)) {
625-
MIXER_STEPPER_LOOP(j) REV_E_DIR(j);
626-
count_direction.e = -1;
627-
}
628-
else {
629-
MIXER_STEPPER_LOOP(j) NORM_E_DIR(j);
630-
count_direction.e = 1;
631-
}
632-
#elif HAS_EXTRUDERS
633-
if (motor_direction(E_AXIS)) {
634-
REV_E_DIR(stepper_extruder);
625+
#if ENABLED(MIXING_EXTRUDER)
626+
MIXER_STEPPER_LOOP(j) REV_E_DIR(j);
627+
#else
628+
REV_E_DIR(stepper_extruder);
629+
#endif
635630
count_direction.e = -1;
636631
}
637632
else {
638-
NORM_E_DIR(stepper_extruder);
633+
#if ENABLED(MIXING_EXTRUDER)
634+
MIXER_STEPPER_LOOP(j) NORM_E_DIR(j);
635+
#else
636+
NORM_E_DIR(stepper_extruder);
637+
#endif
639638
count_direction.e = 1;
640639
}
641-
#endif
640+
#endif // HAS_EXTRUDERS
642641

643642
DIR_WAIT_AFTER();
644643
}

0 commit comments

Comments
 (0)