Keith Packard [Fri, 27 Aug 2010 06:50:51 +0000 (23:50 -0700)]
altosui: Serial line is in UTF-8 encoding. Deal with it.
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.
Keith Packard [Fri, 27 Aug 2010 06:49:37 +0000 (23:49 -0700)]
altosui: Add support for old (version < 3) telemetry files
This lets the code read telemetry files from pre-released versions of
the software. Not strictly necessary for production, but useful for
analysing old files.
Keith Packard [Fri, 27 Aug 2010 06:37:29 +0000 (23:37 -0700)]
altos: mark gps date written only after it gets into eeprom
Data logging doesn't start until boost detect occurs. As the GPS date
is only logged once, if that happens before logging is written to the
flash, then the GPS date will never get saved.
Keith Packard [Thu, 26 Aug 2010 22:57:09 +0000 (15:57 -0700)]
altos: always rebuild ao_product.c to track git version
The git version is built into ao_product.c and saved in eeprom log
files, providing useful diagnostics about the firmware revision used
for each flight. However, if ao_product.c isn't recompiled, then the
updated version won't be included. Force recompilation of this file
each time make is run to ensure that the final output contains an
updated version number.
Keith Packard [Tue, 24 Aug 2010 23:43:38 +0000 (16:43 -0700)]
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.
Keith Packard [Tue, 24 Aug 2010 11:02:27 +0000 (04:02 -0700)]
altosui: write USB serial number string while flashing
USB serial number is encoded in UCS2 as a part of the string
descriptors. Place those right after the other rom config bits so that
altosui can find it. altosui is changed to write the serial number there.
Keith Packard [Tue, 24 Aug 2010 05:03:36 +0000 (22:03 -0700)]
altos: Place rom config variables in fixed location
The device serial number and radio calibration values are stored in
flash, mostly so that TeleDongle gets them saved.
Placing them in well-known locations (starting at 0xa0) makes it
possible to find the previous configuration and to re-write it
easily, without requiring the .map file.
altosui doesn't have the .map file parsing code, so it relies upon
this new technique. As a benefit, it reads the old values from the
device before reprogramming it.
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).