fw/altos
11 years agoaltos: Oops. Serial 1 stdin was busted by typo
Keith Packard [Tue, 7 Aug 2012 18:30:47 +0000 (11:30 -0700)]
altos: Oops. Serial 1 stdin was busted by typo

A typo in the symbol used to enable stdin wakeups from serial1 caused
the input to pend until some other wakeup occurred.

This also makes the serial1 hw flow control pin selects in config 2
work right, although those aren't used by any current product

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add button driver and event queue
Keith Packard [Tue, 7 Aug 2012 05:53:52 +0000 (22:53 -0700)]
altos: Add button driver and event queue

With this, a single task can wait for any button or quadrature input
device.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Support multiple quadrature encoders.
Keith Packard [Tue, 7 Aug 2012 04:54:58 +0000 (21:54 -0700)]
altos: Support multiple quadrature encoders.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Fix up quadrature driver
Keith Packard [Tue, 7 Aug 2012 03:20:32 +0000 (20:20 -0700)]
altos: Fix up quadrature driver

Mostly works now, should work reliably with a bit of input filtering.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoSigned-off-by: Keith Packard <keithp@keithp.com>
Keith Packard [Tue, 7 Aug 2012 02:35:02 +0000 (19:35 -0700)]
Signed-off-by: Keith Packard <keithp@keithp.com>
altos: Test quadrature driver

11 years agoaltos: Add quadrature driver
Keith Packard [Tue, 7 Aug 2012 02:34:34 +0000 (19:34 -0700)]
altos: Add quadrature driver

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add ao_gpio_get and ao_exti_set_mode
Keith Packard [Tue, 7 Aug 2012 02:33:44 +0000 (19:33 -0700)]
altos: Add ao_gpio_get and ao_exti_set_mode

Needed to support general GPIO interrupts

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Build ao_kalman.h from cc1111 subdirs as needed
Keith Packard [Sun, 5 Aug 2012 21:58:40 +0000 (14:58 -0700)]
altos: Build ao_kalman.h from cc1111 subdirs as needed

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agomove from Debian packaged sdcc to new cc1111 package forked from 2.9.0-5
Bdale Garbee [Mon, 11 Jun 2012 02:04:24 +0000 (20:04 -0600)]
move from Debian packaged sdcc to new cc1111 package forked from 2.9.0-5

11 years agosrc/cc1111: Enable SPI slave mode
Keith Packard [Sun, 5 Aug 2012 19:17:25 +0000 (12:17 -0700)]
src/cc1111: Enable SPI slave mode

This is untested...

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agosrc/cc1111: Allow serial0 without serial1
Keith Packard [Sun, 5 Aug 2012 19:16:25 +0000 (12:16 -0700)]
src/cc1111: Allow serial0 without serial1

The ao_serial_speed structure is needed by serial0 too.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agosrc/cc1111: Add ao_gpio_set macro
Keith Packard [Sun, 5 Aug 2012 19:15:36 +0000 (12:15 -0700)]
src/cc1111: Add ao_gpio_set macro

Allows general GPIO-using code to run on cc1111

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Move 'implements Runnable' from AltosSerial to AltosLink
Keith Packard [Sun, 5 Aug 2012 05:58:48 +0000 (22:58 -0700)]
altosui: Move 'implements Runnable' from AltosSerial to AltosLink

AltosLink is the class providing the 'run' method, after all...

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add driver for STM internal flash
Keith Packard [Mon, 30 Jul 2012 02:48:08 +0000 (19:48 -0700)]
altos: Add driver for STM internal flash

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add telefire-v0.1
Keith Packard [Mon, 30 Jul 2012 02:44:56 +0000 (19:44 -0700)]
altos: Add telefire-v0.1

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add software AES implementation
Keith Packard [Mon, 30 Jul 2012 02:42:53 +0000 (19:42 -0700)]
altos: Add software AES implementation

This is untested

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos/cc1111: Fix serial 0 option 2 pins definitions
Keith Packard [Mon, 30 Jul 2012 02:36:50 +0000 (19:36 -0700)]
altos/cc1111: Fix serial 0 option 2 pins definitions

tx/rx are 4/5, rts/cts are 2/3

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Remove duplicate values from info table. Add altitude
Keith Packard [Mon, 30 Jul 2012 02:35:15 +0000 (19:35 -0700)]
altosui: Remove duplicate values from info table. Add altitude

No need to have state/call/serial/flight data, those are all in the
header. Having altitude makes Monitor Idle slightly more useful.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Handle Monitor Idle errors better
Keith Packard [Mon, 30 Jul 2012 02:34:00 +0000 (19:34 -0700)]
altosui: Handle Monitor Idle errors better

Deal with missing data by checking for MISSING in more places.
Handle serial communication failures during send by reporting back
from libaltos.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd ability to re-play telemetry through TeleDongle
Keith Packard [Sun, 29 Jul 2012 23:22:23 +0000 (16:22 -0700)]
Add ability to re-play telemetry through TeleDongle

This adds a new command to TeleDongle to send arbitrary data, and then
creates a new tool, 'ao-send-telem' that replays existing telemetry
files through TeleDongle.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Move ao_radio_cmac.c to core (it doesn't depend on hardware)
Keith Packard [Sun, 22 Jul 2012 22:18:27 +0000 (15:18 -0700)]
altos: Move ao_radio_cmac.c to core (it doesn't depend on hardware)

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Move AltosIgnite.java to altoslib
Keith Packard [Sun, 22 Jul 2012 18:53:44 +0000 (11:53 -0700)]
altosui: Move AltosIgnite.java to altoslib

To be shared with altosdroid eventually

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agotools: Use pkgconfig to find stlink for ao-stmload
Keith Packard [Fri, 20 Jul 2012 19:04:17 +0000 (12:04 -0700)]
tools: Use pkgconfig to find stlink for ao-stmload

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd stlink pinout
Keith Packard [Fri, 20 Jul 2012 18:08:22 +0000 (11:08 -0700)]
Add stlink pinout

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Delay starting KML output for flight and GPS coords
Keith Packard [Thu, 19 Jul 2012 16:46:20 +0000 (09:46 -0700)]
altosui: Delay starting KML output for flight and GPS coords

Don't start outputing KML data until the telem record containing
flight number and GPS coordinates are present.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agotelescience: correctly calculating rate values with higher resolution
Robert Garbee [Thu, 19 Jul 2012 00:41:00 +0000 (18:41 -0600)]
telescience: correctly calculating rate values with higher resolution

11 years agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Robert Garbee [Wed, 18 Jul 2012 20:25:27 +0000 (14:25 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

11 years agoICP3 working
Robert Garbee [Wed, 18 Jul 2012 20:24:05 +0000 (14:24 -0600)]
ICP3 working

11 years agoTimer 3 working with slower clock and all 16 bits.
Robert Garbee [Wed, 18 Jul 2012 19:41:27 +0000 (13:41 -0600)]
Timer 3 working with slower clock and all 16 bits.

11 years agoaltosdroid: Start adding an AltosLink subclass for android
Keith Packard [Wed, 18 Jul 2012 07:03:54 +0000 (00:03 -0700)]
altosdroid: Start adding an AltosLink subclass for android

Will talks over bluetooth while providing an AltosLink APi

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Make scan UI handle incremental telem data
Keith Packard [Wed, 18 Jul 2012 07:01:51 +0000 (00:01 -0700)]
altosui: Make scan UI handle incremental telem data

The new telem format doesn't send everything in each telem packet, so
we need to handle updating information incrementally in the scan
results. This involved clearing old scan data when switching
frequencies and then updating existing entries with new data as it arrives.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Toggling telemetry monitoring would replay the telem queue
Keith Packard [Wed, 18 Jul 2012 06:59:13 +0000 (23:59 -0700)]
altos: Toggling telemetry monitoring would replay the telem queue

Using the 'm' command to turn telem off and back on would end up going
around the whole telemetry queue replaying everything there as the
wait loop would exit when disabling monitoring even if the ring was empty.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: With debug cables disconnected, CC1120 seems happy at +16dBm
Keith Packard [Wed, 18 Jul 2012 04:06:07 +0000 (21:06 -0700)]
altos: With debug cables disconnected, CC1120 seems happy at +16dBm

Let's see how it goes...

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Accept variations in spacing for igniter status reply
Keith Packard [Wed, 18 Jul 2012 04:04:58 +0000 (21:04 -0700)]
altosui: Accept variations in spacing for igniter status reply

Megametrum uses different white space; just deal with it here.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltoslib: Move idle monitor managing code to altoslib
Keith Packard [Wed, 18 Jul 2012 04:04:23 +0000 (21:04 -0700)]
altoslib: Move idle monitor managing code to altoslib

More stuff to be shared (potentially)

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Megametrum ADC values are 12 bits, discard low 4 for telemetry
Keith Packard [Wed, 18 Jul 2012 03:44:55 +0000 (20:44 -0700)]
altos: Megametrum ADC values are 12 bits, discard low 4 for telemetry

We've only got space for 8 bits for the ADC values for pyro channels,
discard the low 4 bits instead of the low 8 bits.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltoslib: Don't use MISSING values in max computations
Keith Packard [Wed, 18 Jul 2012 03:43:31 +0000 (20:43 -0700)]
altoslib: Don't use MISSING values in max computations

Early telemetry state may be missing critical data, don't use MISSING
values in computing max ranges.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltoslib: Fix MM conversion functions
Keith Packard [Wed, 18 Jul 2012 03:42:42 +0000 (20:42 -0700)]
altoslib: Fix MM conversion functions

Pressure is already reported in Pa, no need to convert that.
Voltage divider computations were backwards.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agofirst work on PWM input to TeleScience, 'p' command displays timer 1
Robert Garbee [Tue, 17 Jul 2012 19:23:48 +0000 (13:23 -0600)]
first work on PWM input to TeleScience, 'p' command displays timer 1

11 years agoaltos: Place STM config values at fixed addresses for re-use
Keith Packard [Tue, 17 Jul 2012 08:24:52 +0000 (01:24 -0700)]
altos: Place STM config values at fixed addresses for re-use

Just like cc1111, stick the serial number and radio calibration values
at known fixed addresses so that when re-flashing the board, we can go
find the existing values.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd ao-stmload tool
Keith Packard [Tue, 17 Jul 2012 08:18:45 +0000 (01:18 -0700)]
Add ao-stmload tool

This loads an ELF image through the STlink programming interface using
the stlink utility library

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Skip unknown data when parsing ADC for idle monitoring
Keith Packard [Mon, 16 Jul 2012 22:36:20 +0000 (15:36 -0700)]
altosui: Skip unknown data when parsing ADC for idle monitoring

This resolves an infinite loop when talking to megametrum.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Move serial datastream parser to altoslib
Keith Packard [Mon, 16 Jul 2012 22:35:11 +0000 (15:35 -0700)]
altosui: Move serial datastream parser to altoslib

instead of having it in altosui

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: megametrum depends on ao_companion.h
Keith Packard [Mon, 16 Jul 2012 22:34:01 +0000 (15:34 -0700)]
altos: megametrum depends on ao_companion.h

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Enable pyro channel control in telepyro
Keith Packard [Mon, 16 Jul 2012 22:32:26 +0000 (15:32 -0700)]
altos: Enable pyro channel control in telepyro

This should make the board actually work now.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add manual firing command for extra pyro channels
Keith Packard [Mon, 16 Jul 2012 22:30:29 +0000 (15:30 -0700)]
altos: Add manual firing command for extra pyro channels

In parallel with the existing igniter commands, this tests the
programmable pyro channels

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Use 'HAS_ORIENT' to enable orientation selection in pyro code
Keith Packard [Mon, 16 Jul 2012 22:27:58 +0000 (15:27 -0700)]
altos: Use 'HAS_ORIENT' to enable orientation selection in pyro code

Don't expose orientation options when no orientation data is available

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Pass flight dynamics to companion boards
Keith Packard [Mon, 16 Jul 2012 22:25:47 +0000 (15:25 -0700)]
altos: Pass flight dynamics to companion boards

Necessary for TelePyro

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Make ao_tick_count visible
Keith Packard [Mon, 16 Jul 2012 22:24:21 +0000 (15:24 -0700)]
altos: Make ao_tick_count visible

Necessary to fetch it when interrupts are already disabled as we can't
call ao_time then.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Remove some debug code from avr ADC driver
Keith Packard [Mon, 16 Jul 2012 22:21:21 +0000 (15:21 -0700)]
altos: Remove some debug code from avr ADC driver

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Make sure telepyro ao_product.h is built before .o files
Keith Packard [Mon, 16 Jul 2012 22:18:12 +0000 (15:18 -0700)]
altos: Make sure telepyro ao_product.h is built before .o files

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Make storage addresses datatype configurable
Keith Packard [Mon, 16 Jul 2012 21:47:53 +0000 (14:47 -0700)]
altos: Make storage addresses datatype configurable

No sense using 32 bits for tiny hardware

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agosrc: Add driver for AVR internal eeprom. Use for telepyro config.
Keith Packard [Mon, 16 Jul 2012 21:44:40 +0000 (14:44 -0700)]
src: Add driver for AVR internal eeprom. Use for telepyro config.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: No space for pyro help on TP v0.1
Keith Packard [Mon, 16 Jul 2012 21:40:49 +0000 (14:40 -0700)]
altos: No space for pyro help on TP v0.1

AVR doesn't have enough ram to hold the help messages, and we can't
use them in flash.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Remove unused 'func' from ao_config_set
Keith Packard [Mon, 16 Jul 2012 21:39:05 +0000 (14:39 -0700)]
altos: Remove unused 'func' from ao_config_set

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos/avr: Remove debugging command from USB driver
Keith Packard [Mon, 16 Jul 2012 21:37:58 +0000 (14:37 -0700)]
altos/avr: Remove debugging command from USB driver

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos/avr: Remove debugging printf in avr stdio startup
Keith Packard [Mon, 16 Jul 2012 21:36:51 +0000 (14:36 -0700)]
altos/avr: Remove debugging printf in avr stdio startup

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agosrc: Add explicit 'pin' argument to ao_enable_output
Keith Packard [Sat, 14 Jul 2012 09:44:17 +0000 (02:44 -0700)]
src: Add explicit 'pin' argument to ao_enable_output

This lets the cc1111 use the atomic bit operation instead of a mask,
which is immune to interrupt issues as well as being a shorter code sequence.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos/megametrum: Support the four additional pyro channels
Keith Packard [Sat, 14 Jul 2012 08:29:50 +0000 (01:29 -0700)]
altos/megametrum: Support the four additional pyro channels

These use the new pyro code to allow for some flexibility in programming.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos/stm: Expose ao_gpio_set which sets a specific GPIO pin
Keith Packard [Sat, 14 Jul 2012 08:28:55 +0000 (01:28 -0700)]
altos/stm: Expose ao_gpio_set which sets a specific GPIO pin

Will need versions for other architectures

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agostm: running out of memory in MM -- reduce stack to 668 bytes
Keith Packard [Sat, 14 Jul 2012 08:28:31 +0000 (01:28 -0700)]
stm: running out of memory in MM -- reduce stack to 668 bytes

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add arbitrary pyro channel support
Keith Packard [Sat, 14 Jul 2012 08:26:38 +0000 (01:26 -0700)]
altos: Add arbitrary pyro channel support

Programmed by specifying a conjunction of flight conditions that
trigger the igniter to fire.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos/stm: Force STM stack to start at the top of RAM
Keith Packard [Sat, 14 Jul 2012 08:24:14 +0000 (01:24 -0700)]
altos/stm: Force STM stack to start at the top of RAM

Using a fixed size means crashing if there's not enough space for
that, or wasting memory if there's too much.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Abstract remote connection timeout stuff
Keith Packard [Thu, 12 Jul 2012 02:15:32 +0000 (19:15 -0700)]
altosui: Abstract remote connection timeout stuff

This moves some of the logic for managing when to present the 'cancel'
dialog for remote operations to altoslib.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Remove a bunch of debugging printfs
Keith Packard [Wed, 11 Jul 2012 21:28:53 +0000 (14:28 -0700)]
altosui: Remove a bunch of debugging printfs

These aren't useful at this point.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoReport RSSI values in monitor idle UI (trac #44)
Keith Packard [Wed, 11 Jul 2012 20:53:30 +0000 (13:53 -0700)]
Report RSSI values in monitor idle UI (trac #44)

This adds a new 's' command to TeleDongle to report RSSI value from last
received packet, and then has AltosUI request that value when closing
the remote link.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Fix gcc compiler warnings in GPS code
Keith Packard [Wed, 11 Jul 2012 20:52:32 +0000 (13:52 -0700)]
altos: Fix gcc compiler warnings in GPS code

unused variables and mis-matches in printf format codes.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Create macros to convert from/to radio RSSI representation
Keith Packard [Wed, 11 Jul 2012 20:50:56 +0000 (13:50 -0700)]
altos: Create macros to convert from/to radio RSSI representation

AO_RSSI_FROM_RADIO and AO_RADIO_FROM_RSSI.

Removes a bunch of open-coded versions of the same function.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Have 'make clean' remove all programs, even old ones
Keith Packard [Wed, 11 Jul 2012 20:49:26 +0000 (13:49 -0700)]
altos: Have 'make clean' remove all programs, even old ones

This makes sure that changing version numbers doesn't leave old
compiled output lying around.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: remove optimization for 'help' that confuses cc1111 compiler
Keith Packard [Wed, 11 Jul 2012 20:47:25 +0000 (13:47 -0700)]
altos: remove optimization for 'help' that confuses cc1111 compiler

The cc1111 compiler gets this very wrong and prints piles of garbage

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd megametrum outline to doc dir
Keith Packard [Wed, 11 Jul 2012 20:40:54 +0000 (13:40 -0700)]
Add megametrum outline to doc dir

And install it alongside telemetrum-outline

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Ignore megametrum built files
Keith Packard [Wed, 11 Jul 2012 20:40:07 +0000 (13:40 -0700)]
altos: Ignore megametrum built files

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoGet AltOS version numbers into Mac 'about' dialog
Keith Packard [Wed, 11 Jul 2012 07:35:21 +0000 (00:35 -0700)]
Get AltOS version numbers into Mac 'about' dialog

Generate Info.plist from Info.plist.in to correctly set the VERSION
information. This also changes some strings around to make them look better

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Force 434.550Mhz by connecting debug gnd and clk (trac #41)
Keith Packard [Wed, 11 Jul 2012 05:41:59 +0000 (22:41 -0700)]
altos: Force 434.550Mhz by connecting  debug gnd and clk (trac #41)

Check for pin P2_2 low at startup and set the frequency to
434.550MHz. This value won't get written to flash, so rebooting again
will restore the configured frequency.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Continuously update ground state while on pad (trac #42)
Keith Packard [Wed, 11 Jul 2012 05:09:44 +0000 (22:09 -0700)]
altos: Continuously update ground state while on pad (trac #42)

Average data for 5 seconds, wait 5 seconds and if still in pad mode,
replace the existing data with the new data. This should avoid
averaging in boost data while still keeping things reasonably current.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Set HAS_FLIGHT_DEBUG=1 to include the flight debugging commands
Keith Packard [Wed, 11 Jul 2012 05:08:28 +0000 (22:08 -0700)]
altos: Set HAS_FLIGHT_DEBUG=1 to include the flight debugging commands

This leaves USB enabled, and adds the 'F' command to dump
internal flight state.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Signal continuity over radio in pad mode (trac #40)
Keith Packard [Wed, 11 Jul 2012 03:35:19 +0000 (20:35 -0700)]
altos: Signal continuity over radio in pad mode (trac #40)

This is especially useful for telemini which has no beeper, allowing
you to hear the continuity signal while at the pad over the air.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add 'void' parameter to ao_fec_decode callback parameter
Keith Packard [Wed, 11 Jul 2012 03:34:02 +0000 (20:34 -0700)]
altos: Add 'void' parameter to ao_fec_decode callback parameter

This keeps the compiler from whinging about the lack of a prototype.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Save some memory.
Keith Packard [Wed, 11 Jul 2012 03:32:31 +0000 (20:32 -0700)]
altos: Save some memory.

A few minor space savings in ao_cmd.c and ao_config.c.  Don't build
unused conversion functions ao_altitude_to_pres and ao_temp_to_dC

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Improve ao_flight_test a bit
Keith Packard [Tue, 10 Jul 2012 22:15:00 +0000 (15:15 -0700)]
altos: Improve ao_flight_test a bit

Add -i flag to include flight description
Have run-tests know how many failures to expect
Add run_baro to plot a single flight using the baro-only mode

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: add some (unused) test code for different soft-decision sizes
Keith Packard [Tue, 10 Jul 2012 22:13:55 +0000 (15:13 -0700)]
altos: add some (unused) test code for different soft-decision sizes

This lets us experiment with hard-decision and other possible
soft_decision bit depths.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Eliminate compiler warnings when building ao_flight_test
Keith Packard [Tue, 10 Jul 2012 22:13:18 +0000 (15:13 -0700)]
altos: Eliminate compiler warnings when building ao_flight_test

We turn on a pile of warnings for that.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Rename *_mm.c back to *.c
Keith Packard [Tue, 10 Jul 2012 22:11:36 +0000 (15:11 -0700)]
altos: Rename *_mm.c back to *.c

Was just a temporary hack to keep cc1111 products building during MM development.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: remove stale ao_flight.c and ao_sample.c
Keith Packard [Tue, 10 Jul 2012 22:07:34 +0000 (15:07 -0700)]
altos: remove stale ao_flight.c and ao_sample.c

The mega-metrum versions are now the official versions

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Move profiling settings to Makefile
Keith Packard [Wed, 4 Jul 2012 04:02:20 +0000 (21:02 -0700)]
altos: Move profiling settings to Makefile

Instead of splitting the changes across Makefile and ao_pins.h, put
them both in Makefile to simplify enabling profiling.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Crank up the gaussian noise in the FEC test
Keith Packard [Wed, 4 Jul 2012 04:01:01 +0000 (21:01 -0700)]
altos: Crank up the gaussian noise in the FEC test

This lets us check to make sure our receive performance isn't
degrading at all, instead of just making sure we can receive
perfect packets well.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Viterbi performance improvments. Down to 5.7ms for command decode
Keith Packard [Wed, 4 Jul 2012 03:59:35 +0000 (20:59 -0700)]
altos: Viterbi performance improvments. Down to 5.7ms for command decode

Stealing more of Phil's good ideas, decoding a command mode packet has
been reduced from 9ms to 5.7ms. Lots more comments to help future-me
figure out how this code works.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Fix flight data download for TM. Look for MM flights when graphing
Keith Packard [Tue, 3 Jul 2012 07:29:43 +0000 (00:29 -0700)]
altosui: Fix flight data download for TM. Look for MM flights when graphing

A couple of minor fixes, the first to not force the log format so that
TM/Tm data will be downloaded correctly and the second to expand the
set of files to include '.mega' files when plotting data.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Do not block igniters on the radio mutex.
Keith Packard [Tue, 3 Jul 2012 06:44:10 +0000 (23:44 -0700)]
altos: Do not block igniters on the radio mutex.

Blocking igniters on the radio mutex fails when doing igniter testing
over the RF link; the packet receiver task will never release the
mutex and the CPU at the same time, causing the system to lock up.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoextend cross-compiler availability logic to all target CPUs, not just ARM
Bdale Garbee [Mon, 2 Jul 2012 05:24:20 +0000 (23:24 -0600)]
extend cross-compiler availability logic to all target CPUs, not just ARM

11 years agoconditionalize build of ARM binaries on presence of arm-none-eabi-gcc in PATH
Bdale Garbee [Sat, 30 Jun 2012 19:00:33 +0000 (13:00 -0600)]
conditionalize build of ARM binaries on presence of arm-none-eabi-gcc in PATH

11 years agoaltos: Declare cc1111 accel_ref as unsigned so the math works 1.0.9.6
Keith Packard [Fri, 29 Jun 2012 00:43:36 +0000 (17:43 -0700)]
altos: Declare cc1111 accel_ref as unsigned so the math works

If accel_ref is signed, then the careful shifting and dividing dance
necessary to correct for changes in the relationship between the 5V
and 3.3V supplies always generates zero.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoUpdate version to 1.0.9.6
Keith Packard [Thu, 28 Jun 2012 23:42:59 +0000 (16:42 -0700)]
Update version to 1.0.9.6

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Disable MS5607 interrupt in the handler altosdroid
Keith Packard [Thu, 28 Jun 2012 23:05:56 +0000 (16:05 -0700)]
altos: Disable MS5607 interrupt in the handler

Avoids having the interrupt re-raised multiple times until the reading
task finally wakes up.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Track missed HMC5883 interrupts
Keith Packard [Thu, 28 Jun 2012 06:11:27 +0000 (23:11 -0700)]
altos: Track missed HMC5883 interrupts

When it fails to signal conversion complete to the CPU, keep track of
that and report it with the rest of the current data.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Increase default STM stack to 648 bytes
Keith Packard [Thu, 28 Jun 2012 06:09:16 +0000 (23:09 -0700)]
altos: Increase default STM stack to 648 bytes

512 seems cozy given the printf implementation we're using and the
extensive interrupts.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: panic if MPU6000 self test fails
Keith Packard [Thu, 28 Jun 2012 06:05:36 +0000 (23:05 -0700)]
altos: panic if MPU6000 self test fails

Don't try to fly if the board isn't working right.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Disable mag sensor for megametrum
Keith Packard [Thu, 28 Jun 2012 06:04:25 +0000 (23:04 -0700)]
altos: Disable mag sensor for megametrum

It doesn't work unless USB is connected or occasionally while the
debug port is enabled. It's mystic.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Allow megametrum to be built without using the mag sensor
Keith Packard [Thu, 28 Jun 2012 06:03:33 +0000 (23:03 -0700)]
altos: Allow megametrum to be built without using the mag sensor

I'm having trouble getting it working reliably, so we'll like disable it
for now. This patch makes that possible.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Make profiling Viterbi decoder more useful
Keith Packard [Thu, 28 Jun 2012 02:47:52 +0000 (19:47 -0700)]
altos: Make profiling Viterbi decoder more useful

This blocks starting the decoder until all of the data have arrived so
that the time spent in the decoder is easily computed.

Signed-off-by: Keith Packard <keithp@keithp.com>