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.
jeffstaley 6 years ago
parent
commit
0da636e1a3
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      Marlin/src/module/stepper.cpp

+ 2
- 4
Marlin/src/module/stepper.cpp View File

@@ -2143,16 +2143,14 @@ void Stepper::init() {
2143 2143
     E_AXIS_INIT(5);
2144 2144
   #endif
2145 2145
 
2146
+  set_directions();
2147
+
2146 2148
   // Init Stepper ISR to 122 Hz for quick starting
2147 2149
   HAL_timer_start(STEP_TIMER_NUM, 122);
2148 2150
 
2149 2151
   ENABLE_STEPPER_DRIVER_INTERRUPT();
2150 2152
 
2151 2153
   sei();
2152
-
2153
-  Z_DIR_WRITE(0);    // Init directions to last_direction_bits = 0  Keeps Z from being reversed
2154
-  Z2_DIR_WRITE(0);
2155
-  Z3_DIR_WRITE(0);
2156 2154
 }
2157 2155
 
2158 2156
 /**

Loading…
Cancel
Save