[avr] check state flags in main loop for all sensors

This commit is contained in:
Bart Van Der Meerssche 2011-01-28 10:45:50 +01:00
parent d870088415
commit 9fbbb99a88
1 changed files with 1 additions and 1 deletions

View File

@ -388,7 +388,7 @@ int main(void)
spi_status &= ~SPI_NEW_CTRL_MSG;
}
for (i = 0; i < 3; i++) {
for (i = 0; i < MAX_SENSORS; i++) {
if (state[i].flags & STATE_POWER_CALC) {
calculate_power(&state[i]);
state[i].flags &= ~STATE_POWER_CALC;