Add COUNT macro and apply
This commit is contained in:
parent
d85861d296
commit
278aa15301
7 changed files with 16 additions and 11 deletions
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue