Browse Source

Init stepper current after stepper pins are set up (#13302)

Robert Mendon 5 years ago
parent
commit
367d392880
1 changed files with 6 additions and 7 deletions
  1. 6
    7
      Marlin/src/module/stepper.cpp

+ 6
- 7
Marlin/src/module/stepper.cpp View File

1979
 
1979
 
1980
 void Stepper::init() {
1980
 void Stepper::init() {
1981
 
1981
 
1982
-  // Init Digipot Motor Current
1983
-  #if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM
1984
-    digipot_init();
1985
-  #endif
1986
-
1987
   #if MB(ALLIGATOR)
1982
   #if MB(ALLIGATOR)
1988
     const float motor_current[] = MOTOR_CURRENT;
1983
     const float motor_current[] = MOTOR_CURRENT;
1989
     unsigned int digipot_motor = 0;
1984
     unsigned int digipot_motor = 0;
2165
     | (INVERT_Z_DIR ? _BV(Z_AXIS) : 0);
2160
     | (INVERT_Z_DIR ? _BV(Z_AXIS) : 0);
2166
 
2161
 
2167
   set_directions();
2162
   set_directions();
2168
-  #if HAS_MOTOR_CURRENT_PWM
2169
-    initialized = true;
2163
+
2164
+  #if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM
2165
+    #if HAS_MOTOR_CURRENT_PWM
2166
+      initialized = true;
2167
+    #endif
2168
+    digipot_init();
2170
   #endif
2169
   #endif
2171
 }
2170
 }
2172
 
2171
 

Loading…
Cancel
Save