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.
Keith Packard [Thu, 15 Jul 2010 02:07:02 +0000 (19:07 -0700)]
Switch DBG pins to GPIO when using any debug commands. Reboot to restore.
If you want to use TeleMetrum as a debug dongle, you need to flip the
three pins used to talk to the remote debug port from SPI mode to GPIO
mode.
This patch doesn't provide any way to get back to SPI mode, so you'll
have to reboot the TeleMetrum to write out config parameters or log
flight data after using any debug commands.
Keith Packard [Mon, 21 Jun 2010 22:53:33 +0000 (15:53 -0700)]
Abort any in-progress radio operation when changing radio channel
In monitor mode, the current receive operation must be aborted so that
the radio channel change can take effect without receiving a
telemetry packet on the old channel. Aborting any in-progress radio
operation will make sure that happens.
Keith Packard [Thu, 17 Jun 2010 04:49:43 +0000 (21:49 -0700)]
Add special code for USB panic's.
The USB system may panic if the hardware isn't ready for IN data when
the driver thinks it should be. This adds a special panic code to make
figuring this out easier.
Mike Beattie [Thu, 17 Jun 2010 02:04:01 +0000 (14:04 +1200)]
Extension to KML output format, and minor bug fix
Extended KML output by breaking flight into coloured segments representing
flight state. Add extra statistical information to description bubbles
visible in Google Earth when clicking on links in My Places.
Fix Bugs:
* output kml to file provided as argument.
* move kml coordinate output code to take advantage of nsat calculation
* remove superfluous %9.2f format specifier from raw_file output.
Keith Packard [Wed, 5 May 2010 19:50:39 +0000 (12:50 -0700)]
Don't change dbg clock while changing reset_n. Use 20ms everywhere
This changes the reset code to be more conservative about changing
things at the same time, and also sets all timings to 20ms to make
debugging with the scope easier.
Keith Packard [Wed, 5 May 2010 07:44:42 +0000 (00:44 -0700)]
Disable interrupts while reading from stdin
With multiple input source support, there is a lag between asking a
device if it has data and then waiting for more data to appear. If an
interrupt signalling additional input arrives in this interval, we'll
go to sleep with input available.
This patch uses a big hammer by just disabling interrupts for the
whole process.
Keith Packard [Fri, 23 Apr 2010 20:53:25 +0000 (13:53 -0700)]
Autodetect flite voice registration function
Old versions of flite exported the function 'register_cmu_us_kal'
while new ones export 'register_cmu_us_kal16'. This patch just checks
which one is available and uses that.