fw/altos
8 years agoaltos, altosui: Add igniter mode (dual, apogee, main) split-telemetry
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>
8 years agoSet version to 0.9.4.4
Keith Packard [Sun, 17 Jul 2011 15:13:15 +0000 (08:13 -0700)]
Set version to 0.9.4.4

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoSet version to 0.9.4.3 for Bdale 2011-7-16 flights 0.9.4.3
Keith Packard [Sat, 16 Jul 2011 01:53:41 +0000 (18:53 -0700)]
Set version to 0.9.4.3 for Bdale 2011-7-16 flights

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: new versions of sdcc require __ prefixes for custom keywords
Keith Packard [Sat, 9 Jul 2011 20:09:57 +0000 (13:09 -0700)]
altos: new versions of sdcc require __ prefixes for custom keywords

Fortunately, 2.9.1 appears to accept either, so we can switch now and
prepare for sdcc 3.0.0.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosui: Don't show missing igniter and gps values
Keith Packard [Thu, 7 Jul 2011 04:38:57 +0000 (21:38 -0700)]
altosui: Don't show missing igniter and gps values

The new telemetry stuff leaves state.gps always set (but empty), which
seems fine, we just need to look at state.gps.connected to see if
there's a GPS receiver on board.

For TeleNano, we also want to hide the igniter status fields as they
won't have any data present.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosui: Build device constants into .java code
Keith Packard [Thu, 7 Jul 2011 04:36:38 +0000 (21:36 -0700)]
altosui: Build device constants into .java code

This eliminates a depedency on updates to the system helper library,
which means we don't have to provide a new library on all platforms
just to support a new USB id.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: product defines are always in ao_product.h
Keith Packard [Thu, 7 Jul 2011 00:49:01 +0000 (17:49 -0700)]
altos: product defines are always in ao_product.h

When all products were built in a single directory, each one had a
separate version of ao_product.h. Now that they all reside in
sub-directories, each directory has its own ao_product.h

This change is needed so that other modules in the system can use the
product defines; otherwise, ao_product.h was not built at the right time.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Ensure low-rate telem packets interleave with sensor telem packets
Keith Packard [Wed, 6 Jul 2011 23:43:17 +0000 (16:43 -0700)]
altos: Ensure low-rate telem packets interleave with sensor telem packets

To avoid over-committing the radio link, we want to send only
one low rate packet after each sensor packet. However, the
initializations for this were incorrect, causing the configuration and
location packets to be sent at the same time.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Remove ao_telemetry_orig.c and ao_telemetry_tiny.c
Keith Packard [Wed, 6 Jul 2011 23:18:54 +0000 (16:18 -0700)]
altos: Remove ao_telemetry_orig.c and ao_telemetry_tiny.c

All products use the common ao_telemetry.c code now

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch Tm and Tn to common telemetry code
Keith Packard [Wed, 6 Jul 2011 23:19:22 +0000 (16:19 -0700)]
altos: Switch Tm and Tn to common telemetry code

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch flash drivers __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:52:25 +0000 (15:52 -0700)]
altos: Switch flash drivers __xdata to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch ao_flight and ao_flight_nano __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:51:52 +0000 (15:51 -0700)]
altos: Switch ao_flight and ao_flight_nano __xdata to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch ao_dbg.c __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:28:01 +0000 (15:28 -0700)]
altos: Switch ao_dbg.c __xdata to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch ao_config.c __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:27:32 +0000 (15:27 -0700)]
altos: Switch ao_config.c __xdata to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: switch ao_cmd __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:26:09 +0000 (15:26 -0700)]
altos: switch ao_cmd __xdata to __pdata

Saves code space

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch const for __code in struct ao_cmds
Keith Packard [Wed, 6 Jul 2011 22:45:04 +0000 (15:45 -0700)]
altos: Switch const for __code in struct ao_cmds

This saves quite a bit of code space when accessing these values.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch ao_usb.c __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:41:32 +0000 (15:41 -0700)]
altos: Switch ao_usb.c __xdata to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch ao_telemetry.c __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:41:06 +0000 (15:41 -0700)]
altos: Switch ao_telemetry.c __xdata to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch ao_stdio.c __data to __pdata
Keith Packard [Wed, 6 Jul 2011 22:39:44 +0000 (15:39 -0700)]
altos: Switch ao_stdio.c __data to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch ao_serial.c __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:38:46 +0000 (15:38 -0700)]
altos: Switch ao_serial.c __xdata to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch ao_sample.c __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:38:29 +0000 (15:38 -0700)]
altos: Switch ao_sample.c __xdata to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch ao_rssi.c __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:37:34 +0000 (15:37 -0700)]
altos: Switch ao_rssi.c __xdata to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch ao_report.c __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:37:15 +0000 (15:37 -0700)]
altos: Switch ao_report.c __xdata to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch ao_log.c and ao_log_big.c __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:36:45 +0000 (15:36 -0700)]
altos: Switch ao_log.c and ao_log_big.c __xdata to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch ao_ignite and ao_gps_sirf __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:33:52 +0000 (15:33 -0700)]
altos: Switch ao_ignite and ao_gps_sirf __xdata to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Switch ao_gps_skytraq and ao_gps_sirf __xdata to __pdata
Keith Packard [Wed, 6 Jul 2011 22:31:53 +0000 (15:31 -0700)]
altos: Switch ao_gps_skytraq and ao_gps_sirf __xdata to __pdata

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Shrink ao_add_task by rolling up a memset loop
Keith Packard [Wed, 6 Jul 2011 20:49:05 +0000 (13:49 -0700)]
altos: Shrink ao_add_task by rolling up a memset loop

This has a dramatic effect. By pulling the 'stack' variable into
registers it reduces the size of this function from 550 to 231 bytes.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Shrink ao_config_callsign_set
Keith Packard [Wed, 6 Jul 2011 20:21:25 +0000 (13:21 -0700)]
altos: Shrink ao_config_callsign_set

Replacing a hand-coded memset with a function call, using static space
instead of stack space for an array.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Shrink ao_cmd_put16, ao_cmd_hex and ao_cmd
Keith Packard [Wed, 6 Jul 2011 19:38:11 +0000 (12:38 -0700)]
altos: Shrink ao_cmd_put16, ao_cmd_hex and ao_cmd

No functional changes, just reduces code size.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosui: Compress telemetry records marked with the same time
Keith Packard [Wed, 6 Jul 2011 06:38:42 +0000 (23:38 -0700)]
altosui: Compress telemetry records marked with the same time

Split telemetry transmits multiple packets with the same
timestamp. Merge those into a single record when read from a file.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosui: Remove debug printf.
Keith Packard [Wed, 6 Jul 2011 06:38:28 +0000 (23:38 -0700)]
altosui: Remove debug printf.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosui: Add main/drogue voltages to default graph
Keith Packard [Wed, 6 Jul 2011 06:37:51 +0000 (23:37 -0700)]
altosui: Add main/drogue voltages to default graph

Until we get a UI for changing the graph elements, lets add a few more
potentially useful values.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosui: Elide missing values from graphs
Keith Packard [Wed, 6 Jul 2011 06:37:00 +0000 (23:37 -0700)]
altosui: Elide missing values from graphs

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosui: Elide nul bytes at end of telemetry string values
Keith Packard [Wed, 6 Jul 2011 06:35:50 +0000 (23:35 -0700)]
altosui: Elide nul bytes at end of telemetry string values

All telemetry fields are fixed length, so any embedded strings are
padded with nul bytes.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agodoc: Add section about TeleDongle USB line format
Keith Packard [Wed, 6 Jul 2011 06:35:02 +0000 (23:35 -0700)]
doc: Add section about TeleDongle USB line format

Describe the format of the TELEM lines sent over USB from TeleDongle
to the host.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Adapt to changes in telemetry Configuration packet
Keith Packard [Wed, 6 Jul 2011 04:44:53 +0000 (21:44 -0700)]
altos: Adapt to changes in telemetry Configuration packet

Apogee delay added. flight_log_max changed to two bytes (in kB now).

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agodoc: Chang Config and Location packets
Keith Packard [Wed, 6 Jul 2011 04:42:22 +0000 (21:42 -0700)]
doc: Chang Config and Location packets

Config packets get apogee delay, and have flight_log_max shrunk to two
bytes.

Location packets get climb_rate added.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosui: Parse remaining standard telemetry packets
Keith Packard [Wed, 6 Jul 2011 04:41:44 +0000 (21:41 -0700)]
altosui: Parse remaining standard telemetry packets

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Complete new telemetry switchover
Keith Packard [Tue, 5 Jul 2011 06:39:21 +0000 (23:39 -0700)]
altos: Complete new telemetry switchover

This involved rewriting the GPS code to use the telemetry structures
directly so that a memcpy could be used to transfer the data to the
telemetry packets, saving a bunch of code space, along with fixing up
the gps testing programs to deal with the structure changes.

In addition, the teledongle code needed to have the monitoring code
split into separate radio receiver and USB writer threads as the
packets are now back-to-back, and hence come too fast to wait for the
USB data to be sent to the host after each one.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Add split telemetry code
Keith Packard [Tue, 5 Jul 2011 01:09:03 +0000 (18:09 -0700)]
altos: Add split telemetry code

This sends every packet every time, which isn't correct, but should be
useful for testing.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Shrink help text
Keith Packard [Tue, 5 Jul 2011 01:08:19 +0000 (18:08 -0700)]
altos: Shrink help text

Reduce const space taken by command help text.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Add sat info to GPS report command
Keith Packard [Tue, 5 Jul 2011 01:06:48 +0000 (18:06 -0700)]
altos: Add sat info to GPS report command

Plan to use this to report current flight computer state in idle mode.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Shrink const space in ao_config
Keith Packard [Tue, 5 Jul 2011 01:04:49 +0000 (18:04 -0700)]
altos: Shrink const space in ao_config

Eliminate separate 'cmd' and 'help' struct entries.
Use \0 trick in cmd strings to eliminate whitespace.
Edit help text.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: teledongle does not need ao_packet_slave.c
Keith Packard [Tue, 5 Jul 2011 01:03:51 +0000 (18:03 -0700)]
altos: teledongle does not need ao_packet_slave.c

TeleDongle doesn't provide slave interfaces, so remove ao_packet_slave
from the TD build

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoVersion strings must be < 8 bytes long
Keith Packard [Tue, 5 Jul 2011 01:02:52 +0000 (18:02 -0700)]
Version strings must be < 8 bytes long

The new telemetry packets include the version string, so make sure its
less than 8 characters long

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agodoc: Fix a few minor telemetry doc mistakes
Keith Packard [Tue, 5 Jul 2011 01:01:59 +0000 (18:01 -0700)]
doc: Fix a few minor telemetry doc mistakes

Multiple 'accel' entries in the Sensor packet.
Swap ground_accel and ground_pres to group accel cal data

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agodoc: Complete initial telemetry description
Keith Packard [Mon, 4 Jul 2011 21:17:55 +0000 (14:17 -0700)]
doc: Complete initial telemetry description

Finish describing the contents and modulation scheme for telemetry
data.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agodoc: Add telemetry format description
Keith Packard [Sat, 2 Jul 2011 08:50:33 +0000 (01:50 -0700)]
doc: Add telemetry format description

Document the telemetry packet contents.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosui: Support raw telemetry from TeleDongle
Keith Packard [Tue, 28 Jun 2011 08:03:00 +0000 (01:03 -0700)]
altosui: Support raw telemetry from TeleDongle

Use raw telemetry frames when TeleDongle supports them, this involves
parsing the hex dump of the packet instead of having teledongle take
the packet apart. Only the legacy format is working at this point; the
altos bits for the new split telemetry frames is not written yet.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: ao_radio_recv needs byte count *including* rssi and status
Keith Packard [Tue, 28 Jun 2011 08:01:08 +0000 (01:01 -0700)]
altos: ao_radio_recv needs byte count *including* rssi and status

That's two more than the actual packet length.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Start adding new telemetry frame definitions
Keith Packard [Fri, 24 Jun 2011 15:31:51 +0000 (08:31 -0700)]
altos: Start adding new telemetry frame definitions

These use the initial 24 bytes per frame plan, which will probably get
changed to 32 bytes per frame.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Add checksum to TELEM output lines
Keith Packard [Fri, 24 Jun 2011 15:31:12 +0000 (08:31 -0700)]
altos: Add checksum to TELEM output lines

Verify the received telemetry lines to protect against OS data loss

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Add arbitrary telemetry packet monitoring
Keith Packard [Wed, 22 Jun 2011 19:27:34 +0000 (12:27 -0700)]
altos: Add arbitrary telemetry packet monitoring

This adds the ability to monitor arbitrary telemetry packets (up to
128 bytes), moving the telemetry data parsing up to the host.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Rename telemetry to telemetry_orig
Keith Packard [Wed, 22 Jun 2011 19:26:45 +0000 (12:26 -0700)]
altos: Rename telemetry to telemetry_orig

This makes room to create a new multi-packet telemetry format without
changing anything yet.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosui: Handle old TeleDongle receiving kalman telemetry packets
Keith Packard [Fri, 3 Jun 2011 06:16:30 +0000 (23:16 -0700)]
altosui: Handle old TeleDongle receiving kalman telemetry packets

The telemetry packets now send the kalman height/speed/accel values
instead of the ad-hoc values. If received by an old TeleDongle box,
the speed value will be of the form 0x8000abcd, which will be printed
as a 32-bit value by TeleDongle. We only want the abcd part, which is
the speed * 16. Detect this automatically and compute the correct
values for all three.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoSwitch version to 0.9.4 telebt 0.9.4
Keith Packard [Thu, 26 May 2011 03:38:02 +0000 (21:38 -0600)]
Switch version to 0.9.4

For Mayhem, so we can tell what version each board is running

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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 years agoMerge branch 'telemini' into telebt
Keith Packard [Tue, 19 Apr 2011 21:06:39 +0000 (14:06 -0700)]
Merge branch 'telemini' into telebt

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 years agoMerge branch 'telemini' into telebt
Keith Packard [Sat, 2 Apr 2011 02:35:22 +0000 (19:35 -0700)]
Merge branch 'telemini' into telebt

8 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>
8 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>
8 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>
8 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>
8 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>