fw/altos
8 years agoaltoslib: Start with map empty
Keith Packard [Thu, 28 May 2015 05:43:53 +0000 (22:43 -0700)]
altoslib: Start with map empty

Don't load images from 0,0 for no good reason; wait until someone sets
a desired lat/lon

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosuilib: Use altoslib site list loader
Keith Packard [Wed, 27 May 2015 22:31:25 +0000 (15:31 -0700)]
altosuilib: Use altoslib site list loader

Removes the custom version and uses the shared code

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltoslib: Add AltosLaunchSite bits
Keith Packard [Wed, 27 May 2015 22:30:29 +0000 (15:30 -0700)]
altoslib: Add AltosLaunchSite bits

This asynchronously fetches the list of available launch sites from
the standard location and notifies the caller when finished.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosdroid: Place icons on screen instead of drawing path
Keith Packard [Wed, 27 May 2015 06:05:49 +0000 (23:05 -0700)]
altosdroid: Place icons on screen instead of drawing path

This makes drawing a bunch faster, and locating stuff on the screen easier.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosdroid: Centralize debug printf code
Keith Packard [Wed, 27 May 2015 06:05:11 +0000 (23:05 -0700)]
altosdroid: Centralize debug printf code

Create AltosDebug to hold the debug code, use it everywhere.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosdroid: Move pause before reopening bluetooth into connec thread
Keith Packard [Wed, 27 May 2015 06:02:43 +0000 (23:02 -0700)]
altosdroid: Move pause before reopening bluetooth into connec thread

This avoids stalling the UI while waiting for TBT to boot.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosdroid: Add offline map tab
Keith Packard [Wed, 27 May 2015 02:47:04 +0000 (19:47 -0700)]
altosdroid: Add offline map tab

It's not very fancy yet, but it does zoom and pan, and show the path
of the rocket with a line.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosuilib: Get rid of AltosUIVersion.java
Keith Packard [Tue, 26 May 2015 08:04:00 +0000 (01:04 -0700)]
altosuilib: Get rid of AltosUIVersion.java

It's been moved to altoslib/AltosVersion.java

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosuilib: Remove old map bits
Keith Packard [Tue, 26 May 2015 07:56:17 +0000 (00:56 -0700)]
altosuilib: Remove old map bits

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosuilib: Use new map code for map preload UI
Keith Packard [Tue, 26 May 2015 07:46:21 +0000 (00:46 -0700)]
altosuilib: Use new map code for map preload UI

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosuilib: Add AltosUIImage.java
Keith Packard [Tue, 26 May 2015 07:33:02 +0000 (00:33 -0700)]
altosuilib: Add AltosUIImage.java

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltoslib/altosuilib: Get new Map display code running in altosui and telegps
Keith Packard [Tue, 26 May 2015 07:29:53 +0000 (00:29 -0700)]
altoslib/altosuilib: Get new Map display code running in altosui and telegps

Looks like the display is all hooked up. Still need to replace the
preload UIs.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltoslib/altosuilib: Update library version to 7
Keith Packard [Tue, 26 May 2015 03:34:05 +0000 (20:34 -0700)]
altoslib/altosuilib: Update library version to 7

So many ABI/API changes

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltoslib: More frobbing with new map bits
Keith Packard [Tue, 26 May 2015 03:33:28 +0000 (20:33 -0700)]
altoslib: More frobbing with new map bits

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltoslib: Get new abstract mapping code compiling
Keith Packard [Tue, 26 May 2015 03:10:37 +0000 (20:10 -0700)]
altoslib: Get new abstract mapping code compiling

Not useful yet, but at least it compiles now?

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltoslib: Build AltosVersion.java in configure.ac
Keith Packard [Mon, 25 May 2015 23:35:23 +0000 (16:35 -0700)]
altoslib: Build AltosVersion.java in configure.ac

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos/telelco: Show box voltage with pad knob instead of firing button
Keith Packard [Mon, 25 May 2015 23:26:01 +0000 (16:26 -0700)]
altos/telelco: Show box voltage with pad knob instead of firing button

Turn left past '1' and see the firing box battery voltage instead of
pushing the firing button with the box disarmed. This seems like a
safer UI.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos/telelco: Display telefire battery voltage
Keith Packard [Mon, 25 May 2015 22:49:21 +0000 (15:49 -0700)]
altos/telelco: Display telefire battery voltage

When the firing button is pressed while unarmed, show the telefire
battery voltage in the display.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Add telelco v0.3 (v0.2 with cc1200 instead of cc1120)
Keith Packard [Mon, 25 May 2015 22:47:46 +0000 (15:47 -0700)]
altos: Add telelco v0.3 (v0.2 with cc1200 instead of cc1120)

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agotelefire: Report telefire battery voltage over telemetry link
Keith Packard [Mon, 25 May 2015 20:23:54 +0000 (13:23 -0700)]
telefire: Report telefire battery voltage over telemetry link

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Only set CMAC RSSI value on valid packet received
Keith Packard [Mon, 25 May 2015 00:28:07 +0000 (17:28 -0700)]
altos: Only set CMAC RSSI value on valid packet received

This ignores spurious packets for the purpose of showing the RSSI
value in telelco/telefire, avoiding warning about 'low RSSI' when the
radio receives noise.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agotelefire: Make 'good' RSSI value configurable
Keith Packard [Mon, 25 May 2015 00:25:25 +0000 (17:25 -0700)]
telefire: Make 'good' RSSI value configurable

Different radios will have different 'good' RSSI values, so let each
product configure it, leaving the default set to -90dBm, which is
a solid signal value for the CC1111.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltoslib: Create display-independent map support code
Keith Packard [Thu, 21 May 2015 20:49:28 +0000 (13:49 -0700)]
altoslib: Create display-independent map support code

This takes the swing-specific map code and creates a generic version.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoFlip version to 1.6.0.2
Keith Packard [Tue, 19 May 2015 17:25:05 +0000 (10:25 -0700)]
Flip version to 1.6.0.2

Tag a version for development builds

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agomicropeak: Use fast load mode by default in -load script
Keith Packard [Tue, 19 May 2015 17:23:09 +0000 (10:23 -0700)]
micropeak: Use fast load mode by default in -load script

Speed up flashing in default config

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agomicrosplash: Add 'publish' target to Makefile
Keith Packard [Tue, 19 May 2015 17:22:10 +0000 (10:22 -0700)]
microsplash: Add 'publish' target to Makefile

This dumps the resulting binary and -load script into the Binaries
directory of the altusmetrumllc repo

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltos: Support 32MHz xtal on cc1200
Keith Packard [Tue, 19 May 2015 17:17:01 +0000 (10:17 -0700)]
altos: Support 32MHz xtal on cc1200

I ended up building some cc1200-based boards with 32MHz xtals, so just
make this an option when building the driver.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agodoc: Clarify what 'after motor' means
Keith Packard [Tue, 19 May 2015 17:16:10 +0000 (10:16 -0700)]
doc: Clarify what 'after motor' means

Note that this means after motor burn-out, not after motor start.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoao-dump-up: Add --wait option to make testing µPusb easier
Keith Packard [Tue, 19 May 2015 17:14:43 +0000 (10:14 -0700)]
ao-dump-up: Add --wait option to make testing µPusb easier

The --wait option hangs around until a suitable device appears, so
that you can test a pile of µPusb devices without needing to
constantly interact with the command line.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosui: Remove un-implemented --fetchmaps argument
Keith Packard [Tue, 19 May 2015 17:12:52 +0000 (10:12 -0700)]
altosui: Remove un-implemented --fetchmaps argument

This has been stubbed out for a while, so just remove it.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltoslib: Expose locale and non-locale floating point parsing functions
Keith Packard [Tue, 19 May 2015 17:09:22 +0000 (10:09 -0700)]
altoslib: Expose locale and non-locale floating point parsing functions

UI bits use locale-specific floating point formats, so parsing those
needs to use the locale. Network-based data, like .kml bits need to
use non-locale-specific parsing code, so now we've got both APIs
available, and each used as appropriate.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltoslib: Use Locale.ROOT for KML export
Keith Packard [Mon, 18 May 2015 17:52:24 +0000 (10:52 -0700)]
altoslib: Use Locale.ROOT for KML export

This avoids locale-specific number formatting, which breaks
googleearth when importing the resulting file.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosdroid: Fix tab label height problems
Keith Packard [Tue, 28 Apr 2015 05:29:45 +0000 (22:29 -0700)]
altosdroid: Fix tab label height problems

With a newer android API versions, we can set the indicator to a View
instead of just a string. This lets us wrap the desired string in a
TextView and show just that for the indicator, making it exactly the
right size.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 years agoaltosdroid: Add USB support for TeleDongle/TeleBT
Keith Packard [Tue, 28 Apr 2015 04:20:22 +0000 (21:20 -0700)]
altosdroid: Add USB support for TeleDongle/TeleBT

This lets AltosDroid use a USB-connected receiver as well as Bluetooth devices.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agowindows: Use new windows stub to launch applications
Keith Packard [Sun, 29 Mar 2015 19:10:47 +0000 (12:10 -0700)]
windows: Use new windows stub to launch applications

This avoids needing to locate javaw on the system while also making
the registry entries less fragile.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoicon: Convert windows stub into launcher program
Keith Packard [Sun, 29 Mar 2015 19:08:42 +0000 (12:08 -0700)]
icon: Convert windows stub into launcher program

Instead of an empty windows stub that exists only to hold icons, add
useful code that allows it to find and run the related java
application. This also adds more resources to that application to
provide more information to Windows too.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/stmf0: Have fast ADC ring buffer code use wrap-around
Keith Packard [Fri, 20 Mar 2015 22:09:20 +0000 (15:09 -0700)]
altos/stmf0: Have fast ADC ring buffer code use wrap-around

Instead of requiring that the whole set of returned values fit
precisely in the ring, allow for wrap-around so that we can fetch an
odd number of ADC values. The previous version required that the fetch
amount always be a factor of the ADC buffer size.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/chaoskey: Set USB VID/PID to 0x1d50/0x60c6
Keith Packard [Thu, 19 Mar 2015 08:12:24 +0000 (01:12 -0700)]
altos/chaoskey: Set USB VID/PID to 0x1d50/0x60c6

These are allocated from the OpenMoko USB vendor ID page and offer a
more 'official' number than from using the 0xfffe space.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Add the ability to configure a different USB vendor ID
Keith Packard [Thu, 19 Mar 2015 08:11:33 +0000 (01:11 -0700)]
altos: Add the ability to configure a different USB vendor ID

ChaosKey will use an OpenMoko vid/pid, so we need the ability to
configure a different USB vendor ID for each product.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoao-tools/ao-list: Show devices that have no TTY
Keith Packard [Tue, 10 Mar 2015 15:35:02 +0000 (09:35 -0600)]
ao-tools/ao-list: Show devices that have no TTY

chaoskey doesn't advertise itself as a modem, so the kernel doesn't
allocate a tty device.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/test: Support old telemega eeprom file formats in ao_flight_test
Keith Packard [Tue, 10 Mar 2015 15:34:01 +0000 (09:34 -0600)]
altos/test: Support old telemega eeprom file formats in ao_flight_test

The old eeprom format used different stoarge for the accel calibration
data, which doesn't matter to this code, but the change in the format
value does.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/test: Make aprs test code compile again
Keith Packard [Tue, 10 Mar 2015 15:32:20 +0000 (09:32 -0600)]
altos/test: Make aprs test code compile again

Adding the compressed/uncompressed config option broke the APRS test harness.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoao-tools/ao-mega: Clean up formatting of pyro status messages
Keith Packard [Tue, 10 Mar 2015 15:30:53 +0000 (09:30 -0600)]
ao-tools/ao-mega: Clean up formatting of pyro status messages

There was an extra newline and missing space.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosui: Add map to MonitorIdle display
Keith Packard [Tue, 10 Mar 2015 15:29:52 +0000 (09:29 -0600)]
altosui: Add map to MonitorIdle display

Nice to be able to verify that maps are working by using this mode,
instead of needing to use flight monitoring.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/stmf0: Need ao_exti.h for pin configuration
Keith Packard [Sun, 8 Mar 2015 00:53:58 +0000 (16:53 -0800)]
altos/stmf0: Need ao_exti.h for pin configuration

Flash loader uses pin configuration to set up GPIOs for boot selection

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Add makefile for chaoskey flash loader
Keith Packard [Sun, 8 Mar 2015 00:40:30 +0000 (16:40 -0800)]
altos: Add makefile for chaoskey flash loader

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Build chaoskey by default
Keith Packard [Sat, 7 Mar 2015 20:38:08 +0000 (12:38 -0800)]
altos: Build chaoskey by default

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Add .gitignore for chaoskey
Keith Packard [Sat, 7 Mar 2015 20:36:57 +0000 (12:36 -0800)]
altos: Add .gitignore for chaoskey

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agodoc: Update telemetry docs to include new packet formats
Keith Packard [Sat, 7 Mar 2015 20:33:36 +0000 (12:33 -0800)]
doc: Update telemetry docs to include new packet formats

Add TeleMega TeleMetrum v2 and companion data packet formats.

List which radio parts each product uses.

Document modulation parameters for new data rates.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosdroid: Deal with bluetooth connection failures better
Keith Packard [Sat, 7 Mar 2015 18:18:57 +0000 (10:18 -0800)]
altosdroid: Deal with bluetooth connection failures better

Remember when we've closed the bluetooth connection so that we stop
operations, including reporting connection status messages or even
starting a connection attempt.

Pass the AltosBluetooth object back in connection status messages so
that TelemetryService can tell when messages from closed objects get
delivered. There's a queue between the two, so the above fix catches
most of these instances, but not all of them.

Stick a delay during reconnect -- if the TeleBT device is getting
power-cycled, it will need a few seconds to reconfigure the device at
startup, if AltosDroid manages to connect during that time, the
configuration commands will be ignored.

Unlock the AltosBluetooth device while we connect so that cancel
calls will actually work.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosui/telegps: Change from variable-units snuck into master
Keith Packard [Tue, 3 Mar 2015 06:23:22 +0000 (22:23 -0800)]
altosui/telegps: Change from variable-units snuck into master

show_units_name(double) only exists on the variable-units branch...

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Missing pad field in TMv2 data packet
Keith Packard [Tue, 3 Mar 2015 05:16:06 +0000 (21:16 -0800)]
altos: Missing pad field in TMv2 data packet

The normal ARM padding would have filled this in correctly, but it's
best to be explicit about the structure.

This also adds a test to make sure the resulting telemetry declaration
is exactly 32 bytes,

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Wait for BT disconnect before sending command
Keith Packard [Tue, 3 Mar 2015 05:11:33 +0000 (21:11 -0800)]
altos: Wait for BT disconnect before sending command

If AltosDroid manages to connect to the BT module before we've
configured it, we won't be able to talk to it as we can't force the
module to ignore connection attempts. Wait for AltosDroid to give up
and let us configure the device. Eventually, we'll manage, if
AltosDroid's delay interval is longer than the time it takes to
configure the unit.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoao-tools: Add ao-flash-stm32f0x
Keith Packard [Tue, 3 Mar 2015 05:08:44 +0000 (21:08 -0800)]
ao-tools: Add ao-flash-stm32f0x

This new script uses openocd to flash stm32f0x parts

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: Round frequency when configuring radio
Keith Packard [Tue, 3 Mar 2015 05:06:51 +0000 (21:06 -0800)]
altoslib: Round frequency when configuring radio

This makes sure we set the right frequency, instead of being off by
1kHz on a regular basis...

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosui/telegps: Add config option for APRS format
Keith Packard [Tue, 3 Mar 2015 05:06:02 +0000 (21:06 -0800)]
altosui/telegps: Add config option for APRS format

Allow configuration of APRS compressed/uncompressed

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Make APRS format (compressed/uncompressed) configurable
Keith Packard [Tue, 3 Mar 2015 05:02:31 +0000 (21:02 -0800)]
altos: Make APRS format (compressed/uncompressed) configurable

This provides a choice of compressed vs uncompressed when sending APRS
packets to deal with receivers that still do not have support for the
more useful compressed format.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/usbtrng: Split out random number generating code to separate driver
Keith Packard [Sun, 1 Mar 2015 00:06:23 +0000 (16:06 -0800)]
altos/usbtrng: Split out random number generating code to separate driver

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Add chaoskey flash loader
Keith Packard [Sun, 1 Mar 2015 00:04:00 +0000 (16:04 -0800)]
altos: Add chaoskey flash loader

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Create chaoskey product
Keith Packard [Sun, 1 Mar 2015 00:02:17 +0000 (16:02 -0800)]
altos: Create chaoskey product

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/stmf0: Allocate USB buffers at startup
Keith Packard [Sun, 1 Mar 2015 00:00:45 +0000 (16:00 -0800)]
altos/stmf0: Allocate USB buffers at startup

This lets the extra allocations used from ao_usb_alloc_buffers be
allocated before the first USB connection happens.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/stmf0: Typo in ao_crc_stm.c
Keith Packard [Sun, 1 Mar 2015 00:00:17 +0000 (16:00 -0800)]
altos/stmf0: Typo in ao_crc_stm.c

Extra semicolon

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/stmf0: Fix fast ADC interface
Keith Packard [Sat, 28 Feb 2015 23:59:30 +0000 (15:59 -0800)]
altos/stmf0: Fix fast ADC interface

This was configuring the hardware wrong, and wasn't keeping the output
ring full.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Allow software to offer other USB interface classes than CDC
Keith Packard [Sat, 28 Feb 2015 23:07:16 +0000 (15:07 -0800)]
altos: Allow software to offer other USB interface classes than CDC

This lets some boards offer non-CDC class USB interfaces so that the
modem driver doesn't pick them up.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Sun, 22 Feb 2015 21:55:40 +0000 (14:55 -0700)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

9 years agoswap names so v3.0 is the default TeleDongle version to turn on
Bdale Garbee [Sun, 8 Feb 2015 16:29:01 +0000 (09:29 -0700)]
swap names so v3.0 is the default TeleDongle version to turn on

9 years agoaltosdroid: Ignore automatic tab changing while activity is saved
Keith Packard [Tue, 17 Feb 2015 06:22:37 +0000 (22:22 -0800)]
altosdroid: Ignore automatic tab changing while activity is saved

When the activity state is saved (after onSaveInstanceState()), we
can't update the UI until the activity is restarted or restored; that
means any UI changes we make, like switching tabs, must deal with this
by allowing those changes to be ignored, using commitAllowingStateLoss
instead of commit.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosdroid: Missing file: DeviceAddress.java
Keith Packard [Tue, 17 Feb 2015 05:35:34 +0000 (21:35 -0800)]
altosdroid: Missing file: DeviceAddress.java

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosdroid: Only speak when GUI is running
Keith Packard [Tue, 17 Feb 2015 05:32:54 +0000 (21:32 -0800)]
altosdroid: Only speak when GUI is running

Create voice in onStart, stop it in onStop. This way, if some other
application is in use, the voice won't be annoying you.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosdroid: Explicitly disconnect BT on termination or 'disconnect'
Keith Packard [Tue, 17 Feb 2015 05:19:09 +0000 (21:19 -0800)]
altosdroid: Explicitly disconnect BT on termination or 'disconnect'

This adds an explicit message to the telemetry service telling it when
to stop trying to talk to the bluetooth device. Until this message is
received, the service will reconnect to the specified BT device.

That message is sent when you 'quit' the application, or when you 'disconnect'.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosdroid: Lots of bluetooth connection changes
Keith Packard [Tue, 17 Feb 2015 04:57:11 +0000 (20:57 -0800)]
altosdroid: Lots of bluetooth connection changes

Appears to more reliably abort in-progress connection attempts so you
can switch TBT devices without having the previous device in
operation.

Shows which device the connection is being attempted for.

Eliminate the 10-second timer and just disable the service when the GUI
shuts down while no BT connection is running.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoao-bringup: Changes for telebt for keith's hacking
Keith Packard [Tue, 17 Feb 2015 04:49:39 +0000 (20:49 -0800)]
ao-bringup: Changes for telebt for keith's hacking

Make the programming device auto-detect by username.
Load binary from ~/altusmetrumllc

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Remove some accidental debug printfs from ao_packet.c
Keith Packard [Sun, 15 Feb 2015 16:57:55 +0000 (08:57 -0800)]
altos: Remove some accidental debug printfs from ao_packet.c

While fixing the cc1200 configuration, I added some debug printfs to
this code. They were accidentally committed with the fix...

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/cc1200: Adjust bit-sync configuration
Keith Packard [Sun, 15 Feb 2015 07:18:38 +0000 (23:18 -0800)]
altos/cc1200: Adjust bit-sync configuration

The default bit timing adjustment mechanism allows for only a 0.2%
deviation from the programmed bit timing. I found one TeleMini device
which is beyond that tolerance as it was built with an older crystal
with more error.

Switch to the more expensive synchronization mechanism which allows up
to 2% timing error, but requires a multi-byte preamble (which we
have). This fixes packet mode nicely.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: embed ao_alarm and ao_clear_alarm in ao_sleep_for
Keith Packard [Sat, 14 Feb 2015 16:35:47 +0000 (08:35 -0800)]
altos: embed ao_alarm and ao_clear_alarm in ao_sleep_for

sdcc won't embed these itself, and thus consumes too much flash for
telemetrum-v1.0

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoao-bringup/turnon_telemini: Detect which programmer to use by $USER
Keith Packard [Sat, 14 Feb 2015 09:16:42 +0000 (01:16 -0800)]
ao-bringup/turnon_telemini: Detect which programmer to use by $USER

Bdale uses TD 100, keithp uses TD 186.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosuilib: Detect pair programming by product name, not USB id
Keith Packard [Sat, 14 Feb 2015 09:13:21 +0000 (01:13 -0800)]
altosuilib: Detect pair programming by product name, not USB id

With TeleDongle, TeleBT and TeleMetrum coming in both pair- and self-
programmable versions, we can't use the USB id to tell them
apart. Instead, fetch the device name and use that instead.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosui: Run all igniter status requests from non-GUI thread
Keith Packard [Sat, 14 Feb 2015 09:11:30 +0000 (01:11 -0800)]
altosui: Run all igniter status requests from non-GUI thread

Anything run from the UI thread blocks the UI entirely; the Fire
Igniters startup code to collect the number of pyro channels when
building the UI was doing that from the UI thread. Switch that around
so that the UI doesn't get built until that reply comes back, allowing
the user to see the 'connecting' dialog, and cancel it if required.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Replace ao_alarm/ao_clear_alarm with ao_sleep_for
Keith Packard [Sat, 14 Feb 2015 07:51:10 +0000 (23:51 -0800)]
altos: Replace ao_alarm/ao_clear_alarm with ao_sleep_for

Having arbitrary alarms firing in the middle of complicated device
logic makes no sense at all. Therefore only correct use of ao_alarm
and ao_clear_alarm was around a specific ao_sleep call, with correct
recovery in case the alarm fires.

This patch replaces all uses of ao_alarm/ao_sleep/ao_clear_alarm with
ao_sleep_for, a new function which takes the alarm timeout directly.

A few cases which weren't simply calling ao_sleep have been reworked
to pass the timeout value down to the place where sleep *is* being
called, and having that code deal with the return correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoAdded continuous output option to ao-usbtrng
Tom Marble [Wed, 11 Feb 2015 14:21:27 +0000 (08:21 -0600)]
Added continuous output option to ao-usbtrng

9 years agoaltos/stmf0: Add ao_crc_stm.c
Keith Packard [Mon, 9 Feb 2015 15:28:18 +0000 (07:28 -0800)]
altos/stmf0: Add ao_crc_stm.c

Tom discovered that this was missing

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoMinor typo in man page
Tom Marble [Mon, 9 Feb 2015 14:35:24 +0000 (08:35 -0600)]
Minor typo in man page

9 years agodocument addition of TeleDongle to the set of ARM targets to save binaries for
Bdale Garbee [Sun, 8 Feb 2015 05:23:38 +0000 (22:23 -0700)]
document addition of TeleDongle to the set of ARM targets to save binaries for

9 years agoBump java library versions
Keith Packard [Sun, 8 Feb 2015 04:42:15 +0000 (20:42 -0800)]
Bump java library versions

Lots of minor API/ABI changes; make sure people can install both 1.5
and 1.6 at the same time.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosuilib: Don't offer to graph some GPS details that TM doesn't log
Keith Packard [Sun, 8 Feb 2015 04:36:10 +0000 (20:36 -0800)]
altosuilib: Don't offer to graph some GPS details that TM doesn't log

When using a TM eeprom file, various minor GPS details are logged
(course, ground speed, climb rate, etc). Make sure these aren't
offered up for graphing.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosuilib: Get the Eeprom download progress bar working again
Keith Packard [Sun, 8 Feb 2015 04:22:19 +0000 (20:22 -0800)]
altosuilib: Get the Eeprom download progress bar working again

The eeprom download code wasn't computing the start of each state
transition correctly, so the progress bar was snapping to the end of
the chunk for each state.

Invalid state values would snap the bar to the right side.

Landed state wasn't ever seen, so the bar would not ever fill.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agodoc: update 1.6 release notes with recent bug fixes
Keith Packard [Sun, 8 Feb 2015 02:10:34 +0000 (18:10 -0800)]
doc: update 1.6 release notes with recent bug fixes

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosuilib: Set the icon and title of the telemetry scanning dialog
Keith Packard [Sun, 8 Feb 2015 01:49:39 +0000 (17:49 -0800)]
altosuilib: Set the icon and title of the telemetry scanning dialog

Just need to call 'super' to get the window configured correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: Clear saved TelemetryReader state instead of resetting in ScanUI
Keith Packard [Sun, 8 Feb 2015 01:35:15 +0000 (17:35 -0800)]
altoslib: Clear saved TelemetryReader state instead of resetting in ScanUI

Instead of attempting to mash the saved state from AltosScanUI, just
throw it away in AltosTelemetryReader.reset. Much cleaner, and more reliable.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosuilib: Reset telemetry state after processing it
Keith Packard [Sun, 8 Feb 2015 01:09:40 +0000 (17:09 -0800)]
altosuilib: Reset telemetry state after processing it

This avoids re-using stale state after switching telemetry reception
parameters around, which otherwise generates spurious entries for the
wrong frequencies in the scan results list.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: Drop telemetry packets processed while monitoring is disabled
Keith Packard [Sun, 8 Feb 2015 01:08:03 +0000 (17:08 -0800)]
altoslib: Drop telemetry packets processed while monitoring is disabled

A lag between the thread queuing telemetry packets and one pulling
them out can result in stale telemetry data being returned to the
reader. Fix this by dropping telemetry read while monitoring is disabled.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosuilib: Wait for product data while scanning
Keith Packard [Sat, 7 Feb 2015 23:09:57 +0000 (15:09 -0800)]
altosuilib: Wait for product data while scanning

Now that Altos only sends config information once every 5 seconds, we
want to keep waiting for that if we're receiving packets successfully.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: Mark listener as 'not running' on EOF.
Keith Packard [Sat, 7 Feb 2015 22:43:11 +0000 (14:43 -0800)]
altoslib: Mark listener as 'not running' on EOF.

This adds a 'running' member to the AltosListenerState class, and when
the replay reader reaches EOF, marks the listener as no longer
running.

AltosUI and TeleGPS now display 'done' in the 'Age' field when this
occurs, to let the user know that the replay is over.

Also make sure that the display timers are stopped when this happens,
or when the window is closed.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosui: Remove the dregs of AltosDroid load-old-telem code
Keith Packard [Sat, 7 Feb 2015 22:40:17 +0000 (14:40 -0800)]
altosui: Remove the dregs of AltosDroid load-old-telem code

AltosDroid used to scan the old .telem file to return to the previous
flight state on restart. Now it just loads the old state object
instead, a vast improvement in performance.

To do that, there were some changes in the altoslib code
required. This patch just removes those, fixing replay bugs in TeleGPS
along the way.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: ao_packet_getchar needs to return 'int' so AO_READ_AGAIN works
Keith Packard [Sat, 7 Feb 2015 21:09:18 +0000 (13:09 -0800)]
altos: ao_packet_getchar needs to return 'int' so AO_READ_AGAIN works

With ao_packet_getchar returning 'char', AO_READ_AGAIN would get
converted to 0xff instead of -1 on return, making ao_packet_echo
either produce a bogus character on output, breaking command
responses, or wedge and never exit when the link was dropped.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoUpdate version 1.6 release notes with more bug fixes
Keith Packard [Sat, 7 Feb 2015 10:37:36 +0000 (02:37 -0800)]
Update version 1.6 release notes with more bug fixes

A few bugs found during release testing are notable enough to be
included in the release notes.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Separate out ao_tracker force from dbg
Keith Packard [Sat, 7 Feb 2015 09:30:21 +0000 (01:30 -0800)]
altos: Separate out ao_tracker force from dbg

Allow enabling telemetry when USB is connected without also enabling
the motion debugging output.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/lpc: Give up on interrupt-driven SPI driver
Keith Packard [Sat, 7 Feb 2015 09:05:57 +0000 (01:05 -0800)]
altos/lpc: Give up on interrupt-driven SPI driver

There are just too many limitations in when interrupts are delivered
to make them useful. Instead, just drive the SPI directly with the
CPU. At higher spi speeds (6Mhz or more), it's probably faster to do
it this way anyways.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/drivers: Increase SPI speed of CC115L to 6MHz
Keith Packard [Sat, 7 Feb 2015 09:05:03 +0000 (01:05 -0800)]
altos/drivers: Increase SPI speed of CC115L to 6MHz

The datasheet says that the maximum for back-to-back data is 6.5MHz.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: Initialize GPS data to MISSING for Monitor Idle mode
Keith Packard [Sat, 7 Feb 2015 07:50:49 +0000 (23:50 -0800)]
altoslib: Initialize GPS data to MISSING for Monitor Idle mode

Make sure any un-set values are flagged correctly for the Monitor Idle
UI by using the init() method.

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