fw/altos
11 years agoaltos: Get mma655x driver limping along
Keith Packard [Sat, 1 Sep 2012 03:19:40 +0000 (22:19 -0500)]
altos: Get mma655x driver limping along

This appears to drive the chip correctly to see values from the accelerometer.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Fix mma665x pin assigment for mma655x
Keith Packard [Sat, 1 Sep 2012 02:02:13 +0000 (21:02 -0500)]
altos: Fix mma665x pin assigment for mma655x

It's on PE13-PE15, not PA5-PA7

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add custom panic noise for self-test failures
Keith Packard [Sat, 1 Sep 2012 02:01:21 +0000 (21:01 -0500)]
altos: Add custom panic noise for self-test failures

Make it easier to tell which component is failing self test

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: another .gitignore file
Keith Packard [Thu, 30 Aug 2012 21:30:04 +0000 (16:30 -0500)]
altos: another .gitignore file

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: ao_cc_spi.h isn't necessary for telelco
Keith Packard [Thu, 30 Aug 2012 21:28:53 +0000 (16:28 -0500)]
altos: ao_cc_spi.h isn't necessary for telelco

The SPI radio defines are in ao_radio_spi.h

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge remote-tracking branch 'mjb/master'
Keith Packard [Thu, 30 Aug 2012 21:24:38 +0000 (16:24 -0500)]
Merge remote-tracking branch 'mjb/master'

11 years agoaltos: Add a bunch of .gitignore entries
Keith Packard [Thu, 30 Aug 2012 21:22:51 +0000 (16:22 -0500)]
altos: Add a bunch of .gitignore entries

Clean up the git status output

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Shuffle LCO functions around, add telelco first cut
Keith Packard [Thu, 30 Aug 2012 21:16:52 +0000 (16:16 -0500)]
altos: Shuffle LCO functions around, add telelco first cut

Pull LCO functions shared between LCO UI and command line into
ao_lco_funcs.c.

Import bits for telelco.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Disable debug printfs and fix pad ignite time for telefire
Keith Packard [Thu, 30 Aug 2012 21:14:57 +0000 (16:14 -0500)]
altos: Disable debug printfs and fix pad ignite time for telefire

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosdroid: Implement voice just like altosui
Mike Beattie [Thu, 30 Aug 2012 09:08:41 +0000 (21:08 +1200)]
altosdroid: Implement voice just like altosui

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: Move bluetooth check to first task
Mike Beattie [Thu, 30 Aug 2012 09:08:06 +0000 (21:08 +1200)]
altosdroid: Move bluetooth check to first task

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: add rssi/serial/flight, and re-work UI ordering
Mike Beattie [Thu, 30 Aug 2012 01:23:29 +0000 (13:23 +1200)]
altosdroid: add rssi/serial/flight, and re-work UI ordering

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: rename ambiguous TextView name
Mike Beattie [Thu, 30 Aug 2012 01:23:04 +0000 (13:23 +1200)]
altosdroid: rename ambiguous TextView name

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: formatting/whitespace, correct ids
Mike Beattie [Thu, 30 Aug 2012 01:21:38 +0000 (13:21 +1200)]
altosdroid: formatting/whitespace, correct ids

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: rework lat/lon to more common format
Mike Beattie [Thu, 30 Aug 2012 01:20:10 +0000 (13:20 +1200)]
altosdroid: rework lat/lon to more common format

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: rename azimuth/altitude to elevation/height respectively.
Mike Beattie [Thu, 30 Aug 2012 01:19:41 +0000 (13:19 +1200)]
altosdroid: rename azimuth/altitude to elevation/height respectively.

(Matches altoslib, altosui, altos)

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: move units into code, to match altosui
Mike Beattie [Thu, 30 Aug 2012 01:13:20 +0000 (13:13 +1200)]
altosdroid: move units into code, to match altosui

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoMerge remote-tracking branch 'mjb/master'
Keith Packard [Wed, 29 Aug 2012 18:29:24 +0000 (11:29 -0700)]
Merge remote-tracking branch 'mjb/master'

Pull in Mike's fancy new AltosDroid bits

11 years agoaltos: spiradio debug serial is port 1, not port 0
Keith Packard [Wed, 29 Aug 2012 18:25:36 +0000 (11:25 -0700)]
altos: spiradio debug serial is port 1, not port 0

The SPI link uses port 0; it seems like the having the two try to
share the same wires is a bad plan.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: SPI radio - use 1->0 for 'done' and 0->1 for 'ready'
Keith Packard [Wed, 29 Aug 2012 18:23:13 +0000 (11:23 -0700)]
altos: SPI radio - use 1->0 for 'done' and 0->1 for 'ready'

This changes how the SPI radio protocol uses the interrupt
line. Instead of a pulse indicating operation done, this now uses a 0
value for done and a 1 value for ready. The key distinction is that
the master can tell when the slave is waiting for the next command
instead of hoping that it got done 'soon enough'.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: fix ao_pad debug output for query command
Keith Packard [Wed, 29 Aug 2012 18:22:02 +0000 (11:22 -0700)]
altos: fix ao_pad debug output for query command

Igniter status is an array these days.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Use updated pad protocol for lco commands
Keith Packard [Wed, 29 Aug 2012 18:21:09 +0000 (11:21 -0700)]
altos: Use updated pad protocol for lco commands

Stop using the older single-channel protocol and switch to the new
multi-channel protocol

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Note changes to configured AES key for SPI radio convenience
Keith Packard [Wed, 29 Aug 2012 18:19:17 +0000 (11:19 -0700)]
altos: Note changes to configured AES key for SPI radio convenience

Keep a sequence number to mark when the AES key is changed so that the
radio code can avoid sending the key before every CMAC radio operation.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Wait for IN dma complete on slave SPI send
Keith Packard [Wed, 29 Aug 2012 18:16:42 +0000 (11:16 -0700)]
altos: Wait for IN dma complete on slave SPI send

SPI send double buffered, so the DMA completes one byte too early. Use
the recv DMA to know when the SPI transfer is complete.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosdroid: initial attempt at a UI.
Mike Beattie [Wed, 29 Aug 2012 13:01:06 +0000 (01:01 +1200)]
altosdroid: initial attempt at a UI.

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltos: Oops. forgot ao_data.c
Keith Packard [Wed, 29 Aug 2012 06:05:02 +0000 (23:05 -0700)]
altos: Oops. forgot ao_data.c

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add spiradio Makefile
Keith Packard [Wed, 29 Aug 2012 05:43:10 +0000 (22:43 -0700)]
altos: Add spiradio Makefile

git add doesn't add Makefile by default.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Mostly working SPI radio link
Keith Packard [Wed, 29 Aug 2012 01:13:02 +0000 (18:13 -0700)]
altos: Mostly working SPI radio link

This includes long delays to avoid overrunning the cc1111 input,
otherwise it works pretty well. The delays mean that we can't capture
the reply to a cmac command though, so more work is needed.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Include the radio_cmac debug commands in telefire
Keith Packard [Wed, 29 Aug 2012 01:12:27 +0000 (18:12 -0700)]
altos: Include the radio_cmac debug commands in telefire

Just temporary debugging

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Explicitly erase memory in STM eeprom driver.
Keith Packard [Wed, 29 Aug 2012 01:10:34 +0000 (18:10 -0700)]
altos: Explicitly erase memory in STM eeprom driver.

This seems to make the STM32L152 happier

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Track protocol changes to ao_pad debug messages
Keith Packard [Wed, 29 Aug 2012 01:08:59 +0000 (18:08 -0700)]
altos: Track protocol changes to ao_pad debug messages

Make the debug output build again.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Stop providing debug commands in seven-segment driver
Keith Packard [Wed, 29 Aug 2012 01:07:55 +0000 (18:07 -0700)]
altos: Stop providing debug commands in seven-segment driver

The radio_cmac debug commands use the same letter, and this code works now...

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Move radio_cmac test funcs from ao_lco_cmd.c to new file
Keith Packard [Wed, 29 Aug 2012 01:07:05 +0000 (18:07 -0700)]
altos: Move radio_cmac test funcs from ao_lco_cmd.c to new file

These are useful in the firing node for testing as well, so move them
to be shared.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: When sharing radio DMA for AES, use it for in instead of out
Keith Packard [Wed, 29 Aug 2012 01:05:10 +0000 (18:05 -0700)]
altos: When sharing radio DMA for AES, use it for in instead of out

We look at the out_done value, but not the in_done value; if we use
the radio DMA for out, we would have to use ao_radio_dma_done to check
for completion. This way, we can ignore that value and use the
existing ao_aes_dma_out_done value.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Fix ao_delay function and move from per-chip code to ao_task.c
Keith Packard [Wed, 29 Aug 2012 01:03:52 +0000 (18:03 -0700)]
altos: Fix ao_delay function and move from per-chip code to ao_task.c

ao_delay hasn't been chip-specific for a long time, and it had a bug
in not calling ao_clear_alarm.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoao-stmload: Always round up load amount to 4 byte boundary
Keith Packard [Wed, 29 Aug 2012 01:02:25 +0000 (18:02 -0700)]
ao-stmload: Always round up load amount to 4 byte boundary

The flashing code doesn't deal with partial writes.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Enable STM SYSCFG when routing EXTI
Keith Packard [Tue, 28 Aug 2012 05:45:47 +0000 (22:45 -0700)]
altos: Enable STM SYSCFG when routing EXTI

The EXTI routing information is in the syscfg unit, so that needs to
be powered up or writes to its registers will be lost.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: No need to initialize EXTI priorities at startup time
Keith Packard [Tue, 28 Aug 2012 05:45:20 +0000 (22:45 -0700)]
altos: No need to initialize EXTI priorities at startup time

They all get set to the correct value when enabled.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Wed, 29 Aug 2012 05:39:53 +0000 (23:39 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

Conflicts:
debian/control

11 years agolibelf-dev added to build deps
Bdale Garbee [Wed, 29 Aug 2012 05:37:00 +0000 (23:37 -0600)]
libelf-dev added to build deps

11 years agoaltosdroid: update Makefile.am for source file changes.
Mike Beattie [Tue, 28 Aug 2012 11:20:04 +0000 (23:20 +1200)]
altosdroid: update Makefile.am for source file changes.

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: Add Dumper class for testing
Mike Beattie [Tue, 28 Aug 2012 10:26:12 +0000 (22:26 +1200)]
altosdroid: Add Dumper class for testing

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: add timer to stop service
Mike Beattie [Tue, 28 Aug 2012 10:10:26 +0000 (22:10 +1200)]
altosdroid: add timer to stop service

* Stops when no UI clients, and no bluetooth connection remains

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: do service start/bind/unbind in start/stop, not create/destroy.
Mike Beattie [Tue, 28 Aug 2012 10:09:34 +0000 (22:09 +1200)]
altosdroid: do service start/bind/unbind in start/stop, not create/destroy.

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: move methods around
Mike Beattie [Tue, 28 Aug 2012 10:08:49 +0000 (22:08 +1200)]
altosdroid: move methods around

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: tidy up old messages
Mike Beattie [Tue, 28 Aug 2012 10:08:19 +0000 (22:08 +1200)]
altosdroid: tidy up old messages

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: stop sending device name, just send config data
Mike Beattie [Tue, 28 Aug 2012 10:07:39 +0000 (22:07 +1200)]
altosdroid: stop sending device name, just send config data

* Kinda complicated, but ultimately more sensible
* Just send the config data as an arg to MSG_CONNECTED
* keep retrying connection till we actually get config data

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: whitespace
Mike Beattie [Tue, 28 Aug 2012 10:00:14 +0000 (22:00 +1200)]
altosdroid: whitespace

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: override add_reply() to add android based debugging
Mike Beattie [Tue, 28 Aug 2012 09:59:40 +0000 (21:59 +1200)]
altosdroid: override add_reply() to add android based debugging

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: more logical name for connection_lost() method.
Mike Beattie [Tue, 28 Aug 2012 09:59:15 +0000 (21:59 +1200)]
altosdroid: more logical name for connection_lost() method.

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: rework ConnectThread
Mike Beattie [Tue, 28 Aug 2012 09:58:47 +0000 (21:58 +1200)]
altosdroid: rework ConnectThread

* Start input_thread after connection, otherwise it's painful to kill
  on connect failure.

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: fix a connection retry having a null pointer
Mike Beattie [Tue, 28 Aug 2012 09:55:40 +0000 (21:55 +1200)]
altosdroid: fix a connection retry having a null pointer

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: fix double call of stopAltosBluetooth()
Mike Beattie [Tue, 28 Aug 2012 09:54:05 +0000 (21:54 +1200)]
altosdroid: fix double call of stopAltosBluetooth()

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: Miscellaneous comments/debug/etc cleanup
Mike Beattie [Tue, 28 Aug 2012 09:53:01 +0000 (21:53 +1200)]
altosdroid: Miscellaneous comments/debug/etc cleanup

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: miscellaneous cleanup
Mike Beattie [Tue, 28 Aug 2012 05:37:45 +0000 (17:37 +1200)]
altosdroid: miscellaneous cleanup

* Copyright info
* whitespace
* comments
* unused imports

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: Add passing of Device Config at connect
Mike Beattie [Tue, 28 Aug 2012 05:36:41 +0000 (17:36 +1200)]
altosdroid: Add passing of Device Config at connect

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: Add new "TelemetryReader" class to handle Telemetry
Mike Beattie [Tue, 28 Aug 2012 05:35:11 +0000 (17:35 +1200)]
altosdroid: Add new "TelemetryReader" class to handle Telemetry

* Add MSG_TELEMETRY messages to both AltosDroid and TelemetryService
  to handle passing of AltosState object all the way back to the UI.
* Remove linkedblockinglist from TelemetryService
* (MSG_TELEMETRY is a rename of MSG_INCOMING_TELEM in AltosDroid)
* commented code in case statement inside AltosDroind - won't work with
  the objects it is currently passed.
* Add new "MSG_DEVCONFIG" message to AltosDroid - allows TelemetryService
  to pass information about the connected device back to the UI.

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: create connected() method
Mike Beattie [Tue, 28 Aug 2012 05:26:09 +0000 (17:26 +1200)]
altosdroid: create connected() method

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltos: Add spiradio product
Keith Packard [Mon, 27 Aug 2012 20:52:11 +0000 (13:52 -0700)]
altos: Add spiradio product

Implements the SPI radio protocol

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: sdcdb rc file for telefire
Keith Packard [Mon, 27 Aug 2012 20:51:53 +0000 (13:51 -0700)]
altos: sdcdb rc file for telefire

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add SPI linked radio API
Keith Packard [Mon, 27 Aug 2012 20:49:07 +0000 (13:49 -0700)]
altos: Add SPI linked radio API

Forward the necessary radio functions over the SPI link

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Clean up radio APIs
Keith Packard [Mon, 27 Aug 2012 20:47:16 +0000 (13:47 -0700)]
altos: Clean up radio APIs

Move api to ao_radio_cmac.h include file.
Expose ao_radio_test as standard API.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Build telelco and spiradio when possible
Keith Packard [Mon, 27 Aug 2012 20:45:56 +0000 (13:45 -0700)]
altos: Build telelco and spiradio when possible

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Expose a signed version of the tick count
Keith Packard [Mon, 27 Aug 2012 20:44:35 +0000 (13:44 -0700)]
altos: Expose a signed version of the tick count

Useful when doing time comparisons.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Specify the LCD duty cycle for stm-demo
Keith Packard [Mon, 27 Aug 2012 20:42:38 +0000 (13:42 -0700)]
altos: Specify the LCD duty cycle for stm-demo

This is the demo for the large 7-segment displays and needs static drive

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Test multiple quadrature devices. Export quadrature count.
Keith Packard [Mon, 27 Aug 2012 20:41:13 +0000 (13:41 -0700)]
altos: Test multiple quadrature devices. Export quadrature count.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Seven segment display driver
Keith Packard [Mon, 27 Aug 2012 20:38:44 +0000 (13:38 -0700)]
altos: Seven segment display driver

Hex numbers and the decimal point.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: More SPI slave changes for cc1111 driver
Keith Packard [Mon, 27 Aug 2012 20:37:14 +0000 (13:37 -0700)]
altos: More SPI slave changes for cc1111 driver

Don't enable DMA in the other direction when doing slave transfers.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add SPI slave get/put macros to cc1111
Keith Packard [Mon, 27 Aug 2012 20:35:39 +0000 (13:35 -0700)]
altos: Add SPI slave get/put macros to cc1111

Theese don't try to drive the chip select line

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Provide interface for STM LCD driver.
Keith Packard [Mon, 27 Aug 2012 20:34:12 +0000 (13:34 -0700)]
altos: Provide interface for STM LCD driver.

This provides a simple function interface for driving the LCD segments
in the STM chip. It also uses the update complete interrupt to block
LCD users during flush.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Rename drivers/ao_lco to drivers/ao_lco_cmd
Keith Packard [Mon, 27 Aug 2012 20:32:41 +0000 (13:32 -0700)]
altos: Rename drivers/ao_lco to drivers/ao_lco_cmd

These contain command line functions for testing the cmac and lco
features. Now that there's a telelco-specific ao_lco interface file,
it's useful to have both for testing.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosdroid: Let a freshly connected client know what the device name is!
Mike Beattie [Mon, 27 Aug 2012 07:41:47 +0000 (19:41 +1200)]
altosdroid: Let a freshly connected client know what the device name is!

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: Add Connected/Connect_failed messages
Mike Beattie [Mon, 27 Aug 2012 07:41:29 +0000 (19:41 +1200)]
altosdroid: Add Connected/Connect_failed messages

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: don't need keys for Bundles anymore
Mike Beattie [Mon, 27 Aug 2012 07:40:30 +0000 (19:40 +1200)]
altosdroid: don't need keys for Bundles anymore

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: Toast() requests don't need Bundles
Mike Beattie [Mon, 27 Aug 2012 07:39:53 +0000 (19:39 +1200)]
altosdroid: Toast() requests don't need Bundles

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: really don't need to store a local copy of the device name
Mike Beattie [Mon, 27 Aug 2012 07:39:09 +0000 (19:39 +1200)]
altosdroid: really don't need to store a local copy of the device name

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: remove complexity around message passing
Mike Beattie [Mon, 27 Aug 2012 07:37:16 +0000 (19:37 +1200)]
altosdroid: remove complexity around message passing

* Don't really need to use bundles
* TelemetryService: Use a local variable to store the bluetooth device object

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltos: Trigger sample complete when all data are ready
Keith Packard [Sun, 26 Aug 2012 16:53:16 +0000 (09:53 -0700)]
altos: Trigger sample complete when all data are ready

This has each sensor mark a bit in the current data record which is
then sent for processing when all of the data are present.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Shrink STM stack size
Keith Packard [Sun, 26 Aug 2012 16:52:27 +0000 (09:52 -0700)]
altos: Shrink STM stack size

512 bytes should be enough for anybody.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Make ao_cur_task_index track ao_cur_task in ao_yield
Keith Packard [Sun, 26 Aug 2012 16:49:34 +0000 (09:49 -0700)]
altos: Make ao_cur_task_index track ao_cur_task in ao_yield

This keeps the two main task references (index and pointer) in
agreement during task switching, avoiding an extra assignment at the
end of the task switching loop.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Make 'pad' driver useful with telefire v0.1
Keith Packard [Sun, 26 Aug 2012 16:47:05 +0000 (09:47 -0700)]
altos: Make 'pad' driver useful with telefire v0.1

This reports correct status bits over the radio and to the LEDs for
all four channels, and also makes the firing test command control all
four relays.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add debug command for 74hc597 driver
Keith Packard [Sun, 26 Aug 2012 16:45:03 +0000 (09:45 -0700)]
altos: Add debug command for 74hc597 driver

This dumps the current state of the 74hc597 chip.

Note that this shows that the 74hc597 driver doesn't work, and that
the circuit used in telefire v0.1 can't work.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Allow sharing of radio DMA with aes engine
Keith Packard [Sun, 26 Aug 2012 16:43:34 +0000 (09:43 -0700)]
altos: Allow sharing of radio DMA with aes engine

otherwise, telefire doesn't have enough DMA channels.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosdroid: begin adding TextToSpeech support.
Mike Beattie [Sun, 26 Aug 2012 11:38:33 +0000 (23:38 +1200)]
altosdroid: begin adding TextToSpeech support.

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: whitespace cleanup
Mike Beattie [Sun, 26 Aug 2012 11:38:10 +0000 (23:38 +1200)]
altosdroid: whitespace cleanup

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: Send device name and connected state back to TelemetryService
Mike Beattie [Sun, 26 Aug 2012 11:37:58 +0000 (23:37 +1200)]
altosdroid: Send device name and connected state back to TelemetryService

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: re-work connect/thread handling in AltosBluetooth
Mike Beattie [Sun, 26 Aug 2012 11:37:33 +0000 (23:37 +1200)]
altosdroid: re-work connect/thread handling in AltosBluetooth

* Much more resilient to failure
* handles multiple blocked threads better

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: remove old commented code
Mike Beattie [Sun, 26 Aug 2012 11:34:59 +0000 (23:34 +1200)]
altosdroid: remove old commented code

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: add handling when restarting BT. delay start after stop.
Mike Beattie [Sun, 26 Aug 2012 11:34:45 +0000 (23:34 +1200)]
altosdroid: add handling when restarting BT. delay start after stop.

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: set devicename and pass on to clients
Mike Beattie [Sun, 26 Aug 2012 11:34:28 +0000 (23:34 +1200)]
altosdroid: set devicename and pass on to clients

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: Send current state to client on connect
Mike Beattie [Sun, 26 Aug 2012 11:30:45 +0000 (23:30 +1200)]
altosdroid: Send current state to client on connect

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: add missing break; (just in case!)
Mike Beattie [Sun, 26 Aug 2012 11:30:00 +0000 (23:30 +1200)]
altosdroid: add missing break; (just in case!)

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: debugging statements
Mike Beattie [Sun, 26 Aug 2012 11:29:25 +0000 (23:29 +1200)]
altosdroid: debugging statements

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: forgot change to IncomingHandler constructor call. oops!
Mike Beattie [Sun, 26 Aug 2012 11:28:59 +0000 (23:28 +1200)]
altosdroid: forgot change to IncomingHandler constructor call. oops!

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: Strings and Layout changes
Mike Beattie [Sun, 26 Aug 2012 11:28:26 +0000 (23:28 +1200)]
altosdroid: Strings and Layout changes

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: lots of debugging statements
Mike Beattie [Sun, 26 Aug 2012 11:26:58 +0000 (23:26 +1200)]
altosdroid: lots of debugging statements

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: need sendMessageToClients() for setState().. oops!
Mike Beattie [Sun, 26 Aug 2012 11:24:13 +0000 (23:24 +1200)]
altosdroid: need sendMessageToClients() for setState().. oops!

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: Need access to handler inside AltosBluetooth
Mike Beattie [Sun, 26 Aug 2012 11:23:33 +0000 (23:23 +1200)]
altosdroid: Need access to handler inside AltosBluetooth

* Also move add_monitor() call

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: reflect change in message name
Mike Beattie [Sun, 26 Aug 2012 11:20:01 +0000 (23:20 +1200)]
altosdroid: reflect change in message name

Signed-off-by: Mike Beattie <mike@ethernal.org>
11 years agoaltosdroid: begin adding state support
Mike Beattie [Sun, 26 Aug 2012 11:19:06 +0000 (23:19 +1200)]
altosdroid: begin adding state support

Signed-off-by: Mike Beattie <mike@ethernal.org>