Browse Source

Fix motor current array

Scott Lahteine 4 years ago
parent
commit
52f3f3b5ab
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      Marlin/src/feature/digipot/digipot_mcp4451.cpp

+ 7
- 1
Marlin/src/feature/digipot/digipot_mcp4451.cpp View File

@@ -82,7 +82,13 @@ void digipot_i2c_init() {
82 82
     Wire.begin();
83 83
   #endif
84 84
   // Set up initial currents as defined in Configuration_adv.h
85
-  static const float digipot_motor_current[] PROGMEM = TERN(DIGIPOT_USE_RAW_VALUES, DIGIPOT_MOTOR_CURRENT, DIGIPOT_I2C_MOTOR_CURRENTS);
85
+  static const float digipot_motor_current[] PROGMEM =
86
+    #if ENABLED(DIGIPOT_USE_RAW_VALUES)
87
+      DIGIPOT_MOTOR_CURRENT
88
+    #else
89
+      DIGIPOT_I2C_MOTOR_CURRENTS
90
+    #endif
91
+  ;
86 92
   LOOP_L_N(i, COUNT(digipot_motor_current))
87 93
     digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
88 94
 }

Loading…
Cancel
Save