altos: Make sure we don't beep out continuity twice in idle mode
authorKeith Packard <keithp@keithp.com>
Fri, 12 Sep 2014 02:56:13 +0000 (19:56 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 12 Sep 2014 02:56:13 +0000 (19:56 -0700)
commit807e62ccebc83eb6427a63431d06effa074e5e76
tree35b7bc5c935608332a717163433d780b30d7ab0f
parentd7ad490a33900a788b15d1600ebaa2a71e6f35ff
altos: Make sure we don't beep out continuity twice in idle mode

If the battery voltage report takes longer than the initialiation
sequence, we could get to the state reporting after the state had
switched from startup to idle. This would result in continuity being
reported the first time through the loop. Then, as the state had
already changed, we'd pass through the while test and go back to
report continuity a second time.

Fixed by using the state remembered before beeping out the voltage to
decide whether to report the continuity.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_report.c