|
@@ -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
|
}
|