altosui: flush replies from serial link when entering debug mode
authorKeith Packard <keithp@keithp.com>
Tue, 24 Aug 2010 23:43:38 +0000 (16:43 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 24 Aug 2010 23:43:38 +0000 (16:43 -0700)
commit99400fdc0f19ef538fc362dde5c3ab5b7cdac409
tree79e56c346ec962ea2b110a6e9df2dc66bf4eda31
parentba086cc77273efe5397f60dcaccd1e3771441481
altosui: flush replies from serial link when entering debug mode

We use replies in debug mode a lot and depend on them matching the
expected parameters. The case which caused trouble was using
TeleMetrum to reprogram TeleDongle -- sending the 'm 0' command (to
disable telemetry monitoring on TeleDongle) to the TeleMetrum caused
it to reply 'Syntax Error' which confused the subsequent flashing
operation. Flushing that reply gets things back in sync.

Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/altosui/AltosDebug.java
ao-tools/altosui/AltosSerial.java