Apply loop shorthand macros (#17159)
This commit is contained in:
@ -92,11 +92,11 @@ void digipot_i2c_set_current(const uint8_t channel, const float current) {
|
||||
void digipot_i2c_init() {
|
||||
static const float digipot_motor_current[] PROGMEM = DIGIPOT_I2C_MOTOR_CURRENTS;
|
||||
|
||||
for (uint8_t i = 0; i < DIGIPOT_I2C_NUM_CHANNELS; i++)
|
||||
LOOP_L_N(i, DIGIPOT_I2C_NUM_CHANNELS)
|
||||
pots[i].i2c_init();
|
||||
|
||||
// setup initial currents as defined in Configuration_adv.h
|
||||
for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++)
|
||||
LOOP_L_N(i, COUNT(digipot_motor_current))
|
||||
digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ void digipot_i2c_init() {
|
||||
#endif
|
||||
// setup initial currents as defined in Configuration_adv.h
|
||||
static const float digipot_motor_current[] PROGMEM = DIGIPOT_I2C_MOTOR_CURRENTS;
|
||||
for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++)
|
||||
LOOP_L_N(i, COUNT(digipot_motor_current))
|
||||
digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user