1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-23 12:04:19 +00:00

Set correct stepper direction on reset (#13032)

On a reset steppers were being initialized to incorrect direction. Original code wasn't respecting `INVERT_Z_DIR` define.
This commit is contained in:
jeffstaley 2019-01-27 21:02:38 -08:00 committed by Scott Lahteine
parent 3845baf398
commit 0da636e1a3

View File

@ -2143,16 +2143,14 @@ void Stepper::init() {
E_AXIS_INIT(5);
#endif
set_directions();
// Init Stepper ISR to 122 Hz for quick starting
HAL_timer_start(STEP_TIMER_NUM, 122);
ENABLE_STEPPER_DRIVER_INTERRUPT();
sei();
Z_DIR_WRITE(0); // Init directions to last_direction_bits = 0 Keeps Z from being reversed
Z2_DIR_WRITE(0);
Z3_DIR_WRITE(0);
}
/**