fw/altos
13 years agoaltos: Run RDF beacon after apogee instead of waiting for landing
Keith Packard [Wed, 30 Mar 2011 01:10:46 +0000 (18:10 -0700)]
altos: Run RDF beacon after apogee instead of waiting for landing

This provides tracking when GPS fails, or on TeleMini.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: ao_sample_preflight was exiting preflight mode immediately
Keith Packard [Tue, 29 Mar 2011 17:08:46 +0000 (10:08 -0700)]
altos: ao_sample_preflight was exiting preflight mode immediately

Need to stay in pre-flight mode until we've gotten enough sensor data
to calibrate things appropriately. The conversion from a unified
ao_flight.c file was just broken here.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Don't display 0000-00-00 for missing flight log dates
Keith Packard [Tue, 29 Mar 2011 16:39:27 +0000 (09:39 -0700)]
altosui: Don't display 0000-00-00 for missing flight log dates

With Tm/Tn not having GPS to get the current date, it's no longer
unusual to have no date for a flight log, so don't show the 0000-00-00
piece in that case.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Display exception messages from swing thread
Keith Packard [Tue, 29 Mar 2011 16:38:23 +0000 (09:38 -0700)]
altosui: Display exception messages from swing thread

Flight log management exceptions were getting displayed from the log
serial I/O thread instead of the swing thread. That's a bad plan.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Make deployment testing handle Connecting... dialog
Keith Packard [Tue, 29 Mar 2011 16:37:11 +0000 (09:37 -0700)]
altosui: Make deployment testing handle Connecting... dialog

Supporting the Connecting... dialog requires moving all serial
communication to a separate thread. This was done by creating a worker
thread and command queue to communicate between the UI and the serial line.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Make flight log downloading handle 'Connecting...' dialog
Keith Packard [Tue, 29 Mar 2011 06:38:02 +0000 (23:38 -0700)]
altosui: Make flight log downloading handle 'Connecting...' dialog

This required moving all of the serial communication to a separate
thread and making the bulk of the download operation run after that
has finished.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Clean up packet link connecting dialog
Keith Packard [Tue, 29 Mar 2011 06:35:05 +0000 (23:35 -0700)]
altosui: Clean up packet link connecting dialog

Make sure the dialog is destroyed after use (otherwise, it hangs
around on the screen sometimes).

Switch timeout before showing dialog to 500ms -- that brings the
dialog up less often when unnecessary.

Use 'timeout_started' boolean to indicate whether the I/O thread has
queued the dialog for display and whether it needs to queue a call to
close it down.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Create custom nano flight code
Keith Packard [Tue, 29 Mar 2011 01:18:50 +0000 (18:18 -0700)]
altos: Create custom nano flight code

No igniters, just 'pad/drogue/landed' modes (where 'drogue' ==
'flying'). A constant 1Hz telemetry and RDF rate.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Split up flight code into separate flight/sample/kalman bits
Keith Packard [Tue, 29 Mar 2011 00:54:44 +0000 (17:54 -0700)]
altos: Split up flight code into separate flight/sample/kalman bits

The flight code mashed together data processing, filtering and actual
flight managament into one giant pile. Split things up so that we
have:

 ao_sample.c: Sensor data processing. Reads the ring, handles calibration
 ao_kalman.c: Filter the data to track the accel/speed/height values
 ao_flight.c: Flight state management, specific to rocketry.

The plan is to re-use ao_sample.c and ao_kalman.c for hardware not
specifically designed for rocketry, like TeleNano.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Handle serial calls from swing thread
Keith Packard [Sun, 27 Mar 2011 07:48:07 +0000 (00:48 -0700)]
altosui: Handle serial calls from swing thread

Calls from the swing thread cannot be canceled as there's no way to
put up the cancel dialog. In this case, simply use the 5 second
timeout and fail if no communication occurs within that amount of time.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Tell serial device which frame to use for timeout dialogs
Keith Packard [Sun, 27 Mar 2011 07:46:19 +0000 (00:46 -0700)]
altosui: Tell serial device which frame to use for timeout dialogs

For the timeout dialog to appear, a frame must be configured for it to
appear near. This patch sends the frame from the eeprom download
functions to the serial code. That path doesn't yet work as the eeprom
download is still trying to talk to the serial device from the swing
event thread, which prevents the cancel dialog from working.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Allow radio channel to be configured over the radio link
Keith Packard [Sun, 27 Mar 2011 07:13:38 +0000 (00:13 -0700)]
altosui: Allow radio channel to be configured over the radio link

TeleMini/TeleNano can't be configured via USB, so we need to allow
the radio channel to be set over the radio link.

This change carefully sets the new radio channel, disables the remote
link and then sets the teledongle channel to the new value and brings
the link back up.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Off-by-one error in telemetry format configuration UI
Keith Packard [Sun, 27 Mar 2011 07:12:01 +0000 (00:12 -0700)]
altosui: Off-by-one error in telemetry format configuration UI

The telemetry format menu uses 0 for full and 1 for tiny, but the
telemetry configuration uses 1 for full and 2 for tiny. One direction
(config to UI) was right, the other (UI to config) was wrong.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: full logging must flush pending data before checking state
Keith Packard [Sun, 27 Mar 2011 06:38:54 +0000 (23:38 -0700)]
altos: full logging must flush pending data before checking state

Flight state must be checked only after any pending data have been
written to the log as the 'current' flight state is only valid when
the pending data values have been processed. This ensures that the
'boost' state is not marked until the full ring of data is
written. This ensures that the data processing code can find the
barometer values from before boost to get an idea of the ground
pressure value.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Variable log rate in full logging code too
Keith Packard [Sun, 27 Mar 2011 06:15:36 +0000 (23:15 -0700)]
altos: Variable log rate in full logging code too

With the fixed ADC rate used to get better data during flight, the
logging code now needs to vary the data storage rate so that descent
data is recorded at 10 samples/second while ascent data is recorded at
1 sample per second. Having the logging code do this itself eliminates
any interaction with the flight code.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Allow TM config connection to be canceled.
Keith Packard [Sat, 26 Mar 2011 07:01:22 +0000 (00:01 -0700)]
altosui: Allow TM config connection to be canceled.

This leaves the config UI connection attempt running and pops up a
dialog box when it takes 'too long' in the remote case so that users
with Tm or Tn devices can bring up the UI, and then boot the Tm/Tn
without needing to time things carefully.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: swing hide/show methods are deprecated
Keith Packard [Sat, 26 Mar 2011 05:04:09 +0000 (22:04 -0700)]
altosui: swing hide/show methods are deprecated

I don't know why, but they are, so just replace them with
setVisible calls.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Remove extra AltosEepromBlock layer
Keith Packard [Sat, 26 Mar 2011 05:01:18 +0000 (22:01 -0700)]
altosui: Remove extra AltosEepromBlock layer

This was interposed between the download layer and the eeprom layer to
hold a eeprom block full of flight log records. The addition of the tiny
log format required reworking the code to hold chunks full of eeprom
data without regard to their content, so this content-specific layer
didn't seem useful anymore.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Add support for downloading TeleMini/TeleNano flight logs
Keith Packard [Sat, 26 Mar 2011 04:34:31 +0000 (21:34 -0700)]
altosui: Add support for downloading TeleMini/TeleNano flight logs

Splits the eeprom downloading code into eeprom block downloading and
separate eeprom data parsing so that the new data logging format can
share the data downloading code.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Remove a bunch of debug printfs from the eeprom manager code
Keith Packard [Sat, 26 Mar 2011 04:29:50 +0000 (21:29 -0700)]
altosui: Remove a bunch of debug printfs from the eeprom manager code

Just noise on stdout.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Add telemetry format menu and preferences
Keith Packard [Wed, 23 Mar 2011 23:08:43 +0000 (08:08 +0900)]
altosui: Add telemetry format menu and preferences

Switches the TeleDongle between full and tiny telemetry packet
formats, saving the last used format for each teledongle in the
application preferences.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Add support for telemetry version 4
Keith Packard [Wed, 23 Mar 2011 20:27:57 +0000 (05:27 +0900)]
altosui: Add support for telemetry version 4

New telemetry format needed to support TeleNano and TeleMini

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoAdd description to test flights
Keith Packard [Wed, 23 Mar 2011 01:42:31 +0000 (10:42 +0900)]
Add description to test flights

13 years agoAdd ao_kalman.h to .gitignore
Keith Packard [Wed, 23 Mar 2011 01:40:05 +0000 (10:40 +0900)]
Add ao_kalman.h to .gitignore

13 years agoaltos: Exit flight test at landing. Allow description in test flight list
Keith Packard [Wed, 23 Mar 2011 01:37:39 +0000 (10:37 +0900)]
altos: Exit flight test at landing. Allow description in test flight list

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Ignore alt error for fast->coast. Allow larger error for baro apogee.
Keith Packard [Wed, 23 Mar 2011 01:33:38 +0000 (10:33 +0900)]
altos: Ignore alt error for fast->coast. Allow larger error for baro apogee.

With the fixed kalman filter, transitions across mach don't cause
bumps in the merged filter.

And, with working kalman bits, the signal for broken baro detection is
stronger and so we can allow for baro apogee detection in cases where
noise occurs close to apogee.

Bump the kalman filter to trust the baro less so that the model tracks
across mach.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Restore sensible kalman values
Keith Packard [Tue, 22 Mar 2011 07:55:08 +0000 (16:55 +0900)]
altos: Restore sensible kalman values

Now that the kalman code seems to work correctly, restore the sensor
errors and model errors to match reality

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Fix up flight code testing
Keith Packard [Tue, 22 Mar 2011 12:51:52 +0000 (21:51 +0900)]
altos: Fix up flight code testing

This automates flight code testing by reporting mis-detected apogee or
main events.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Missing parens and some bad arithmetic in the kalman code
Keith Packard [Tue, 22 Mar 2011 12:50:29 +0000 (21:50 +0900)]
altos: Missing parens and some bad arithmetic in the kalman code

Fixed point computations are a pain.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Add ao_flight_debug code
Keith Packard [Tue, 22 Mar 2011 12:29:05 +0000 (21:29 +0900)]
altos: Add ao_flight_debug code

Trace the kalman filter to make sure it's working.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Clean up some debug stuff in ao_flight.c
Keith Packard [Tue, 22 Mar 2011 08:04:07 +0000 (17:04 +0900)]
altos: Clean up some debug stuff in ao_flight.c

Remove some spurious printf debugging.
Remove an attempt at discovering broken accelerometer code.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos/kalman: Kalman terms can be > 1, use 32-bit fixed point
Keith Packard [Tue, 22 Mar 2011 07:51:04 +0000 (16:51 +0900)]
altos/kalman: Kalman terms can be > 1, use 32-bit fixed point

Because speed and acceleration are scaled by 16, it's fairly common
for the kalman terms to end up larger than 1. Instead of trying to
fuss with 16-bit values and shifts, just use 32-bit values.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Compute a 'trust' value for the barometer
Keith Packard [Mon, 21 Mar 2011 23:51:23 +0000 (08:51 +0900)]
altos: Compute a 'trust' value for the barometer

Instead of making the baro use/don't-use decision binary, use a 'trust
value' which slowly migrates from baro+accel to accel-only mode. This
eliminates bumps in the data from a rapid shift.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Switch telemetrum over to kalman filter
Keith Packard [Mon, 21 Mar 2011 20:42:51 +0000 (05:42 +0900)]
altos: Switch telemetrum over to kalman filter

This changes the full telemetry stream to include kalman data instead
of the old ad-hoc flight data. It's compatible in that the packet
sizes are the same so teledongle can receive either and figure out
which it has received.

A few plotting and testing tools are added to make validating the new
code easier.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Add nickle kalman implementation.
Keith Packard [Mon, 21 Mar 2011 10:59:27 +0000 (19:59 +0900)]
altos: Add nickle kalman implementation.

This generates the constants needed to implement Kalman filtering in
the flight firmware.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Add .sdcdbrc file for teledongle
Keith Packard [Sun, 20 Mar 2011 06:55:39 +0000 (23:55 -0700)]
altos: Add .sdcdbrc file for teledongle

My sdcdb script uses this to set command line options automatically

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: New telemetry report format (version 4). Supports tiny telemetry.
Keith Packard [Sun, 20 Mar 2011 06:53:08 +0000 (23:53 -0700)]
altos: New telemetry report format (version 4). Supports tiny telemetry.

This completely replaces the version 3 format with a much simpler and
easier to parse scheme. It's described in detail in ao_telem.h, but
the basic idea is that the whole line is split into name/value pairs,
separated by whitespace. Every name is unique, and the values are
either strings or integers. No extraneous formatting or units are
provided.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: The kalman code requires a constant sample rate
Keith Packard [Sun, 20 Mar 2011 06:51:02 +0000 (23:51 -0700)]
altos: The kalman code requires a constant sample rate

The kalman function can't handle a variable sample rate, so keep the
ADC running at full speed for the whole flight instead of slowing it
down after apogee.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Split telenano main from telemini
Keith Packard [Sun, 20 Mar 2011 06:49:41 +0000 (23:49 -0700)]
altos: Split telenano main from telemini

Eventually, telenano will run different code; prepare for this by
creating a telenano-specific main routine.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Split out tiny telemetry from full telemetry
Keith Packard [Sun, 20 Mar 2011 06:46:18 +0000 (23:46 -0700)]
altos: Split out tiny telemetry from full telemetry

The TeleMini and TeleNano boards do not have either GPS or
accelermeters, and they also run the kalman filter which produces
standard unit measurements for the flight height/speed/accel
values. This makes the telemetry significantly
different. ao_telemetry_tiny.c sends the required data.

Note that TeleNano sends the same telemetry as telemini at this point;
there are a couple of values which are not useful, but the overhead of
sending them is small enough that the hassle of having three telemetry
formats seemed excessive.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Make telemetry interval more consistent
Keith Packard [Sun, 20 Mar 2011 06:41:44 +0000 (23:41 -0700)]
altos: Make telemetry interval more consistent

Instead of using a delay between telemetry packets, use a telemetry
period and compute an appropriate delay each time. This requires
changing the ascent telemetry from a 50ms delay to a 100ms interval,
to provide a regular 10 packets-per-second rate. Before, we counted on
the telemetry packet taking about 50ms to send so that we would
receive about 10 per second.

This also eliminates delays during descent for RDF tones -- those will
get transmitted in the interval between telemetry packets without
interrupting the spacing of those packets.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Configure packet size from send/recv parameters.
Keith Packard [Sun, 20 Mar 2011 06:31:20 +0000 (23:31 -0700)]
altos: Configure packet size from send/recv parameters.

Instead of setting the packet size at configuration time, use the
provided packet size to the send/recv functions to configure the
radio. This eliminates many configuration calls, leaving us with 'RDF'
mode and 'packet' mode, the latter working for telemetry and the
bi-directional link.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Don't init packet slave on TD. Make slave start optional
Keith Packard [Sun, 20 Mar 2011 06:27:15 +0000 (23:27 -0700)]
altos: Don't init packet slave on TD. Make slave start optional

Oops. TeleDongle was starting the packet slave code, which kinda
wrecked its ability to receive telemetry packets. This patch simply
removes the packet slave code from teledongle as it cannot be used
(yet), it also makes the packet slave code initialization take a
parameter which controls whether to start that by default; in the
future, perhaps TeleDongle will gain a command to start packet slave mode.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Add software version to Configure AltosUI dialog
Keith Packard [Sun, 20 Mar 2011 01:43:52 +0000 (18:43 -0700)]
altosui: Add software version to Configure AltosUI dialog

Show this somewhere so we can figure out what is installed.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Baro-only boards must not detect launch on accel or speed data
Keith Packard [Sat, 19 Mar 2011 19:28:08 +0000 (12:28 -0700)]
altos: Baro-only boards must not detect launch on accel or speed data

The baro sensor generates too much noise to use small changes in
computed speed or acceleration to cause a false launch detect.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Write height values to log for nano/mini
Keith Packard [Sat, 19 Mar 2011 04:01:15 +0000 (21:01 -0700)]
altos: Write height values to log for nano/mini

This is a lot more useful than the old filtered pressure data.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos/test: Add scripts to run lots of flights through the code
Keith Packard [Sat, 19 Mar 2011 03:36:59 +0000 (20:36 -0700)]
altos/test: Add scripts to run lots of flights through the code

This runs a long list of flights (there's a user-specific path
pointing at the flights) and squawks if the baro and dual flight
computers don't match.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Fix mini/nano default log size to available flash space
Keith Packard [Sat, 19 Mar 2011 03:26:12 +0000 (20:26 -0700)]
altos: Fix mini/nano default log size to available flash space

Also, remove accel cal code from boards without accel

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoMerge branch 'telemini' of ssh://git.gag.com/scm/git/fw/altos into telemini
Bdale Garbee [Sat, 19 Mar 2011 03:12:39 +0000 (21:12 -0600)]
Merge branch 'telemini' of ssh://git.gag.com/scm/git/fw/altos into telemini

13 years agofix up script to work and have reasonable texts
Bdale Garbee [Sat, 19 Mar 2011 03:12:12 +0000 (21:12 -0600)]
fix up script to work and have reasonable texts

13 years agoaltos: Add TeleNano support
Keith Packard [Sat, 19 Mar 2011 03:07:25 +0000 (20:07 -0700)]
altos: Add TeleNano support

This just uses the TeleMini bits, which should work fine for now.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Tiny logging fixes. Scan at start, stop when land or full.
Keith Packard [Sat, 19 Mar 2011 02:49:46 +0000 (19:49 -0700)]
altos: Tiny logging fixes. Scan at start, stop when land or full.

Initialize the flight log for tiny systems by scanning the log area to
find the current flight number and log area bounds.

Stop logging data when the flight is over, or when the log area is
full.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Add kalman filters for baro-only boards
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Add tiny logging for TeleMini/TeleNano
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoignore new flight test file
Anthony Towns [Fri, 11 Mar 2011 11:41:01 +0000 (21:41 +1000)]
ignore new flight test file

13 years agoaltos: Internal flash ops block when running from flash
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: oops -- altitude reporting wasn't pausing between signals
Keith Packard [Tue, 8 Mar 2011 00:31:43 +0000 (16:31 -0800)]
altos: oops -- altitude reporting wasn't pausing between signals

need to actually alternate the LED/tone with some space so you can
count.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoao-load: Make usb descriptor rewriting optional
Keith Packard [Mon, 7 Mar 2011 23:57:58 +0000 (15:57 -0800)]
ao-load: Make usb descriptor rewriting optional

TeleMini and TeleNano don't have USB descriptors to rewrite when
loading firmware, so allow them to be missing.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agobringup: Add script for telemini
Keith Packard [Mon, 7 Mar 2011 23:26:41 +0000 (15:26 -0800)]
bringup: Add script for telemini

Copied from teledongle with a few obvious changes.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Switch pins around for TeleMini
Keith Packard [Mon, 7 Mar 2011 16:03:11 +0000 (08:03 -0800)]
altos: Switch pins around for TeleMini

TeleMini has fewer sensors and uses P0 for igniters instead of P2.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Switch LED usage for TeleMini around
Keith Packard [Mon, 7 Mar 2011 07:52:11 +0000 (23:52 -0800)]
altos: Switch LED usage for TeleMini around

We're using the LEDs instead of tones, so make red mean 'low tone',
green mean 'middle tone' and both mean 'high tone'.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoao_intflash: Avoid overwriting 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.

13 years agoaltos: Add TeleMini v1.0
Keith Packard [Mon, 7 Mar 2011 05:03:57 +0000 (21:03 -0800)]
altos: Add TeleMini v1.0

This adds initial code for the telemini board, a two channel
flight computer with digital telemetry and a barometric sensor.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Start with packet slave running. Turn off in pad mode.
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos/test: Add baro-only flight test program
Keith Packard [Mon, 7 Mar 2011 05:59:08 +0000 (21:59 -0800)]
altos/test: Add baro-only flight test program

This builds the flight code in baro-only mode for testing.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos/test: Use ao_convert.c instead of hand-coded pres → alt func
Keith Packard [Mon, 7 Mar 2011 05:57:52 +0000 (21:57 -0800)]
altos/test: Use ao_convert.c instead of hand-coded pres → alt func

Fix up ao_convert.c so that it can be used within the flight test code
instead of having a (broken) copy of the code there.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Make serial, usb, beeper and accelerometer optional components
Keith Packard [Mon, 7 Mar 2011 04:56:25 +0000 (20:56 -0800)]
altos: Make serial, usb, beeper and accelerometer optional components

Not all boards will have these, so fix places that use them to deal
with that.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoao_intflash: Use internal flash for storage
Anthony Towns [Sat, 26 Feb 2011 01:48:30 +0000 (11:48 +1000)]
ao_intflash: Use internal flash for storage

Makes any free pages at end of CC1111's internal flash available via
the ao_storage API.

13 years agoaoview: remove -s option.
Keith Packard [Wed, 16 Mar 2011 21:10:06 +0000 (14:10 -0700)]
aoview: remove -s option.

13 years agoBump published version number to 0.9.1
Keith Packard [Wed, 16 Mar 2011 21:08:42 +0000 (14:08 -0700)]
Bump published version number to 0.9.1

13 years agoaltosui: Missed jcommon.jar in the Mac OS install image
Keith Packard [Wed, 16 Mar 2011 21:05:13 +0000 (14:05 -0700)]
altosui: Missed jcommon.jar in the Mac OS install image

This caused graphing to fail on Mac OS X

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Oops. Lost a couple of commands when merging the doc patch
Keith Packard [Mon, 7 Mar 2011 08:26:17 +0000 (00:26 -0800)]
altos: Oops. Lost a couple of commands when merging the doc patch

I didn't merge this carefully enough and managed to lose the 'f'
and 'e' commands, which are kinda useful.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agosrc/ao_cmd: Shave off bytes from doc strings
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.

13 years agoRevert "src/ao_gps_skytraq.c: Update logging rate to 10Hz"
Keith Packard [Mon, 7 Mar 2011 08:01:01 +0000 (00:01 -0800)]
Revert "src/ao_gps_skytraq.c: Update logging rate to 10Hz"

This reverts commit b080e933a65d268aaaec8cfd5f617a13d5babc43.

10Hz data isn't any better than 1Hz data; it still doesn't like going
upwards rapidly.

13 years agoaltosui: Display eeprom parsing errors to user
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Always read whole eeprom block, even at end of 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.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Mark empty eeprom records 'invalid', don't generate exception
Keith Packard [Sat, 19 Feb 2011 09:02:00 +0000 (01:02 -0800)]
altosui: Mark empty eeprom records 'invalid', don't generate exception

When reading empty eeprom records, mark them as 'invalid', but don't
generate an exception as it's normal to read these at the end of the
flight log.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoupdate changelogs for Debian build debian/0.9.1
Bdale Garbee [Sat, 19 Feb 2011 06:56:01 +0000 (23:56 -0700)]
update changelogs for Debian build

13 years agotie bringup scripts to Bdale's bench TeleDongle 0.9.1
Bdale Garbee [Sat, 19 Feb 2011 02:54:18 +0000 (19:54 -0700)]
tie bringup scripts to Bdale's bench TeleDongle

13 years agosrc/ao_gps_skytraq.c: Update logging rate to 10Hz
Anthony Towns [Fri, 18 Feb 2011 19:49:15 +0000 (05:49 +1000)]
src/ao_gps_skytraq.c: Update logging rate to 10Hz

Send commands to skytraq to update baud rate to 57,600 bps, and
set NMEA output rate to 10Hz.

13 years agosrc/ao_gps_skytraq: simplify parsing code
Anthony Towns [Fri, 18 Feb 2011 18:17:17 +0000 (04:17 +1000)]
src/ao_gps_skytraq: simplify parsing code

Added macros to make correctly constructing skytraq commands easier.
Simplified code path for NMEA processing marginally.

13 years agoao_radio: generalise setup of packet size
Anthony Towns [Wed, 2 Feb 2011 09:12:57 +0000 (19:12 +1000)]
ao_radio: generalise setup of packet size

13 years agoaltos/test: auto-configure acceleration parameters from the log file
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos/test: Add dependencies in the Makefile for ao_flight_test
Keith Packard [Fri, 18 Feb 2011 17:54:01 +0000 (09:54 -0800)]
altos/test: Add dependencies in the Makefile for ao_flight_test

Yes, it would be nice to automate dependency generation here, but I
can't be bothered.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoao-load: fix usage message to note that '=' is required for options
Keith Packard [Fri, 18 Feb 2011 17:51:37 +0000 (09:51 -0800)]
ao-load: fix usage message to note that '=' is required for options

The usage message was suggesting incorrect command line syntax; long
options use '=' between the option name and value, not whitespace.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoupdate changelogs for Debian build debian/0.9
Bdale Garbee [Wed, 19 Jan 2011 19:47:25 +0000 (12:47 -0700)]
update changelogs for Debian build

13 years agoelide changelog entries or re-release of 0.9 0.9
Bdale Garbee [Wed, 19 Jan 2011 19:46:02 +0000 (12:46 -0700)]
elide changelog entries or re-release of 0.9

13 years agoupdate turnon script to prefer TeleDongle as programmer
Bdale Garbee [Wed, 19 Jan 2011 19:42:40 +0000 (12:42 -0700)]
update turnon script to prefer TeleDongle as programmer

13 years agoupdate changelogs for Debian build debian/0.9+2+g97f4f2e
Bdale Garbee [Wed, 19 Jan 2011 19:26:53 +0000 (12:26 -0700)]
update changelogs for Debian build

13 years agoaltos: Program default flight log max value for new boards
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoupdate changelogs for Debian build
Bdale Garbee [Wed, 19 Jan 2011 07:05:25 +0000 (00:05 -0700)]
update changelogs for Debian build

13 years agoprepare to release
Bdale Garbee [Wed, 19 Jan 2011 07:04:45 +0000 (00:04 -0700)]
prepare to release

13 years agoupdate changelogs for Debian build debian/0.8.1+81+g4ae724f
Bdale Garbee [Wed, 19 Jan 2011 06:55:42 +0000 (23:55 -0700)]
update changelogs for Debian build

13 years agowe need an install target to prevent parent dir make from failing
Bdale Garbee [Wed, 19 Jan 2011 06:54:36 +0000 (23:54 -0700)]
we need an install target to prevent parent dir make from failing

13 years agoupdate changelogs for Debian build debian/0.8.1+79+g9a5666f
Bdale Garbee [Wed, 19 Jan 2011 06:48:08 +0000 (23:48 -0700)]
update changelogs for Debian build

13 years agodoc: Build with 'make all' from top level. Build with 'make fat'
Keith Packard [Wed, 19 Jan 2011 06:46:25 +0000 (22:46 -0800)]
doc: Build with 'make all' from top level. Build with 'make fat'

This will make sure the docs are up-to-date for both regular and
fat builds.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agofat: Add docs to Linux package
Keith Packard [Wed, 19 Jan 2011 06:39:07 +0000 (22:39 -0800)]
fat: Add docs to Linux package

Oops. Missed this one.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agofat: Add firmware for v1.1 and docs to mac/windows/linux installers
Keith Packard [Wed, 19 Jan 2011 06:34:15 +0000 (22:34 -0800)]
fat: Add firmware for v1.1 and docs to mac/windows/linux installers

We'll need to be sure to update this each time we add a product.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agofreshen copyright year
Bdale Garbee [Wed, 19 Jan 2011 06:29:03 +0000 (23:29 -0700)]
freshen copyright year

13 years agoadd 0.9 revision entry, with caveat about telemetry format change
Bdale Garbee [Wed, 19 Jan 2011 06:18:42 +0000 (23:18 -0700)]
add 0.9 revision entry, with caveat about telemetry format change