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:
parent
3845baf398
commit
0da636e1a3
1 changed files with 2 additions and 4 deletions
|
@ -2143,16 +2143,14 @@ void Stepper::init() {
|
||||||
E_AXIS_INIT(5);
|
E_AXIS_INIT(5);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
set_directions();
|
||||||
|
|
||||||
// Init Stepper ISR to 122 Hz for quick starting
|
// Init Stepper ISR to 122 Hz for quick starting
|
||||||
HAL_timer_start(STEP_TIMER_NUM, 122);
|
HAL_timer_start(STEP_TIMER_NUM, 122);
|
||||||
|
|
||||||
ENABLE_STEPPER_DRIVER_INTERRUPT();
|
ENABLE_STEPPER_DRIVER_INTERRUPT();
|
||||||
|
|
||||||
sei();
|
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Reference in a new issue