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)
committerBdale Garbee <bdale@gag.com>
Sat, 13 Sep 2014 17:26:21 +0000 (11:26 -0600)
commite969172a81e24f70c349b10f429e69817900c307
treeea3792062533baceb42d58b4726477d8d70f70cf
parent800f3377b1a374ad5cf826aa897efdcb08059040
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