Fix motor current array
This commit is contained in:
parent
9381a76d75
commit
52f3f3b5ab
|
@ -82,7 +82,13 @@ void digipot_i2c_init() {
|
||||||
Wire.begin();
|
Wire.begin();
|
||||||
#endif
|
#endif
|
||||||
// Set up initial currents as defined in Configuration_adv.h
|
// Set up initial currents as defined in Configuration_adv.h
|
||||||
static const float digipot_motor_current[] PROGMEM = TERN(DIGIPOT_USE_RAW_VALUES, DIGIPOT_MOTOR_CURRENT, DIGIPOT_I2C_MOTOR_CURRENTS);
|
static const float digipot_motor_current[] PROGMEM =
|
||||||
|
#if ENABLED(DIGIPOT_USE_RAW_VALUES)
|
||||||
|
DIGIPOT_MOTOR_CURRENT
|
||||||
|
#else
|
||||||
|
DIGIPOT_I2C_MOTOR_CURRENTS
|
||||||
|
#endif
|
||||||
|
;
|
||||||
LOOP_L_N(i, COUNT(digipot_motor_current))
|
LOOP_L_N(i, COUNT(digipot_motor_current))
|
||||||
digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
|
digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue