Keith Packard [Fri, 18 Mar 2011 23:53:11 +0000 (16:53 -0700)]
altos: Add kalman filters for baro-only boards
This adds a baro-only kalman filter to track the state of the rocket,
and then uses it to control flight events instead of the existing
ad-hoc mechanisms.
Keith Packard [Thu, 17 Mar 2011 23:00:10 +0000 (16:00 -0700)]
altos: Add tiny logging for TeleMini/TeleNano
This splits the logging code into management of the log space within
storage and separate code to actually write suitable log entries. A
new log writing module, ao_log_tiny, is added which writes only
altimeter data at a fairly low data rate for devices using on-chip
storage.
Keith Packard [Thu, 17 Mar 2011 03:36:50 +0000 (20:36 -0700)]
altos: Internal flash ops block when running from flash
The docs say that if you are executing from flash, then the CPU will
stall after a flash write or erase command is started until the
operation is complete. Take advantage of that to simplify the flash
code.
Anthony Towns [Sat, 26 Feb 2011 06:06:48 +0000 (16:06 +1000)]
ao_intflash: Avoid overwriting code
Require firmware to specify the end of its codespace in its Makefile,
and use this to determine where the start of available flash is. Should
give compile time errors if either there's no room left for storage, or
if there's not enough room for code.
Keith Packard [Mon, 7 Mar 2011 05:00:52 +0000 (21:00 -0800)]
altos: Start with packet slave running. Turn off in pad mode.
Instead of turning slave mode on in idle mode, start with it running
and disable it in pad mode instead. This means packet mode is
available in startup mode too.
Anthony Towns [Sun, 27 Feb 2011 01:11:12 +0000 (11:11 +1000)]
src/ao_cmd: Shave off bytes from doc strings
Switch to using { func, "X args\0Desc" } to specify command, saving
a char field by looking at help[0] instead, and reduce help length by
doing alignment with printf instead of hardcoded spaces.
Keith Packard [Sat, 19 Feb 2011 09:06:01 +0000 (01:06 -0800)]
altosui: Display eeprom parsing errors to user
When reading the eeprom, any parsing errors (most likely bad
checksums) indicate some kind of problem with either the hardware or
the flight software. Display these to the user and do not erase the
flight.
Keith Packard [Sat, 19 Feb 2011 09:04:19 +0000 (01:04 -0800)]
altosui: Always read whole eeprom block, even at end of flight
Instead of stopping early, continue reading the whole eeprom block so
that the extra serial data doesn't end up confusing the next user of
the serial line, which may well be reading the next flight.
Keith Packard [Fri, 18 Feb 2011 18:02:46 +0000 (10:02 -0800)]
altos/test: auto-configure acceleration parameters from the log file
The flight test code had static accelerometer configuration values,
making it impossible to use data from different boards without
recompiling. As the eeprom and telem log files both contain the
necessary data, parse that instead.
Keith Packard [Wed, 19 Jan 2011 19:21:52 +0000 (11:21 -0800)]
altos: Program default flight log max value for new boards
New boards have no config space values at all, and so they need each
value to be set. Yes, this should be fixed so that there aren't two
copies of these assignments.
Keith Packard [Sat, 15 Jan 2011 20:26:53 +0000 (12:26 -0800)]
altos: Use 5V reference data to correct accelerometer measurements.
When the 3.3V and 5V values shift relative to each other (usually due
to changes in power consumption), the measured acceleration will
appear to shift. This patch converts the 3.3V referenced acceleration
value into a 5V referenced acceleration, eliminating this error.
Keith Packard [Sat, 15 Jan 2011 20:12:02 +0000 (12:12 -0800)]
altos: Ensure flight code gets first crack at new ADC data
Instead of having everyone wait on the raw ADC ring, have the flight
code wait on that and have everyone else wait for the flight code to
finish looking at the data and move its pointer forwards.
Use the provided ground acceleration average to set the two
accelerometer calibration values so that the flight code will
detect pad/idle mode correctly.
Keith Packard [Sun, 16 Jan 2011 22:30:38 +0000 (14:30 -0800)]
altosui: Ensure serial device is closed after eeprom download finishes
As this code is all event-driven, track which events will trigger
further work and block closing the device in those specific cases,
ensuring that all other code paths end up closing the device.
Keith Packard [Sun, 16 Jan 2011 22:26:18 +0000 (14:26 -0800)]
altosui: Make serial debug more complete and accurate
Display all serial input, including telemetry.
Wait to display serial output until flush time, to debug missing flushing.
Show when devices are opened and closed.
Keith Packard [Sun, 16 Jan 2011 06:43:37 +0000 (22:43 -0800)]
altosui: Reset eeprom download instance variables before reading flight
To deal with downloading multiple flights in a single invocation, make
sure all relevant instance variables are set back to start of flight
download values each time a log is read.
Keith Packard [Wed, 12 Jan 2011 20:41:26 +0000 (12:41 -0800)]
altos: check for valid flight number in ao_log_delete
Zero is not a valid flight number, and ao_log_flight uses that to
indicate 'no flight in this slot'. Check the user-provided input for
zero before looking through the slots.
Keith Packard [Tue, 11 Jan 2011 23:39:24 +0000 (15:39 -0800)]
altosui: Split eeprom download code apart
Create separate 'download config data', 'read single record' and 'read
block' functions. This code will be shared with future multi-log
reading code for new firmware.
Keith Packard [Sat, 8 Jan 2011 04:13:28 +0000 (20:13 -0800)]
altos: ensure erase mark is written when erasing flights
It was getting called only when *failing* to erase a flight (oops),
secondly, it wasn't getting written because ao_storage_flush wasn't
getting called.