summaryrefslogtreecommitdiff
path: root/ao-tools/altosui/AltosSerial.java
Commit message (Collapse)AuthorAge
* Move altosui to the top level, placing libaltos inside it.Keith Packard2010-11-24
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: New AltosSerial.set_radio function sets channel/callKeith Packard2010-11-23
| | | | | | | | | Use this anytime you need to set the device radio channel and call sign, either for telemetry reception or packet mode origination. This uses the saved callsign and per-device radio channel number. Do not use this when opening a telemetrum as there won't be a saved channel number. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Make AltosSerial.flush_input keep reading while non-emptyKeith Packard2010-11-23
| | | | | | | Flushing the input buffer can take a while, especially over the packet link. Keep reading while stuff is appearing on the reply queue. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: switch channel selector to combo box. Shorten displayed device namesKeith Packard2010-11-19
| | | | | | | | | A combo box displays the current value, which is quite nice to have. Add a 'toShortString' for AltosDevice so that the window frames and error messages don't have extra spaces generated by the altos_device toString method. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Use timeouts to recover from broken packet links.Keith Packard2010-11-19
| | | | | | | | | | | This puts timeouts every place the system reads from the packet link and aborts the in-progress operation if it takes more than a second to get a response. Also mixed in here are persistent igniter status displays for the ejection testing UI. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Open serial device at 'new' time. Prohibit duplicate opens.Keith Packard2010-11-13
| | | | | | | | | | | With the per-serial UI, there's never a reason to create a serial device without opening it right away. This eliminates the bug caused by not opening the serial device for telemetry reception. Serial devices can now be opened only once; this eliminates errors when trying to reflash or configure devices while receiving telemetry. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Eliminate unncessary import altosui linesKeith Packard2010-11-13
| | | | | | | Java appears to automatically import every module from the current package. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Fix channel setting at serial open timeKeith Packard2010-11-08
| | | | | | Was using the previous non-device-specific preferences API. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Split out flight monitoring to separate windowKeith Packard2010-11-08
| | | | | | | | | This creates a per-TD (or replay) window to contain the flight monitoring information, allowing multiple monitors. This also adds per-TD preferences for monitoring channel. Signed-off-by: Keith Packard <keithp@keithp.com>
* 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