Keith Packard [Mon, 23 Aug 2010 21:32:58 +0000 (14:32 -0700)]
altosui: Add debug dongle API, split flash UI out
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.
Keith Packard [Mon, 23 Aug 2010 06:05:20 +0000 (23:05 -0700)]
altosui: Add TeleMetrum configuration
This presents a dialog with all of the user-settable options in the
TeleMetrum set for editing. Combo boxes are used for everything except
the callsign.
Keith Packard [Wed, 18 Aug 2010 01:22:28 +0000 (18:22 -0700)]
altosui: Select devices by USB vendor/product ID.
Because Win7 doesn't expose the product name, we're swtiching to using
the USB idProduct/idVendor values. This patch adds support for
selecting devices by those new IDs.
Keith Packard [Wed, 18 Aug 2010 01:19:43 +0000 (18:19 -0700)]
libaltos: integrate Windows support.
This adds Windows support for discovery and I/O.
The API to the library is mostly unchanged, except that it now exports
product and vendor USB IDs as Win7 doesn't expose the product name
anywhere that we've been able to find, so we'll be updating the
firmware to use unique idProduct values for each product.
Keith Packard [Sat, 7 Aug 2010 04:42:25 +0000 (00:42 -0400)]
altosui: Start adding code to write csv files from eeprom/telem files
This is a start to code which can write out a csv file full of flight
data from either an eeprom or telem input file. It's not hooked up,
but the restructuring necessary is finished and the output is started.
Keith Packard [Thu, 5 Aug 2010 17:40:17 +0000 (13:40 -0400)]
altosui: Explicitly initialize Altos class
Because the Altos class is never instantiated, the static initializers
are never called, leaving the string to state mapping empty. Hand-code
the call to the initialer instead.
Keith Packard [Sat, 31 Jul 2010 17:05:15 +0000 (10:05 -0700)]
altosui: Capture config and version info in .eeprom files
Instead of only writing the serial number to the .eeprom file, write
all of the config values and all of the version reply to the .eeprom
file. The config values, in particular, contain the accelerometer
calibration data which is needed to correctly compute acceleration
from the captured accelerometer data.
Keith Packard [Thu, 29 Jul 2010 17:45:02 +0000 (10:45 -0700)]
altosui: Close serial, join reader thread, free altos_file
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.
Keith Packard [Thu, 29 Jul 2010 03:18:36 +0000 (20:18 -0700)]
altosui: Replace device dialog. Center eeprom monitor.
This adds a custom dialog for selecting device, which makes it look
much nicer on the screen and allows the user to double-click on an
entry to select it.
Keith Packard [Thu, 29 Jul 2010 02:37:02 +0000 (19:37 -0700)]
altosui: Fix Save flight data monitor layout, add cancel
Use GridBagLayout to improve the appearance of the flight data monitor
widget, add a cancel button to stop loading data (useful if the
connection is wedged).
Keith Packard [Wed, 28 Jul 2010 16:31:09 +0000 (09:31 -0700)]
Make ao_log_data re-entrant as it is used for both sensor and GPS logs
Because ao_log_data is called from two different threads, failing to
make it re-entrant would cause the 'log' pointer parameter to get
overwritten if another thread asked to log data while the eeprom was
busy writing out a block.
This would cause the second thread to re-writing data from the first
thread's address, but without re-checksumming the data as the checksum
is computed before the log mutex is taken.
The bug can be seen by log blocks with invalid checksums.
Here's what happens with the ao_gps_tracking_report and ao_log threads:
ao_gps_tracking_report ao_log
Writes a bunch of records
*blocks* in the eeprom flush
sets ao_log_data 'log' to global 'log'
computes checksum for 'log' block
*blocks* on ao_log_mutex
Wakes up
sets ao_log_data 'log' to 'gps_log'
writes remaining records
'gps_log' is left with svid = 0
*blocks* on ao_gps_tracking_data
writes data, reading from
the current ao_log_data 'log'
pointer which points at 'gps_log'
Making ao_log_data re-entrant fixes this by ensuring that the 'ao_log'
thread has its own copy of the ao_log_data 'log' parameter.
I made this function take an __xdata restricted pointer so that it
could be passed in the dptr register instead of needing to go on the stack.
Keith Packard [Tue, 27 Jul 2010 17:18:20 +0000 (10:18 -0700)]
Java clean ups -- use varargs where possible, remove AltosSerialReader
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.
Keith Packard [Mon, 26 Jul 2010 19:52:17 +0000 (12:52 -0700)]
When the EP0 IN buffer is full, don't panic, just skip sending another
If the host doesn't pull the IN packet out of EP0 before sending
another SETUP command along, the IN buffer will still be busy when we
try to reply to the SETUP command. While I don't quite understand why
this would ever happen, there's no need to panic about it, just drop
the reply packet on the floor.