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)
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>

No differences found