Keith Packard [Sun, 5 Sep 2010 08:13:01 +0000 (01:13 -0700)]
altosui: Start idle thread after the rocket leaves the pad
This makes the first altitude report time consistently 10 seconds
after launch, instead of some random time depending on when the rocket
launched relative to the time the device connection was made.
Keith Packard [Sun, 5 Sep 2010 08:08:50 +0000 (01:08 -0700)]
altosui: When replay thread is interrupted, don't make final report
Normally, the replay process makes one final report after the file has
been parsed. However, if the reading process is interrupted to display
something else, this report is just annoying, so don't make it.
Keith Packard [Sun, 5 Sep 2010 08:01:10 +0000 (01:01 -0700)]
altosui: Eeprom files contain only one date; save it.
While reading eeprom files, the GPS record is reconstructed each time
the system sees the first GPS log item (the time field), but as the
date isn't repeated, we need to copy it from the old GPS data record.
Keith Packard [Sun, 5 Sep 2010 07:59:54 +0000 (00:59 -0700)]
altosui: Remove debugging printf from AltosEepromReader
These were in place while validing the GPS data reconstruction code
that handles eeprom files missing the first GPS date line due to the
record overwriting bug in old firmware versions.
Keith Packard [Sun, 5 Sep 2010 07:57:38 +0000 (00:57 -0700)]
altosui: Return AO_LOG_INVALID instead of exception for eeprom files
When an eeprom file contains an invalid line, just return
AO_LOG_INVALID instead of throwing an exception. This allows us to
replay and parse files with extraneous serial communication.
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.