Keith Packard [Sun, 5 Sep 2010 01:39:58 +0000 (18:39 -0700)]
altosui: Fix up Mac OSX .zip file
Must contain 'altosui.jar' instead of altosui-fat.jar.
Also, was using 'cp -a' instead of 'cp -p' which made files
represented by symlinks not end up in the archive.
Keith Packard [Sun, 5 Sep 2010 00:59:11 +0000 (17:59 -0700)]
Add version numbers to released files. Set version to 0.7.1
Instead of using git revision counts for version numbers, use explicit
versions numbers configured in the configure.ac file. Expose published
files with version numbers.
Keith Packard [Fri, 3 Sep 2010 08:30:33 +0000 (01:30 -0700)]
altosui: Allow 'connect to device' when already connected
Opening another serial device involves shutting down the display
thread (to reset its state) and spawning another one. Shutting down
the display thread normally closes the serial device as a part of the
process, and if this isn't done before the new serial device is
opened, then the new serial device ends up getting closed too.
Interrupting the display thread and waiting for it to stop before
opening the new serial device solves the problem.
Keith Packard [Fri, 3 Sep 2010 08:21:57 +0000 (01:21 -0700)]
altosui: Deal with altos bug setting radio channel while monitoring
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.
Keith Packard [Thu, 2 Sep 2010 05:43:22 +0000 (22:43 -0700)]
altosui: Abort flashing if debug port isn't working
Check each command going over the debug port and make sure it works as
expected. This commit adds checks for initializing the clock,
selecting the desired program counter and running the flash
program.
Keith Packard [Thu, 2 Sep 2010 02:53:24 +0000 (19:53 -0700)]
altos: Bounds check Skytraq GPS tracking data array
Missing GPS serial data could cause the tracking array reset to
get skipped, causing the array to be overrun, smashing critical data
beyond the array.
This was detected using the 'altosui' flash command to program a
device from TM. Hitting the USB that hard caused TM to crash with a
mutex error (3 beeps) after the ao_gps_task structure was overwritten
with zeros.
Bdale Garbee [Tue, 31 Aug 2010 00:48:50 +0000 (18:48 -0600)]
add a .gitattributes file, configuring the Mac and Windows binary library
files with the export-ignore attribute, in hopes that this will prevent
them showing up in source packages
Keith Packard [Mon, 30 Aug 2010 11:52:00 +0000 (04:52 -0700)]
altos: Windows sends USB Out packets of 0 length. Ack them.
This was an untested case as no other operating system sents 0-length
out packets (they're not necessary). The correct response is to ACK
them by clearing the OUTPKT_RDY bit so that another packet can be sent.
Keith Packard [Mon, 30 Aug 2010 09:49:49 +0000 (02:49 -0700)]
libaltos: Improve Makefile
Builds Windows .dll correctly now and sample app.
Moves linux install target to end so it is not default
Adds .NOTPARALLEL to disable parallel gnumake.
Removes -g debugging flags to shrink file size.
Keith Packard [Mon, 30 Aug 2010 06:22:27 +0000 (23:22 -0700)]
altos: shut down packet mode cleanly
Instead of constantly bashing the packet master thread, let it shut
itself down in an orderly fashion. It will shut down fairly quickly as
all of the activities in that thread are bounded. Otherwise, the
master packet thread might leave mutexes locked and all sorts of other
horrors.
Tested on Linux and Mac OS X and shown to be reliable.
Keith Packard [Mon, 30 Aug 2010 04:41:40 +0000 (21:41 -0700)]
libaltos: Mac OS X cannot use 'poll(2)' on serial lines.
Who ships this stuff, anyway? Instead of blocking, we'll poll every 100ms now,
otherwise, we won't be able to abort the read when the device is closed. Yay!
Keith Packard [Mon, 30 Aug 2010 04:36:47 +0000 (21:36 -0700)]
altosui: provide separate flush_input/flush_output for serial. deal with 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.
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.