summaryrefslogtreecommitdiff
path: root/ao-tools/altosui/AltosSerial.java
Commit message (Collapse)AuthorAge
* altosui: Catch I/O errors on telemetry device, report to userKeith Packard2010-09-03
| | | | | | | This catches the USB device being unplugged and makes sure the user sees an error dialog in this case. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Must flush serial line after configuring for telemetryKeith Packard2010-09-03
| | | | | | | Without flushing the configuration commands to the serial device, it never sees them as the telemetry input thread doesn't flush. Signed-off-by: Keith Packard <keithp@keithp.com>
* Revert "altosui: Deal with altos bug setting radio channel while monitoring"Keith Packard2010-09-03
| | | | | | This reverts commit ba65e4aeb952a1cf49a77f1e24e235508fcea71f. Testing the old code
* altosui: Deal with altos bug setting radio channel while monitoringKeith Packard2010-09-03
| | | | | | | | | | If the monitoring thread is active, then setting the radio channel can sometimes cause the monitoring thread to get stuck. I'm not entirely sure why though. For now, work around the issue by making sure monitoring is off, and the monitoring thread has stopped, before changing the radio channel. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Report telemetry CRC errors in UIKeith Packard2010-09-03
| | | | | | | Telemetry CRC errors can signal problems with TeleMetrum or TeleDongle units, so report them in the UI. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: provide separate flush_input/flush_output for serial. deal with ↵Keith Packard2010-08-29
| | | | | | | | | | | | | | | | | monitor automatically (yes, this should be two patches, but the diffs in AltosSerial were merged together). First, this replaces the existing flush/flush_reply mess with two simple functions, one to flush output to the serial device, making sure that all data written will be seen while we wait for input. The other sucks any pending input off of the serial line and discards it. Second, AltosSerial now tracks whether the serial line is being used for telemetry monitoring. If so, it enables monitoring, otherwise it disables it. Eliminates a bunch of manual state tracking elsewhere. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Serial line is in UTF-8 encoding. Deal with it.Keith Packard2010-08-26
| | | | | | | | We read bytes from the serial line and need to convert each line into a string. So, save the bytes and at EOL, pass the whole mess to the string constructor with the appropriate encoding info. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: flush replies from serial link when entering debug modeKeith Packard2010-08-24
| | | | | | | | | | | 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>
* altosui: flush serial output before waiting for replyKeith Packard2010-08-23
|
* altosui: Add debug dongle API, split flash UI outKeith Packard2010-08-23
| | | | | | | | Create an API to talk through the debug port on another AltOS device. Split the flash UI out from the flash implementation so that a command line flash utility can be written. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Make teledongle callsign configurableKeith Packard2010-08-21
| | | | | | | Teledongle uses the callsign in packet mode; this provides a way to set that. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Close serial, join reader thread, free altos_fileKeith Packard2010-07-29
| | | | | | | | | Separating out the close and free actions ensures that the reader thread will not access freed memory or dereference a null pointer while shutting down the connection to the serial device. Otherwise, a race condition exists between the serial close and the thread join. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: check for closed serial device before readingKeith Packard2010-07-29
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Add eeprom data capture function. No UI yet.Keith Packard2010-07-28
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Make voice and channel menus work.Keith Packard2010-07-28
| | | | | | Stores voice and channel data to preferences. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Catch errors opening USB devices. Limit list to relevant devicesKeith Packard2010-07-28
| | | | | | | Avoids a segfault when failing to open a device. Limit listed telemetry devices to just TeleDongle units. Signed-off-by: Keith Packard <keithp@keithp.com>
* Java clean ups -- use varargs where possible, remove AltosSerialReaderKeith Packard2010-07-27
| | | | | | | | Add methods that format stuff using String.format for voice and serial link, remove AltosSerialReader class and just embed that in the AltosSerial class directly. Signed-off-by: Keith Packard <keithp@keithp.com>
* Switch AltosUI to libaltos for device accessKeith Packard2010-07-26
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* More ALtosUI changesKeith Packard2010-04-22
|
* serial port read function cannot be interrupted. poll every 1 secondKeith Packard2010-04-06
|
* Use RXTX for serial comm. Add logdir preference savingKeith Packard2010-04-04
|
* Add telem parsing codeKeith Packard2010-04-02
|
* Start adding java-based UIKeith Packard2010-03-31