Keith Packard [Tue, 28 Sep 2010 01:52:30 +0000 (18:52 -0700)]
altosui: Deal with eeprom dates going backwards across wrap
eeprom timestamps can go backwards as the GPS time stamps are
recorded when the first GPS character is received, but not placed into
the eeprom log until the last GPS packet is complete. If this happens
at the same time the tick count is wrapping, then the tick count will
wrap backwards across the 0 boundary causing time to jump forwards.
Fix this by letting time go backwards across the tick boundary, which
requires that we know when the first 'real' tick is read from the
eeprom file.
Keith Packard [Tue, 28 Sep 2010 00:11:48 +0000 (17:11 -0700)]
altosui: Create iterables for log file scanning. Split out display threads
Convert from log file reading paradigm to using iterators which is
more idiomatic for java. Split more code out of AltosUI.java,
including the display update threads for telemetry monitoring and
logfile replay.x
Keith Packard [Sun, 19 Sep 2010 09:50:43 +0000 (02:50 -0700)]
altosui: Use recorded ground acceleration when reading eeprom files
The flight software records 1000 accelerometer samples and records
that in the flight log. Use that value instead of using the very few
samples recorded in the eeprom before boost is detected. This
generates far more accurate accerometer data in the .csv files.
Keith Packard [Fri, 10 Sep 2010 06:04:59 +0000 (23:04 -0700)]
altosui: Stop parsing eeprom file after hitting 'landed' state
Sometimes there are additional records found in the eeprom file; the
reader is mostly worried about not losing anything, so it reads as
much as it can. However, the last record written for any flight is the
'landed' record, so we can stop looking at the file after hitting that.
Keith Packard [Fri, 10 Sep 2010 04:28:10 +0000 (21:28 -0700)]
Add --with-fat-dir configure option to publish finished stand-alone bits
--with-fat-dir specifies a directory to copy the finished
linux/macosx/windows stand-alone ("fat") packages to. A sub-directory
will be created under the specified directory based on the product
version number and the files copied there.
Keith Packard [Fri, 10 Sep 2010 03:24:42 +0000 (20:24 -0700)]
altosui: conflating USB product and vendor IDs is a bad idea
We've now got a USB vendor ID called 'altusmetrum' for generic
altusmetrum devices (old USB ID 0x000A) while the general vendor name
for all devices is 'altusmetrum' as well.
This patch splits vendors and products into separate name spaces,
products are prefixed with product_ and vendor with (oddly) vendor_.
Keith Packard [Thu, 9 Sep 2010 22:25:18 +0000 (15:25 -0700)]
altosui: remove FATJAR from all-local to avoid building fat .jar file
the fat .jar file is used in non-native builds to run from a directory
containing all of the freetts jar files along with the altosui jar
file. We don't want this on a real install where freetts is installed separately.
Keith Packard [Sun, 5 Sep 2010 08:52:36 +0000 (01:52 -0700)]
altosui: Record flight number when scanning file, not when running
The very first record in the eeprom is the flight number, but it is
time-stamped with the 'boost' time, and so it gets sorted until much
later, delaying the return of data until the rocket enters boost
mode. This drops all of the nice pad GPS and state date on the floor.
Keith Packard [Sun, 5 Sep 2010 08:21:14 +0000 (01:21 -0700)]
altosui: Prevent voice altitude data from queueing up
When flight status changes rapidly, the queue of voice data can get
quite long. This change does two things -- first, it remembers when
the altitude reporting happens due to flight events and delays the
periodic reporting until a suitable time after that, second it ensures
that the voice data has all been delivered before generating a new
altitude report.
Keith Packard [Sun, 5 Sep 2010 08:19:11 +0000 (01:19 -0700)]
altosui: Add AltosVoice.drain() to wait for queued speech to finish
drain() blocks until all pending phrases have been processed, allowing
the UI code to avoid pending data that will end up stale by the time
it is emitted.
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.