fw/altos
12 years agoSet version to 0.9.3 0.9.3
Keith Packard [Thu, 26 May 2011 02:48:53 +0000 (20:48 -0600)]
Set version to 0.9.3

12 years agoaltos: Make telescience reliably log only when told to
Keith Packard [Tue, 24 May 2011 21:10:01 +0000 (15:10 -0600)]
altos: Make telescience reliably log only when told to

Use a pull-up on telescience and tri-state input on telemetrum at boot
time. Enable logging by pulling the TM output low and enabling as an
output, disable by pulling the TM output high and switching back to
input mode.

Also, ignore pin state changes for 5 seconds at boot to give things a
chance  to settle down.

Should work when both boards are powered up together.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Move logging printfs out of ISR call chain
Keith Packard [Mon, 23 May 2011 22:20:30 +0000 (16:20 -0600)]
src-avr: Move logging printfs out of ISR call chain

Probably not the best plan to call printf from an interrupt handler.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Control log with pin on companion connector
Keith Packard [Mon, 23 May 2011 18:52:40 +0000 (11:52 -0700)]
src-avr: Control log with pin on companion connector

Use the SPI chip select (SS) which is hooked to port B0.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Signal ascent using P1_2 (0 = ascent, 1 = other)
Keith Packard [Mon, 23 May 2011 18:31:34 +0000 (11:31 -0700)]
altos: Signal ascent using P1_2 (0 = ascent, 1 = other)

This can control an external recording device to log data only during ascent.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos, altosui: Add igniter mode (dual, apogee, main)
Keith Packard [Mon, 23 May 2011 18:32:29 +0000 (11:32 -0700)]
altos, altosui: Add igniter mode (dual, apogee, main)

This provides for redundant charges for either apogee or main.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Check RAM usage for telescience
Keith Packard [Sun, 22 May 2011 04:06:29 +0000 (21:06 -0700)]
src-avr: Check RAM usage for telescience

ATmega32u4 has only 2.5kB of ram, so check the output of the compiler
to make sure it will work.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: bump ADC ring to 16 samples
Keith Packard [Sun, 22 May 2011 04:05:30 +0000 (21:05 -0700)]
src-avr: bump ADC ring to 16 samples

We've got ram for it at this point, and it's nice to have more data
from before boost detect.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Finish up telescience logging
Keith Packard [Sun, 22 May 2011 02:55:08 +0000 (19:55 -0700)]
src-avr: Finish up telescience logging

Adds list and delete commands, making them compatible with telemetrum
and telemini equivalents.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Log ADC data to eeprom
Keith Packard [Sun, 22 May 2011 01:41:29 +0000 (18:41 -0700)]
src-avr: Log ADC data to eeprom

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Clean up AVR ADC code
Keith Packard [Sat, 21 May 2011 09:13:20 +0000 (02:13 -0700)]
src-avr: Clean up AVR ADC code

Remove interrupt debug variables, print channel number in ao_adc_dump.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Add ADC routines to telescience
Keith Packard [Sat, 21 May 2011 06:47:55 +0000 (23:47 -0700)]
src-avr: Add ADC routines to telescience

Note that SLEEP mode must be disabled or extra ADC interrupts occur,
which messes up saving ADC values to the right channel.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Reduce control connection interrupts
Keith Packard [Fri, 20 May 2011 09:47:20 +0000 (02:47 -0700)]
src-avr: Reduce control connection interrupts

Leave these disabled while processing stuff; otherwise we receive a
steady stream of them.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Clean up the USB echo debug task a bit
Keith Packard [Fri, 20 May 2011 09:39:03 +0000 (02:39 -0700)]
src-avr: Clean up the USB echo debug task a bit

12 years agosrc-avr: Disable USB interrupts while we're not interested
Keith Packard [Fri, 20 May 2011 09:36:59 +0000 (02:36 -0700)]
src-avr: Disable USB interrupts while we're not interested

We leave USB data lying around until called for, which results in
constant badgering if interrupts are enabled. Disable them until there
isn't any data left.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Add USB IRQ debug cmd
Keith Packard [Fri, 20 May 2011 08:46:02 +0000 (01:46 -0700)]
src-avr: Add USB IRQ debug cmd

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Attempt to leave IN interrupts disabled most of the time
Keith Packard [Fri, 20 May 2011 08:40:27 +0000 (01:40 -0700)]
src-avr: Attempt to leave IN interrupts disabled most of the time

12 years agosrc-avr: Add 'sleep_cpu' to reduce power usage while idle
Keith Packard [Fri, 20 May 2011 08:35:49 +0000 (01:35 -0700)]
src-avr: Add 'sleep_cpu' to reduce power usage while idle

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Add SPI modules to telescience
Keith Packard [Fri, 20 May 2011 06:56:59 +0000 (23:56 -0700)]
src-avr: Add SPI modules to telescience

And it works too!

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Add telescience build target
Keith Packard [Fri, 20 May 2011 06:43:17 +0000 (23:43 -0700)]
src-avr: Add telescience build target

No serial output, just USB

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Get USB on AVR working
Keith Packard [Wed, 18 May 2011 07:18:58 +0000 (00:18 -0700)]
src-avr: Get USB on AVR working

As usual, the key is to know when to send 0-length IN and OUT
packets. Needs a bunch of cleanup, but it's working now.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Make avr-demo objects depend on ao_usb.h
Keith Packard [Wed, 18 May 2011 07:18:15 +0000 (00:18 -0700)]
src-avr: Make avr-demo objects depend on ao_usb.h

Now that we have a usb driver, it's part of the build

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Trap accidental restart
Keith Packard [Wed, 18 May 2011 07:17:04 +0000 (00:17 -0700)]
src-avr: Trap accidental restart

Use the LED output pin to notice when avr-demo accidentally restarts
and print out an error message in that case.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Suspend interrupts while switching stacks
Keith Packard [Wed, 18 May 2011 07:12:40 +0000 (00:12 -0700)]
src-avr: Suspend interrupts while switching stacks

Setting the stack pointer takes two instructions, so make sure we
don't get an interrupt in the middle of it. Let the restoration of
SREG set the interrupt flag as appropriate.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: USB work in progress
Keith Packard [Wed, 18 May 2011 00:52:35 +0000 (17:52 -0700)]
src-avr: USB work in progress

Some packets are flowing, although it's not working right.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agosrc-avr: Add a couple of missing files
Keith Packard [Wed, 18 May 2011 00:51:55 +0000 (17:51 -0700)]
src-avr: Add a couple of missing files

These are part of the ../src directory, I think

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos-avr: Start writing USB driver.
Keith Packard [Mon, 16 May 2011 04:55:27 +0000 (21:55 -0700)]
altos-avr: Start writing USB driver.

Adapt ao_usb to new environment.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos-avr: Enable command processor over serial line in demo
Keith Packard [Fri, 13 May 2011 08:33:49 +0000 (01:33 -0700)]
altos-avr: Enable command processor over serial line in demo

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos-avr: Initial OS port to AVR
Keith Packard [Fri, 13 May 2011 08:27:22 +0000 (01:27 -0700)]
altos-avr: Initial OS port to AVR

This is working with output to the serial line

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoao-bringup-avr: cleaner stack switching code
Keith Packard [Fri, 13 May 2011 07:08:58 +0000 (00:08 -0700)]
ao-bringup-avr: cleaner stack switching code

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoao-bringup-avr: clean up alternate stack code
Keith Packard [Fri, 13 May 2011 07:04:06 +0000 (00:04 -0700)]
ao-bringup-avr: clean up alternate stack code

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoao-bringup-avr: switching to alternate stack works
Keith Packard [Fri, 13 May 2011 07:02:14 +0000 (00:02 -0700)]
ao-bringup-avr: switching to alternate stack works

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoao-bringup-avr: Create common 'ao-bringup' interfaces
Keith Packard [Fri, 13 May 2011 05:33:25 +0000 (22:33 -0700)]
ao-bringup-avr: Create common 'ao-bringup' interfaces

Initializes the clock, configures STDIO to talk to the UART

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoAdd uart test
Keith Packard [Fri, 13 May 2011 04:55:19 +0000 (21:55 -0700)]
Add uart test

12 years agoRun on new stack
Keith Packard [Fri, 13 May 2011 04:29:46 +0000 (21:29 -0700)]
Run on new stack

12 years agoao-bringup-avr: Switch to ADC13
Keith Packard [Fri, 13 May 2011 03:26:44 +0000 (20:26 -0700)]
ao-bringup-avr: Switch to ADC13

That's what Bdale has wired up in his test setup.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoao-bringup-avr: Flip to 8MHz clock for TeleScience
Keith Packard [Thu, 12 May 2011 03:26:37 +0000 (20:26 -0700)]
ao-bringup-avr: Flip to 8MHz clock for TeleScience

The Teensy uses a 16MHz crystal, but TeleScience has an 8MHz crystal.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoao-bringup-avr: Make LED PWM from ADC0 value
Keith Packard [Thu, 12 May 2011 03:25:16 +0000 (20:25 -0700)]
ao-bringup-avr: Make LED PWM from ADC0 value

Test ADC inputs by adjusting the waveform using the ADC0 input.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoao-bringup-avr: Initialize crystal clock and 100Hz timer interrupt
Keith Packard [Thu, 12 May 2011 02:50:57 +0000 (19:50 -0700)]
ao-bringup-avr: Initialize crystal clock and 100Hz timer interrupt

Just demonstrating further features of the chip

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoao-bringup-avr: Enable crystal clock in blink demo
Keith Packard [Wed, 11 May 2011 23:24:26 +0000 (16:24 -0700)]
ao-bringup-avr: Enable crystal clock in blink demo

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoMerge branch 'telebt' into telescience
Keith Packard [Wed, 11 May 2011 15:16:29 +0000 (08:16 -0700)]
Merge branch 'telebt' into telescience

12 years agoRevert "altos: Debugging TBT issues -- check pin configuration after boot"
Keith Packard [Sat, 7 May 2011 06:55:23 +0000 (23:55 -0700)]
Revert "altos: Debugging TBT issues -- check pin configuration after boot"

This reverts commit 514348055630edec12224c4b0964240b929759a3.

Looks like this was never a problem.

12 years agoaltos: clear CPU port 1 interrupt flag when handled
Keith Packard [Sat, 7 May 2011 06:12:47 +0000 (23:12 -0700)]
altos: clear CPU port 1 interrupt flag when handled

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Hook up the P1 ISR for TeleBT v0.1 bt_link line
Keith Packard [Sat, 7 May 2011 05:59:15 +0000 (22:59 -0700)]
altos: Hook up the P1 ISR for TeleBT v0.1 bt_link line

Otherwise, we're heading off into the weeds...

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Initialize beeper for telebt
Keith Packard [Sat, 7 May 2011 05:49:54 +0000 (22:49 -0700)]
altos: Initialize beeper for telebt

Needed to get sounds to come out

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Debugging TBT issues -- check pin configuration after boot
Keith Packard [Sat, 7 May 2011 05:42:58 +0000 (22:42 -0700)]
altos: Debugging TBT issues -- check pin configuration after boot

Make sure the serial pins are configured as peripherals
Make sure the ser_reset and bt_link pins are going the right direction.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add beeper to TBT v0.1
Keith Packard [Sat, 7 May 2011 05:42:32 +0000 (22:42 -0700)]
altos: Add beeper to TBT v0.1

It's available, let's use it.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: pull TBT v0.1 ser_reset line low
Keith Packard [Sat, 7 May 2011 05:12:31 +0000 (22:12 -0700)]
altos: pull TBT v0.1 ser_reset line low

This line resets the BT module if held low for three seconds.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Fix BT link status pin for real TBT hardware
Keith Packard [Sat, 7 May 2011 04:13:19 +0000 (21:13 -0700)]
altos: Fix BT link status pin for real TBT hardware

The prototype used P2_1, while the real hardware uses P1_7. Lots of
defines to make this work...

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Use USART configuration 1 with flow control for TBT
Keith Packard [Sat, 7 May 2011 03:33:58 +0000 (20:33 -0700)]
altos: Use USART configuration 1 with flow control for TBT

It's just wired that way.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add telebt-v0.1 to Makefile
Keith Packard [Fri, 6 May 2011 23:57:38 +0000 (16:57 -0700)]
altos: Add telebt-v0.1 to Makefile

Doesn't get built without it.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agofirst cut at a telebt turn on script
Bdale Garbee [Fri, 6 May 2011 23:57:17 +0000 (17:57 -0600)]
first cut at a telebt turn on script

12 years agoaltos: Add preliminary telebt v0.1 defines
Keith Packard [Fri, 6 May 2011 22:44:56 +0000 (15:44 -0700)]
altos: Add preliminary telebt v0.1 defines

This should make the telebt v0.1 binary that works on the real hardware.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoao-bringup-avr: fix blinking code to actually drive the pin as output
Keith Packard [Wed, 4 May 2011 05:31:35 +0000 (22:31 -0700)]
ao-bringup-avr: fix blinking code to actually drive the pin as output

Mis-configured the DDR register setting the wrong pin to output.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoao-bringup-avr: Add very primitive 'blink' to toggle the 32u4 B7 line
Keith Packard [Wed, 4 May 2011 05:13:35 +0000 (22:13 -0700)]
ao-bringup-avr: Add very primitive 'blink' to toggle the 32u4 B7 line

This should permit basic testing of the chip.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Fix BT manage dialog so that the device lists resize
Keith Packard [Tue, 26 Apr 2011 06:00:42 +0000 (23:00 -0700)]
altosui: Fix BT manage dialog so that the device lists resize

This makes the device scrolling lists fill any extra space when the
window is resized.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Move AltosIgniteUI device open out of Swing thread
Keith Packard [Tue, 26 Apr 2011 05:55:08 +0000 (22:55 -0700)]
altosui: Move AltosIgniteUI device open out of Swing thread

Eliminate more blocking code from the Swing thread.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Display reader name (usually the device) when an I/O error occurs
Keith Packard [Tue, 26 Apr 2011 05:28:40 +0000 (22:28 -0700)]
altosui: Display reader name (usually the device) when an I/O error occurs

Access the reader name directly from the reader object instead of a
local variable (which wasn't getting set anyways).

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Fix TeleBT name in flight monitor title
Keith Packard [Tue, 26 Apr 2011 04:26:21 +0000 (21:26 -0700)]
altosui: Fix TeleBT name in flight monitor title

Was getting the product number, not the product name.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Separate out flash debug code to separate thread
Keith Packard [Tue, 26 Apr 2011 04:17:07 +0000 (21:17 -0700)]
altosui: Separate out flash debug code to separate thread

This avoids blocking the Swing thread while waiting for the serial
device.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: add telebt-v0.0 Makefile
Keith Packard [Sun, 24 Apr 2011 05:50:58 +0000 (22:50 -0700)]
altos: add telebt-v0.0 Makefile

Git doesn't like to add these.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Make flight data download work through TeleBT
Keith Packard [Tue, 19 Apr 2011 22:29:39 +0000 (15:29 -0700)]
altosui: Make flight data download work through TeleBT

This required flushing input before reading data blocks and adjusting
some delays.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoMerge branch 'telemini' into telebt
Keith Packard [Tue, 19 Apr 2011 21:06:39 +0000 (14:06 -0700)]
Merge branch 'telemini' into telebt

13 years agoaltosui: Eliminate ao_cmd_filter hook
Keith Packard [Tue, 19 Apr 2011 21:01:19 +0000 (14:01 -0700)]
altosui: Eliminate ao_cmd_filter hook

Disabling status messages means we don't need to filter them out of
the input stream.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: remove BT logging code
Keith Packard [Tue, 19 Apr 2011 20:42:30 +0000 (13:42 -0700)]
altos: remove BT logging code

This was used to debug the serial line startup.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Remove bt debug command
Keith Packard [Tue, 19 Apr 2011 20:31:10 +0000 (13:31 -0700)]
altos: Remove bt debug command

This will permit some additional cleanups.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Simplify BT communications
Keith Packard [Tue, 19 Apr 2011 20:27:40 +0000 (13:27 -0700)]
altos: Simplify BT communications

Eliminate stdio I/O wrappers

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Solidify BT connections
Keith Packard [Tue, 19 Apr 2011 20:20:19 +0000 (13:20 -0700)]
altos: Solidify BT connections

Use delays while sending commands to BT module.
Don't use BT for stdio until the module is initialized.
Add \r to name setting command
Don't require 'connected' signal for command input.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Wait two seconds after bluetooth connect XXX
Keith Packard [Tue, 19 Apr 2011 17:41:28 +0000 (10:41 -0700)]
altosui: Wait two seconds after bluetooth connect XXX

"something" isn't quite ready to communicate right after the device is
connected, so we stick a delay in. There should be a better fix.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Add delays to bt startup sequence
Keith Packard [Tue, 19 Apr 2011 17:25:47 +0000 (10:25 -0700)]
altos: Add delays to bt startup sequence

The BT device takes a few seconds after power-up before it is ready to
receive commands.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Use persistent list of bluetooth devices for device dialogs
Keith Packard [Tue, 19 Apr 2011 15:43:40 +0000 (08:43 -0700)]
altosui: Use persistent list of bluetooth devices for device dialogs

Store a list of known bluetooth devices as preferences. Always include
those in device dialogs with an option to go browse for more devices
in both the device dialog and the Configure AltosUI dialog.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Make bluetooth dialog modal
Keith Packard [Mon, 18 Apr 2011 23:16:38 +0000 (18:16 -0500)]
altosui: Make bluetooth dialog modal

This allows it to be displayed correctly while the device dialog box
(also modal) is up.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Make AltosBTDevice implement AltosDevice interface
Keith Packard [Thu, 14 Apr 2011 17:22:30 +0000 (10:22 -0700)]
altosui: Make AltosBTDevice implement AltosDevice interface

This will allow the use of either USB or BT devices through the
AltosDevice interface.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Create abstract AltosDevice class
Keith Packard [Thu, 14 Apr 2011 17:12:29 +0000 (10:12 -0700)]
altosui: Create abstract AltosDevice class

This will wrap either USB or BT devices. The USB device constants have
been moved to Altos.java

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Add primitive bluetooth device manager UI.
Keith Packard [Sat, 9 Apr 2011 02:46:15 +0000 (19:46 -0700)]
altosui: Add primitive bluetooth device manager UI.

This isn't useful, but does inquire for available bluetooth devices
and show them in a list.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Write a few pre-launch samples for Tm/Tn devices
Keith Packard [Thu, 14 Apr 2011 16:38:48 +0000 (09:38 -0700)]
altos: Write a few pre-launch samples for Tm/Tn devices

Record pre-launch samples in a small ring and flush that to flash when
launch is detected. This provides a complete record of the flight,
rather than simply starting after launch detect.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: oops - lost state changes when downloading eeprom data.
Keith Packard [Thu, 14 Apr 2011 03:27:38 +0000 (20:27 -0700)]
altosui: oops - lost state changes when downloading eeprom data.

This would cause the reader to just keep reading past the end of the
flight.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos/altosui: Log averaged baro sensor data in Tm/Tn
Keith Packard [Sun, 10 Apr 2011 05:53:12 +0000 (22:53 -0700)]
altos/altosui: Log averaged baro sensor data in Tm/Tn

Instead of logging the best height guess from the kalman filter, log
barometer data. The logged data consists of the average value betwen
log points to reduce noise.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Add low-level Bluetooth APIs
Keith Packard [Fri, 8 Apr 2011 17:13:55 +0000 (10:13 -0700)]
altosui: Add low-level Bluetooth APIs

Adds the JNI functions to query and connect to arbitrary
bluetooth devices.

Adds Java wrappers to construct a list of proximate bluetooth devices.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Add TeleBT USB device support
Keith Packard [Fri, 8 Apr 2011 17:12:50 +0000 (10:12 -0700)]
altosui: Add TeleBT USB device support

TeleBT can work just like a TeleDongle over USB.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Use PIO(6) on BTM to monitor BT connection. Fix BTM init.
Keith Packard [Fri, 8 Apr 2011 05:00:38 +0000 (22:00 -0700)]
altos: Use PIO(6) on BTM to monitor BT connection. Fix BTM init.

PIo(6) appears to be an active-low indication of the Bluetooth
connection status. Hook this up using an interrupt to track the
link state instead of using in-band status messages.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoMerge branch 'telemini' into telebt
Keith Packard [Sat, 2 Apr 2011 02:35:22 +0000 (19:35 -0700)]
Merge branch 'telemini' into telebt

13 years agoaltosui: Add missing AltosTelemetryMap.java file
Keith Packard [Sat, 2 Apr 2011 02:35:00 +0000 (19:35 -0700)]
altosui: Add missing AltosTelemetryMap.java file

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Clean up BT serial communcations
Keith Packard [Sat, 2 Apr 2011 00:26:08 +0000 (17:26 -0700)]
altos: Clean up BT serial communcations

Disable echo on both ends in command mode to eliminate looping error
values.

Switch to 57600 baud to improve performance.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Make cmd echo per-connection instead of global
Keith Packard [Sat, 2 Apr 2011 00:25:07 +0000 (17:25 -0700)]
altos: Make cmd echo per-connection instead of global

Allow different connections to use different echo values, permitting
the packet link to turn off echo while the USB link still has it on.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Clean up serial initialization
Keith Packard [Fri, 1 Apr 2011 23:48:12 +0000 (16:48 -0700)]
altos: Clean up serial initialization

Flush serial input buffers when switching speeds.
Ensure pin configuration is correct.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Clean up usage of serial port for stdio
Keith Packard [Fri, 1 Apr 2011 21:12:56 +0000 (14:12 -0700)]
altos: Clean up usage of serial port for stdio

Code wanting to use this must invoke ao_add_stdio; that way
the link can be configured before command processing starts.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Make ao_serial_drain public
Keith Packard [Fri, 1 Apr 2011 21:11:44 +0000 (14:11 -0700)]
altos: Make ao_serial_drain public

Allow external code to discard serial input

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Remove serial monitor command
Keith Packard [Fri, 1 Apr 2011 21:10:37 +0000 (14:10 -0700)]
altos: Remove serial monitor command

This takes up space and isn't that useful these days

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Allow any stdio to be used with packet forwarding
Keith Packard [Fri, 1 Apr 2011 21:08:37 +0000 (14:08 -0700)]
altos: Allow any stdio to be used with packet forwarding

There's no reason to restrict packet forwarding to work only from
USB.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Provide for a pre-filter on commands
Keith Packard [Fri, 1 Apr 2011 21:07:23 +0000 (14:07 -0700)]
altos: Provide for a pre-filter on commands

This allows for external code to see each command line before it is
processed and potentially skip it.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: expose set of available stdio values
Keith Packard [Fri, 1 Apr 2011 21:04:58 +0000 (14:04 -0700)]
altos: expose set of available stdio values

This lets external code manipulate which connection to communicate
over.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Add P2SEL_*_MASK defines to cc1111.h
Keith Packard [Fri, 1 Apr 2011 21:03:25 +0000 (14:03 -0700)]
altos: Add P2SEL_*_MASK defines to cc1111.h

These are used to avoid having the code "know" which selections are 1
and which are 0 bits.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Add initial TeleBT code
Keith Packard [Fri, 1 Apr 2011 03:58:14 +0000 (20:58 -0700)]
altos: Add initial TeleBT code

Prototyping with a TeleMetrum v0.1 board and a serial link to a
bluetooth module.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Make ao_flight_test show true height but report saturated height
Keith Packard [Fri, 1 Apr 2011 03:55:18 +0000 (20:55 -0700)]
altos: Make ao_flight_test show true height but report saturated height

To simulate a saturated baro sensor, clip baro data at a specified
altitude. Continue to report the 'true' altitude in the output so that
the resulting graphs are useful.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Baro useful ceiling is MSL, not AGL
Keith Packard [Fri, 1 Apr 2011 03:53:12 +0000 (20:53 -0700)]
altos: Baro useful ceiling is MSL, not AGL

Use MSL instead of AGL for detecting over-range baro sensor values.
Always trust baro sensor during descent; it'll get there eventually.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Reflect ao_flight split in ao_flight_test dependencies
Keith Packard [Fri, 1 Apr 2011 03:51:15 +0000 (20:51 -0700)]
altos: Reflect ao_flight split in ao_flight_test dependencies

Need to rebuild ao_flight_test when any of the flight sources change

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Only plot acceleration when present in data file
Keith Packard [Wed, 30 Mar 2011 18:48:03 +0000 (11:48 -0700)]
altosui: Only plot acceleration when present in data file

Eliminates a bogus axis and data line for devices which do not have an
accelerometer.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltosui: Parse and export Max flight log value
Keith Packard [Wed, 30 Mar 2011 18:47:07 +0000 (11:47 -0700)]
altosui: Parse and export Max flight log value

New configuration field might as well get dumped to the .csv files.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoaltos: Enable logging during nano flights
Keith Packard [Wed, 30 Mar 2011 01:11:47 +0000 (18:11 -0700)]
altos: Enable logging during nano flights

Not having logging wasn't very useful.

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