Add COUNT macro and apply
This commit is contained in:
committed by
Richard Wackerbarth
parent
d85861d296
commit
278aa15301
@ -50,7 +50,7 @@ void digipot_i2c_init() {
|
||||
const float digipot_motor_current[] = DIGIPOT_I2C_MOTOR_CURRENTS;
|
||||
Wire.begin();
|
||||
// setup initial currents as defined in Configuration_adv.h
|
||||
for(int i = 0; i <= sizeof(digipot_motor_current) / sizeof(float); i++) {
|
||||
for(int i = 0; i < COUNT(digipot_motor_current); i++) {
|
||||
digipot_i2c_set_current(i, digipot_motor_current[i]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user