Browse Source

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.
pull/1/head
jeffstaley 6 years ago
committed by Scott Lahteine
parent
commit
0da636e1a3
  1. 6
      Marlin/src/module/stepper.cpp

6
Marlin/src/module/stepper.cpp

@ -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);
}
/**

Loading…
Cancel
Save