fw/altos
7 years agoMerge remote-tracking branch 'origin/master'
Keith Packard [Tue, 8 Oct 2013 16:26:41 +0000 (09:26 -0700)]
Merge remote-tracking branch 'origin/master'

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

7 years agoAdd --with parameters to configure for compiler selection new-state
Keith Packard [Tue, 8 Oct 2013 16:22:03 +0000 (09:22 -0700)]
Add --with parameters to configure for compiler selection

This allows the user to specify which compiler to use for each target
CPU. Also checks to make sure the arm compiler supports -m0 and -m3
cpu type flags. The build now actually uses the specified compilers too.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/stm: New GAS version requires flags in APSR assignment
Keith Packard [Tue, 8 Oct 2013 16:20:12 +0000 (09:20 -0700)]
altos/stm: New GAS version requires flags in APSR assignment

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Rename easymini-v0.1 to easymini-v1.0
Keith Packard [Tue, 8 Oct 2013 05:00:15 +0000 (22:00 -0700)]
altos: Rename easymini-v0.1 to easymini-v1.0

The production boards are the same as the modified v0.1 boards

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/lpc, altos/stm: ARM requires ISB after switching stack pointers
Keith Packard [Tue, 8 Oct 2013 04:53:53 +0000 (21:53 -0700)]
altos/lpc, altos/stm: ARM requires ISB after switching stack pointers

This sticks a barrier in the CPU to prevent using the wrong stack
register past the change.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Don't require an LED for ao_flight
Keith Packard [Tue, 8 Oct 2013 04:51:30 +0000 (21:51 -0700)]
altos: Don't require an LED for ao_flight

EasyMini has no LEDs. Deal with it.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoChange differentiation filter constants and limits
Keith Packard [Tue, 8 Oct 2013 04:49:55 +0000 (21:49 -0700)]
Change differentiation filter constants and limits

Larger limits avoids clipping legit data. Using the same filter time
for both ascent and descent makes the results look a bit cleaner.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agonew toolchain for STM32L is in /usr/bin, not /opt/cortex/bin
Bdale Garbee [Tue, 8 Oct 2013 03:56:46 +0000 (21:56 -0600)]
new toolchain for STM32L is in /usr/bin, not /opt/cortex/bin

7 years agoaltos: Set TeleMini v2.0 USB ID correctly
Keith Packard [Thu, 19 Sep 2013 05:29:25 +0000 (00:29 -0500)]
altos: Set TeleMini v2.0 USB ID correctly

Uses 0x0027

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoAdd TeleMini v2.0 telemetry support
Keith Packard [Thu, 19 Sep 2013 05:28:55 +0000 (00:28 -0500)]
Add TeleMini v2.0 telemetry support

Includes AltosLib and ao-telem

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Prefer averaged ground pres for ground alt computation
Keith Packard [Thu, 19 Sep 2013 05:26:24 +0000 (00:26 -0500)]
altoslib: Prefer averaged ground pres for ground alt computation

If ground pressure is recorded (as from an eeprom file), then prefer
that value to the average of the pre-boost ground pressures when
computing the ground altitude.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/telemetrum-v2.0: Use red LED during boot time
Keith Packard [Sun, 15 Sep 2013 21:29:46 +0000 (14:29 -0700)]
altos/telemetrum-v2.0: Use red LED during boot time

If the LED is stuck on, then the board has failed to initialize,
so use red instead of green as a warning indicator.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/telemini-v2.0: Change initialization order
Keith Packard [Sun, 15 Sep 2013 21:29:09 +0000 (14:29 -0700)]
altos/telemini-v2.0: Change initialization order

Make sure busses are running before devices are initialized

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Stop copying cc1111 binaries to the altos/src dir
Keith Packard [Sun, 15 Sep 2013 21:21:08 +0000 (14:21 -0700)]
altos: Stop copying cc1111 binaries to the altos/src dir

Just clutters up that directory.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Add nanopeak-v0.1
Keith Packard [Sun, 15 Sep 2013 21:13:59 +0000 (14:13 -0700)]
altos: Add nanopeak-v0.1

The same as micropeak, just a few different pins

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Move micropeak sources around
Keith Packard [Sun, 15 Sep 2013 21:11:50 +0000 (14:11 -0700)]
altos: Move micropeak sources around

This sticks the micropeak sources in appropriate directories, rather
than in the micropeak product directory so that they can be shared
with future micropeak-style products.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltosui: Include device name in Table view
Keith Packard [Sat, 7 Sep 2013 01:24:46 +0000 (18:24 -0700)]
altosui: Include device name in Table view

It's part of the telemetry, so we might as well display it

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: TeleMetrum v2 telemetry includes computes Pa/°C, not raw values
Keith Packard [Sat, 7 Sep 2013 01:23:06 +0000 (18:23 -0700)]
altoslib: TeleMetrum v2 telemetry includes computes Pa/°C, not raw values

Telemetry sends converted pressure/temp values as it doesn't include the
MS5607 calibration data.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Add receiver serial to telem file names
Keith Packard [Fri, 6 Sep 2013 23:54:07 +0000 (16:54 -0700)]
altoslib: Add receiver serial to telem file names

Makes it easy to record telemetry from multiple sites and compare them later.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltosui: Set 'flight' value in AltosEepromMonitor window during download
Keith Packard [Fri, 6 Sep 2013 23:52:51 +0000 (16:52 -0700)]
altosui: Set 'flight' value in AltosEepromMonitor window during download

This feature was lost in the AltosState updates

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltosui: Load Telem files in AltosDataChooser too
Keith Packard [Fri, 6 Sep 2013 23:52:06 +0000 (16:52 -0700)]
altosui: Load Telem files in AltosDataChooser too

Telem file loading was stubbed out from AltosState changes

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Add TeleMini eeprom file to Makefile.am
Keith Packard [Fri, 6 Sep 2013 23:51:44 +0000 (16:51 -0700)]
altoslib: Add TeleMini eeprom file to Makefile.am

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Lock access to AltosLink config_data
Keith Packard [Fri, 6 Sep 2013 23:50:46 +0000 (16:50 -0700)]
altoslib: Lock access to AltosLink config_data

Prevents multiple callers from trying to get config data at the same
time and messing up the serial line

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Set 'valid' for valid TeleMetrum eeprom download
Keith Packard [Fri, 6 Sep 2013 23:49:36 +0000 (16:49 -0700)]
altoslib: Set 'valid' for valid TeleMetrum eeprom download

Had separate 'tick_valid' value, which wasn't useful as the supertype
didn't look there.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib/altosui: Add TeleMini-v1.0 eeprom support
Keith Packard [Fri, 6 Sep 2013 23:48:52 +0000 (16:48 -0700)]
altoslib/altosui: Add TeleMini-v1.0 eeprom support

Got lost in the AltosState transition

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltosui: Remove debugging printf from InfoTable
Keith Packard [Fri, 6 Sep 2013 06:31:22 +0000 (23:31 -0700)]
altosui: Remove debugging printf from InfoTable

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Set tick value in new TeleMetrum v2 sensor packets
Keith Packard [Fri, 6 Sep 2013 05:57:19 +0000 (22:57 -0700)]
altos: Set tick value in new TeleMetrum v2 sensor packets

Was getting left with the old value, which wasn't very useful

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoao-tools/ao-telem: Parse new TM v2 packets
Keith Packard [Fri, 6 Sep 2013 05:56:57 +0000 (22:56 -0700)]
ao-tools/ao-telem: Parse new TM v2 packets

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltosui: Fix 'Graph Flight' button in landed dialog
Keith Packard [Fri, 6 Sep 2013 05:56:11 +0000 (22:56 -0700)]
altosui: Fix 'Graph Flight' button in landed dialog

Telemetry file reading was broken (oops!)

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Remove debug printf from AltosTelemetryMetrumSensor
Keith Packard [Fri, 6 Sep 2013 05:55:43 +0000 (22:55 -0700)]
altoslib: Remove debug printf from AltosTelemetryMetrumSensor

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Rewrite AltosTelemetryIterable
Keith Packard [Fri, 6 Sep 2013 05:55:09 +0000 (22:55 -0700)]
altoslib: Rewrite AltosTelemetryIterable

Sort while reading instead of sorting separately.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Record time_change in AltosState correctly
Keith Packard [Fri, 6 Sep 2013 05:54:02 +0000 (22:54 -0700)]
altoslib: Record time_change in AltosState correctly

time_change is used to make real-time playback work.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Update received time when replaying flights
Keith Packard [Fri, 6 Sep 2013 05:53:14 +0000 (22:53 -0700)]
altoslib: Update received time when replaying flights

Received time is otherwise recorded as the time when the packets were
read from the file, which doesn't work in real-time playback

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Only open log file when both flight and serial are known
Keith Packard [Fri, 6 Sep 2013 05:52:22 +0000 (22:52 -0700)]
altoslib: Only open log file when both flight and serial are known

Some telemetry formats include serial and flight in different packets,
so wait for both before creating the file

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Use AltosTelemetry.parse to pull telem lines apart
Keith Packard [Thu, 5 Sep 2013 22:03:07 +0000 (15:03 -0700)]
altoslib: Use AltosTelemetry.parse to pull telem lines apart

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Remove more AltosRecord based files
Keith Packard [Thu, 5 Sep 2013 22:02:47 +0000 (15:02 -0700)]
altoslib: Remove more AltosRecord based files

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: remove AltosRecord based eeprom code
Keith Packard [Thu, 5 Sep 2013 18:55:24 +0000 (11:55 -0700)]
altoslib: remove AltosRecord based eeprom code

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Remove AltosRecord-based telemetry code
Keith Packard [Thu, 5 Sep 2013 18:50:41 +0000 (11:50 -0700)]
altoslib: Remove AltosRecord-based telemetry code

All of this is now AltosState based

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltosdroid: convert rogue files to unix line endings
Mike Beattie [Tue, 3 Sep 2013 03:11:33 +0000 (15:11 +1200)]
altosdroid: convert rogue files to unix line endings

Signed-off-by: Mike Beattie <mike@ethernal.org>
7 years agoaltosdroid: more updates for new AltosState
Mike Beattie [Wed, 4 Sep 2013 15:11:42 +0000 (03:11 +1200)]
altosdroid: more updates for new AltosState

Signed-off-by: Mike Beattie <mike@ethernal.org>
Conflicts:
altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java

7 years agoaltosdroid: update to support new state code
Mike Beattie [Tue, 3 Sep 2013 03:10:23 +0000 (15:10 +1200)]
altosdroid: update to support new state code

Signed-off-by: Mike Beattie <mike@ethernal.org>
Conflicts:
altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java
altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java
altosdroid/src/org/altusmetrum/AltosDroid/TabPad.java

7 years agoaltoslib: Finish AltosState changes. Update version number.
Keith Packard [Thu, 5 Sep 2013 18:33:48 +0000 (11:33 -0700)]
altoslib: Finish AltosState changes. Update version number.

Removes all of the AltosRecord bits, changes the monitor idle bits to
have per-object state updaters.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Set measured acceleration for measured acceleration
Keith Packard [Tue, 3 Sep 2013 23:42:42 +0000 (17:42 -0600)]
altoslib: Set measured acceleration for measured acceleration

Was setting computed acceleration even for measured data

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Clear sat data when tick changes
Keith Packard [Tue, 3 Sep 2013 23:42:00 +0000 (17:42 -0600)]
altoslib: Clear sat data when tick changes

Sat data comes in multiple records, but the tick is always the same,
so use that to tell when the set of sats is new

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Start integrated value at 0 by default
Keith Packard [Tue, 3 Sep 2013 23:41:12 +0000 (17:41 -0600)]
altoslib: Start integrated value at 0 by default

Check for MISSING and start at zero in that case

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Use first few baro samples for ground pressure on TM
Keith Packard [Tue, 3 Sep 2013 23:40:04 +0000 (17:40 -0600)]
altoslib: Use first few baro samples for ground pressure on TM

TM didn't record the ground baro reading in the log file, so pull out
the first few measured baro samples and use those instead.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Make Ascent/descent use different filter values. Always filter.
Keith Packard [Tue, 3 Sep 2013 23:38:20 +0000 (17:38 -0600)]
altoslib: Make Ascent/descent use different filter values. Always filter.

In derivative code, use a shorter filter during ascent as the baro
sensor is cleaner then. Then, make sure to always filter the values as
the very first few baro samples can be noisy, which generates a bad
starting speed.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Remove duplicate cmd/tick from TM eeprom file code
Keith Packard [Tue, 3 Sep 2013 23:36:16 +0000 (17:36 -0600)]
altoslib: Remove duplicate cmd/tick from TM eeprom file code

Also replace tick setting with super call (which does that)

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Clean up metrum eeprom file reading
Keith Packard [Tue, 3 Sep 2013 23:35:23 +0000 (17:35 -0600)]
altoslib: Clean up metrum eeprom file reading

Spurious tick setting, fix some local variable names

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Correct mega/metrum eeprom years by adding 2000
Keith Packard [Tue, 3 Sep 2013 23:34:41 +0000 (17:34 -0600)]
altoslib: Correct mega/metrum eeprom years by adding 2000

The files contain a single byte for year, which is always years since 2000.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Correct tick wrapping in eeprom file reading
Keith Packard [Tue, 3 Sep 2013 23:32:37 +0000 (17:32 -0600)]
altoslib: Correct tick wrapping in eeprom file reading

Just need to signal that at least one record has been read to know
when to start checking for wrap

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: Ensure eeprom file body always exists
Keith Packard [Tue, 3 Sep 2013 23:31:58 +0000 (17:31 -0600)]
altoslib: Ensure eeprom file body always exists

Create an empty list of body elements if none were read from the file

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib: More AltosState hacking
Keith Packard [Tue, 3 Sep 2013 05:10:23 +0000 (23:10 -0600)]
altoslib: More AltosState hacking

EasyMini graphs are looking good now.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos: Not all products have pins to control flash loader
Keith Packard [Tue, 3 Sep 2013 05:08:34 +0000 (23:08 -0600)]
altos: Not all products have pins to control flash loader

TeleGPS has no exposed pins for this function

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltoslib/altosui: Further AltosState transition work
Keith Packard [Sun, 1 Sep 2013 04:11:39 +0000 (23:11 -0500)]
altoslib/altosui: Further AltosState transition work

Parses most eeprom and telem records now; altosui updated to show from
AltosState info.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 years agoaltos/telegps: Initialize logging system
Keith Packard [Sun, 1 Sep 2013 04:10:56 +0000 (23:10 -0500)]
altos/telegps: Initialize logging system

Otherwise, very little logging works

Signed-off-by: Keith Packard <keithp@keithp.com>
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>