fw/altos
7 years agoMerge branch 'master' into new-state
Keith Packard [Sat, 31 Aug 2013 13:22:09 +0000 (08:22 -0500)]
Merge branch 'master' into new-state

7 years agoaltos/lpc: Add bits for building flash loaders
Keith Packard [Sat, 31 Aug 2013 13:20:48 +0000 (08:20 -0500)]
altos/lpc: Add bits for building flash loaders

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib/altosui: Fixes for state changes
Keith Packard [Sat, 31 Aug 2013 13:19:28 +0000 (08:19 -0500)]
altoslib/altosui: Fixes for state changes

Format for gps alt (now double).
Use new code for csv file loading.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib/altosui: Get legacy telem working with new AltosState structure
Keith Packard [Sat, 31 Aug 2013 06:48:02 +0000 (01:48 -0500)]
altoslib/altosui: Get legacy telem working with new AltosState structure

Make AltosTelemetry work without AltosRecord

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib, altosui: Restructured state management now does TM eeprom files
Keith Packard [Fri, 30 Aug 2013 00:24:51 +0000 (19:24 -0500)]
altoslib, altosui: Restructured state management now does TM eeprom files

Removed uses of AltosRecord from AltosState, now just need to rewrite
the other AltosState changing code to match

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Split EasyMini and TeleMini log formats
Keith Packard [Fri, 30 Aug 2013 00:22:18 +0000 (19:22 -0500)]
altos: Split EasyMini and TeleMini log formats

Same data, but EasyMini uses a 3.0V supply while TeleMini uses 3.3V,
which changes the intepretation of all of the ADC values

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Start restructuring AltosState harder
Keith Packard [Wed, 28 Aug 2013 03:28:07 +0000 (21:28 -0600)]
altoslib: Start restructuring AltosState harder

Make per-packet code update state itself rather than having all state
updates done centrally. Will make adding new packet types easier.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoMerge remote-tracking branch 'origin/telemini'
Keith Packard [Thu, 29 Aug 2013 04:52:58 +0000 (22:52 -0600)]
Merge remote-tracking branch 'origin/telemini'

Signed-off-by: Keith Packard <keithp@keithp.com>
Conflicts:
src/core/ao_telemetry.c
src/core/ao_telemetry.h

Added both Mini and Metrum telemetry defines

7 years agoaltos/stm: Make sure we switch to MSI during timer init
Keith Packard [Thu, 29 Aug 2013 04:12:25 +0000 (22:12 -0600)]
altos/stm: Make sure we switch to MSI during timer init

Need to ensure that the CPU is actually using the MSI during timer
init or all of the other clock changes won't work

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/stm: Remove stale timer defines
Keith Packard [Thu, 29 Aug 2013 04:10:58 +0000 (22:10 -0600)]
altos/stm: Remove stale timer defines

Stuff from when we weren't using systick

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/stm: Make sampling profiler work again
Keith Packard [Thu, 29 Aug 2013 04:08:51 +0000 (22:08 -0600)]
altos/stm: Make sampling profiler work again

Disable the separate stack as that means we can't figure out the PC
from the timer interrupt. Move ao_idle_loc after the interrupt release
so that we see idle tasks correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/stm: New compiler doesn't correctly build flash bits yet
Keith Packard [Thu, 29 Aug 2013 04:08:04 +0000 (22:08 -0600)]
altos/stm: New compiler doesn't correctly build flash bits yet

Use /opt/cortex until we make the packaged one work

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Force u-blox to 9600 baud for now
Keith Packard [Thu, 29 Aug 2013 04:04:18 +0000 (22:04 -0600)]
altos: Force u-blox to 9600 baud for now

The Max-7 parts just aren't happy switching baud rates, managing only
about half the time. Someday I'll figure out why, but until then, make
things work by just leaving the chips at 9600 baud

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Add debugging to ublox GPS driver
Keith Packard [Thu, 29 Aug 2013 04:02:48 +0000 (22:02 -0600)]
altos: Add debugging to ublox GPS driver

The new max 7 parts seem to be unhappy about switching baud rates, so
I've added a pile of debugging to help out. Some day, I'll figure out
how to make them work, this code is being left in place to help with that.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Update time for next alarm each time a task is added
Keith Packard [Thu, 29 Aug 2013 03:54:31 +0000 (21:54 -0600)]
altos: Update time for next alarm each time a task is added

Adding a task with a sooner timeout than existing alarm tasks was not
correctly updating the time to fire the next alarm, causing tasks to
be delayed by the wrong amount.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: TM v2 places the MMA6555 upside down compared to Tmega
Keith Packard [Thu, 29 Aug 2013 03:52:29 +0000 (21:52 -0600)]
altos: TM v2 places the MMA6555 upside down compared to Tmega

Means we need to invert the data coming out to make it work

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/telemetrum-v2.0: Use 9600 baud for ublox telemetrum-v2.0
Keith Packard [Wed, 28 Aug 2013 04:00:29 +0000 (22:00 -0600)]
altos/telemetrum-v2.0: Use 9600 baud for ublox

Something is up with the Max 7

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/telemetrum-v2.0: Fix MMA6555 SPI pin assignment
Keith Packard [Wed, 28 Aug 2013 03:36:02 +0000 (21:36 -0600)]
altos/telemetrum-v2.0: Fix MMA6555 SPI pin assignment

For TM v2.0, it's on PB 3-5, not PE13-15

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Rename TeleMetrum v2.0 ADC sense members
Keith Packard [Fri, 23 Aug 2013 18:25:56 +0000 (11:25 -0700)]
altos: Rename TeleMetrum v2.0 ADC sense members

Use sense_a and sense_m instead of sense[2]

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Add TeleMetrum v2.0 boot loader
Keith Packard [Tue, 20 Aug 2013 21:20:56 +0000 (14:20 -0700)]
altos: Add TeleMetrum v2.0 boot loader

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Initial TeleMetrum v2.0 bits
Keith Packard [Tue, 20 Aug 2013 18:40:17 +0000 (11:40 -0700)]
altos: Initial TeleMetrum v2.0 bits

Adds new telemetry and logging formats along with code for TeleMetrum
v2.0 design.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Don't use ao_data on cc1111 projects telemini
Keith Packard [Tue, 27 Aug 2013 01:46:02 +0000 (18:46 -0700)]
altos: Don't use ao_data on cc1111 projects

cc1111 ao_adc.c supplies the needed globals at this point, and linking
both into the program leads to two different versions of each at
different addresses (yay SDCC linker!)

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Make ao_wakeup reentrant
Keith Packard [Tue, 27 Aug 2013 01:44:23 +0000 (18:44 -0700)]
altos: Make ao_wakeup reentrant

In case we end up invoking it from two places at once.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Check for MS5607 MISO low before sleeping
Keith Packard [Tue, 27 Aug 2013 01:43:20 +0000 (18:43 -0700)]
altos: Check for MS5607 MISO low before sleeping

If the MISO line goes low before we manage to configure the
interrupts, we'll miss it entirely unless we check the pin explicitly.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/telemini-v2.0: Add ao_exti.h depend. Init beeper and usb.
Keith Packard [Tue, 27 Aug 2013 00:18:57 +0000 (17:18 -0700)]
altos/telemini-v2.0: Add ao_exti.h depend. Init beeper and usb.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Use %ld and %lu for MS5607 debug output
Keith Packard [Tue, 27 Aug 2013 00:18:17 +0000 (17:18 -0700)]
altos: Use %ld and %lu for MS5607 debug output

The value are 'long', so use the right printf format.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/cc1111: Wake up non-ADC sensor code each timer tick
Keith Packard [Tue, 27 Aug 2013 00:17:47 +0000 (17:17 -0700)]
altos/cc1111: Wake up non-ADC sensor code each timer tick

Make sure the MS5607 code gets told to sample every tick

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/cc1111: Leave pin interrupts completely disabled at init time
Keith Packard [Tue, 27 Aug 2013 00:16:54 +0000 (17:16 -0700)]
altos/cc1111: Leave pin interrupts completely disabled at init time

Don't even turn in the PICTL bits as that seems to cause the chip to
be unhappy.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Get telemini to copy current MS5607 state to ring.
Keith Packard [Tue, 27 Aug 2013 00:15:55 +0000 (17:15 -0700)]
altos: Get telemini to copy current MS5607 state to ring.

The ADC code is responsible for actually inserting the non-ADC data
into the ring, so do the copy there.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agocc1111: Hacky pin interrupt support. Only useful for TeleMini v2
Keith Packard [Mon, 26 Aug 2013 23:42:45 +0000 (16:42 -0700)]
cc1111: Hacky pin interrupt support. Only useful for TeleMini v2

This code is designed to support the MS5607 MISO interrupt bits.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agocc1111: Rework ADC configuration a bit, fix Tm V2 ADC usage
Keith Packard [Mon, 26 Aug 2013 23:41:33 +0000 (16:41 -0700)]
cc1111: Rework ADC configuration a bit, fix Tm V2 ADC usage

The Tm v2 ADC code was not actually fetching and storing the ADC
conversion values.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoao-tools: Use TeleDongle for default ao-dbg target
Keith Packard [Mon, 26 Aug 2013 23:39:47 +0000 (16:39 -0700)]
ao-tools: Use TeleDongle for default ao-dbg target

Makes more sense than assuming we're still using the old TI developer board.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Build more products by default
Keith Packard [Mon, 26 Aug 2013 05:34:09 +0000 (22:34 -0700)]
altos: Build more products by default

We keep creating more hardware...

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Changes required by cc1111 multi-spi support
Keith Packard [Mon, 26 Aug 2013 05:33:30 +0000 (22:33 -0700)]
altos: Changes required by cc1111 multi-spi support

These drivers got missed

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoBump version to 1.2.9.2 1.2.9.2
Keith Packard [Mon, 26 Aug 2013 05:29:46 +0000 (22:29 -0700)]
Bump version to 1.2.9.2

Set version for Airfest testing

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/teletiny-v2.0: Support multiple SPI busses on CC1111
Keith Packard [Wed, 12 Jun 2013 07:43:31 +0000 (00:43 -0700)]
altos/teletiny-v2.0: Support multiple SPI busses on CC1111

Needed for TeleMini v2.0

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Add exti and spi to telemini-v2.0
Keith Packard [Thu, 23 May 2013 22:52:59 +0000 (16:52 -0600)]
altos: Add exti and spi to telemini-v2.0

No longer builds like this

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Make TeleMini v2.0 fit
Keith Packard [Thu, 23 May 2013 08:17:51 +0000 (02:17 -0600)]
altos: Make TeleMini v2.0 fit

Mash lots of storage locations and code around to shrink stuff down to size

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Add 64-bit subtraction
Keith Packard [Thu, 23 May 2013 01:20:54 +0000 (19:20 -0600)]
altos: Add 64-bit subtraction

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Add 64x64 multiply. Test 64 ops for dest same as either source
Keith Packard [Thu, 23 May 2013 00:08:55 +0000 (17:08 -0700)]
altos: Add 64x64 multiply. Test 64 ops for dest same as either source

The test change is to ensure that the destination may be one of the 64
bit sources.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Make 64x16 mul a bit faster
Keith Packard [Wed, 22 May 2013 21:38:19 +0000 (14:38 -0700)]
altos: Make 64x16 mul a bit faster

the unsigned 32x32 multiply really does work, just use it

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Add 64-bit add/mul/shift for SDCC
Keith Packard [Wed, 22 May 2013 21:32:50 +0000 (14:32 -0700)]
altos: Add 64-bit add/mul/shift for SDCC

SDCC doeesn't provide a native 64-bit type (sigh), so
implement the minimal operations necessary for the MS5607 conversion
routine.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoInitial TeleMini bits
Keith Packard [Wed, 22 May 2013 20:03:06 +0000 (13:03 -0700)]
Initial TeleMini bits

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Explicitly list the linker script needed for AVR targets.
Keith Packard [Mon, 26 Aug 2013 05:22:55 +0000 (22:22 -0700)]
altos: Explicitly list the linker script needed for AVR targets.

Something changed in the binutils-avr package which makes the linker
fail to find the script in the default location.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoMerge branch 'master' into telegps-v0.3
Keith Packard [Mon, 26 Aug 2013 05:00:27 +0000 (22:00 -0700)]
Merge branch 'master' into telegps-v0.3

7 years agoaltos: MS5607 pressure computation for low temperatures was wrong
Keith Packard [Thu, 23 May 2013 01:31:15 +0000 (19:31 -0600)]
altos: MS5607 pressure computation for low temperatures was wrong

Second correction only applies to temps < -15°C, not 15°C.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Wake up on LPC usart ISR only once
Keith Packard [Sat, 17 Aug 2013 15:45:06 +0000 (17:45 +0200)]
altos: Wake up on LPC usart ISR only once

Instead of waking up after every character, wait until the FIFO is
empty to reduce overhead

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Set default LPC stack to 512 bytes, Em to 384 bytes
Keith Packard [Sat, 17 Aug 2013 15:43:18 +0000 (17:43 +0200)]
altos: Set default LPC stack to 512 bytes, Em to 384 bytes

The default for lpc has been raised to 512 bytes, but Em doesn't have
enough RAM for that.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltosdroid: Add note to report TeleBT battery level
Keith Packard [Sat, 17 Aug 2013 15:35:08 +0000 (17:35 +0200)]
altosdroid: Add note to report TeleBT battery level

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Use installed arm compiler for LPC
Keith Packard [Fri, 23 Aug 2013 18:24:18 +0000 (11:24 -0700)]
altos: Use installed arm compiler for LPC

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc: Stop using burst mode for LPC ADC
Keith Packard [Fri, 23 Aug 2013 18:22:10 +0000 (11:22 -0700)]
altos/lpc: Stop using burst mode for LPC ADC

Burst mode doesn't stop after one round of conversions, so we end up
getting incorrect values in whatever the last conversion register is.

Just use single conversions and take an interrupt per channel.

Also, slow down the ADC so that our values are more stable -- just
need to make sure we get the whole conversion sequence done 100 times
a second.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Allow products to disable RDF entirely telegps-v0.3
Keith Packard [Sun, 25 Aug 2013 06:22:18 +0000 (23:22 -0700)]
altos: Allow products to disable RDF entirely

TeleGPS doesn't ever want RDF

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Add telegps v0.3 product
Keith Packard [Sun, 25 Aug 2013 06:21:53 +0000 (23:21 -0700)]
altos: Add telegps v0.3 product

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: various cc115l driver hacks
Keith Packard [Tue, 20 Aug 2013 15:54:44 +0000 (08:54 -0700)]
altos: various cc115l driver hacks

Try to recover from TX_FIFO_UNDERFLOW by resetting the chip at idle
time.

Do a calibration phase during setup.

Program power to ramp up to limit key down noise.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Wake up on LPC usart ISR only once
Keith Packard [Sat, 17 Aug 2013 15:45:06 +0000 (17:45 +0200)]
altos: Wake up on LPC usart ISR only once

Instead of waking up after every character, wait until the FIFO is
empty to reduce overhead

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Set default LPC stack to 512 bytes, Em to 384 bytes
Keith Packard [Sat, 17 Aug 2013 15:43:18 +0000 (17:43 +0200)]
altos: Set default LPC stack to 512 bytes, Em to 384 bytes

The default for lpc has been raised to 512 bytes, but Em doesn't have
enough RAM for that.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Allow ublox to run at other baud rates
Keith Packard [Sat, 17 Aug 2013 15:40:33 +0000 (17:40 +0200)]
altos: Allow ublox to run at other baud rates

Provides a configuration option to set the ublox serial baud rate to
something other than 57600 baud

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: allow projects to override default config values
Keith Packard [Sat, 17 Aug 2013 15:36:35 +0000 (17:36 +0200)]
altos: allow projects to override default config values

Override default radio power and APRS interval

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltosdroid: Add note to report TeleBT battery level
Keith Packard [Sat, 17 Aug 2013 15:35:08 +0000 (17:35 +0200)]
altosdroid: Add note to report TeleBT battery level

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoMerge branch 'master' into telegps-v0.3
Keith Packard [Sat, 17 Aug 2013 15:33:31 +0000 (17:33 +0200)]
Merge branch 'master' into telegps-v0.3

7 years agoaltosui: AltosDbm class was missing somehow
Keith Packard [Sat, 17 Aug 2013 15:30:52 +0000 (17:30 +0200)]
altosui: AltosDbm class was missing somehow

This doesn't appear to have been added?

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoMerge remote-tracking branch 'origin/master'
Keith Packard [Sat, 17 Aug 2013 14:03:26 +0000 (16:03 +0200)]
Merge remote-tracking branch 'origin/master'

7 years agoaltos: Make FAT test program link explicitly against libcrypto
Keith Packard [Sat, 17 Aug 2013 14:01:44 +0000 (16:01 +0200)]
altos: Make FAT test program link explicitly against libcrypto

For some reason, the MD5_Final symbol isn't resolved when linking only
against libssl.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Tue, 30 Jul 2013 06:15:06 +0000 (00:15 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

7 years agoadd a note about callsign matching and case sensitivity to the manual
Bdale Garbee [Tue, 30 Jul 2013 06:14:41 +0000 (00:14 -0600)]
add a note about callsign matching and case sensitivity to the manual

7 years agoaltos: Remove ao_radio_gpio_bits from normal build
Keith Packard [Mon, 24 Jun 2013 21:29:43 +0000 (14:29 -0700)]
altos: Remove ao_radio_gpio_bits from normal build

Only needed for the CC115L_TRACE code, and it only builds on STM

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc: Rename serial port to 'serial0'
Keith Packard [Mon, 24 Jun 2013 21:29:01 +0000 (14:29 -0700)]
altos/lpc: Rename serial port to 'serial0'

This lets existing serial port users find the right function.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agomicropeak: Add Download button to menu bar
Keith Packard [Wed, 3 Jul 2013 00:54:38 +0000 (17:54 -0700)]
micropeak: Add Download button to menu bar

It's the most common activity, after all

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltosdroid: Just use GPS location provider to build on 4.2
Keith Packard [Wed, 3 Jul 2013 00:53:51 +0000 (17:53 -0700)]
altosdroid: Just use GPS location provider to build on 4.2

Attempts to use the network provider cause the app to crash

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Support mega-style logging without ADC
Keith Packard [Mon, 24 Jun 2013 21:28:06 +0000 (14:28 -0700)]
altos: Support mega-style logging without ADC

Used for TeleGPS, just exposes the necessary log writing function
without also including the ADC writing code.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltosui: Add EasyMini USB ids
Keith Packard [Mon, 24 Jun 2013 21:26:23 +0000 (14:26 -0700)]
altosui: Add EasyMini USB ids

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc: Add boot loader
Keith Packard [Mon, 24 Jun 2013 21:23:53 +0000 (14:23 -0700)]
altos/lpc: Add boot loader

Support the USB boot loader, add USB pull-up support.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/telefire-v0.1: Use same LED selection as the v0.2 setup
Keith Packard [Sat, 22 Jun 2013 07:53:38 +0000 (00:53 -0700)]
altos/telefire-v0.1: Use same LED selection as the v0.2 setup

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc: Don't disable all interrupts when disabling one interrupt
Keith Packard [Sat, 22 Jun 2013 02:40:59 +0000 (19:40 -0700)]
altos/lpc: Don't disable all interrupts when disabling one interrupt

The nvic iser and icer registers read value indicates all enabled
interrupts, icer writes disable the set interrupts. Re-writing icer
with the current value ends up disabling all interrupts, not exactly
what we wanted.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc: Remove ao_usb_task structure
Keith Packard [Sat, 22 Jun 2013 02:40:03 +0000 (19:40 -0700)]
altos/lpc: Remove ao_usb_task structure

It's not used

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc: Enable brown-out-detector
Keith Packard [Sat, 22 Jun 2013 02:39:27 +0000 (19:39 -0700)]
altos/lpc: Enable brown-out-detector

Make sure the processor does something sensible when the power disappears.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/telefire: Radio status (no data, weak data, good data) on LEDs
Keith Packard [Thu, 20 Jun 2013 05:45:54 +0000 (22:45 -0700)]
altos/telefire: Radio status (no data, weak data, good data) on LEDs

Instead of blinking RX/TX, report the radio status on the telefire
nodes, just like telelco does. This makes the LEDs on telefire
*exactly the same* as the LEDs on telelco, which seems like a good idea.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: PCA9922 LED driver needs Enable driven low to latch values
Keith Packard [Thu, 20 Jun 2013 05:44:16 +0000 (22:44 -0700)]
altos: PCA9922 LED driver needs Enable driven low to latch values

Driving Enable high means anything going past on the clock and data
pair is reflected on the LEDs, which isn't terribly useful

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/cc1111: Fetch RSSI for TeleFire from correct byte
Keith Packard [Thu, 20 Jun 2013 05:42:58 +0000 (22:42 -0700)]
altos/cc1111: Fetch RSSI for TeleFire from correct byte

Reading the status byte doesn't provide very useful RSSI info

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc: Get rid of ADC filter
Keith Packard [Mon, 17 Jun 2013 21:52:32 +0000 (14:52 -0700)]
altos/lpc: Get rid of ADC filter

Now that the source of the Vcc noise has been identified, remove the
unnecessary ADC filtering.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltosui: Add raw pressure to the AltosUI graph
Keith Packard [Mon, 17 Jun 2013 21:00:43 +0000 (14:00 -0700)]
altosui: Add raw pressure to the AltosUI graph

A nice addition, and useful when diagnosing baro sensor issues

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc: Get the IRC turned off after boot time
Keith Packard [Mon, 17 Jun 2013 21:00:11 +0000 (14:00 -0700)]
altos/lpc: Get the IRC turned off after boot time

This involved carefully moving the USB away from the IRC before
turning it off.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Disable USB on all flight computers when in flight mode
Keith Packard [Mon, 17 Jun 2013 20:58:41 +0000 (13:58 -0700)]
altos: Disable USB on all flight computers when in flight mode

There was a check to only disable USB on boards with radios, but for
EasyMini, we want to disable USB too for flight mode.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Declare m25 write-in-progress as 'ao_port_t'
Keith Packard [Mon, 17 Jun 2013 05:32:16 +0000 (22:32 -0700)]
altos: Declare m25 write-in-progress as 'ao_port_t'

This lets us use port bits greater than 7 for M25 chip selects

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc: Remove spurious semicolon
Keith Packard [Mon, 17 Jun 2013 05:31:58 +0000 (22:31 -0700)]
altos/lpc: Remove spurious semicolon

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc: Don't disable all of the clocks just yet, USB doesn't work
Keith Packard [Mon, 17 Jun 2013 05:31:31 +0000 (22:31 -0700)]
altos/lpc: Don't disable all of the clocks just yet, USB doesn't work

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc: Turn off more clocks, disable USART for easymini
Keith Packard [Sun, 16 Jun 2013 22:07:54 +0000 (15:07 -0700)]
altos/lpc: Turn off more clocks, disable USART for easymini

Try to reduce noise on the power supply.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc: Filter ADC inputs
Keith Packard [Sat, 15 Jun 2013 08:20:49 +0000 (01:20 -0700)]
altos/lpc: Filter ADC inputs

They're amazingly noisy on EasyMini, so just filter them as the only
thing we use them for is battery and pyro numbers.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc: Make ADC inputs work
Keith Packard [Fri, 14 Jun 2013 11:38:11 +0000 (04:38 -0700)]
altos/lpc: Make ADC inputs work

They're still very unstable (bouncing around a lot), but at least they
seem to report useful stuff now.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltosui: Use preferred units for main deployment height configuration
Keith Packard [Tue, 11 Jun 2013 23:31:20 +0000 (16:31 -0700)]
altosui: Use preferred units for main deployment height configuration

Show and accept values in the preferred units; create a separate list
of preferred values for each set of units

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/telelco: Add 30ms delay in search after finding a box
Keith Packard [Mon, 10 Jun 2013 06:18:09 +0000 (23:18 -0700)]
altos/telelco: Add 30ms delay in search after finding a box

This gives the remote boxes time to get back to listening for messages
after receiving the packet from the found box.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Add fast-timer API. Use for quadrature and button drivers
Keith Packard [Mon, 10 Jun 2013 05:09:13 +0000 (22:09 -0700)]
altos: Add fast-timer API. Use for quadrature and button drivers

This splits the fast-timer portion out of the debounce helper code and
shares that with the quadrature driver which now uses it directly.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Add debounce helper. Use in button and quadrature drivers for TeleLCO
Keith Packard [Tue, 14 May 2013 05:34:19 +0000 (22:34 -0700)]
altos: Add debounce helper. Use in button and quadrature drivers for TeleLCO

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/telefire: Leave siren on all the time. Add siren/strobe debugging.
Keith Packard [Sun, 9 Jun 2013 19:13:06 +0000 (12:13 -0700)]
altos/telefire: Leave siren on all the time. Add siren/strobe debugging.

The 50% duty cycle wasn't actually loud enough outside.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Add telefire v0.2 support
Keith Packard [Sun, 9 Jun 2013 17:00:54 +0000 (10:00 -0700)]
altos: Add telefire v0.2 support

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Add driver for 74hc165 shift register
Keith Packard [Sun, 9 Jun 2013 16:53:07 +0000 (09:53 -0700)]
altos: Add driver for 74hc165 shift register

Just reads one byte from the shift register using the SPI driver and returns it

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Add pyro operations to regular ignite commands
Keith Packard [Mon, 27 May 2013 04:38:56 +0000 (22:38 -0600)]
altos: Add pyro operations to regular ignite commands

Instead of having separate commands, just mix the two sets together.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoSet version to 1.2.9.1
Keith Packard [Mon, 27 May 2013 01:41:22 +0000 (19:41 -0600)]
Set version to 1.2.9.1

Mark bits to be used on Monday of NSL 2013

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Make manual pyro firing command work again
Keith Packard [Mon, 27 May 2013 01:48:03 +0000 (19:48 -0600)]
altos: Make manual pyro firing command work again

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: write pyro fired to correct log field
Keith Packard [Mon, 27 May 2013 01:47:02 +0000 (19:47 -0600)]
altos: write pyro fired to correct log field

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