fw/altos
5 years agowindows: Look for current Java version in \SOFTWARE\Wow6432Node
Keith Packard [Fri, 6 Feb 2015 11:03:58 +0000 (03:03 -0800)]
windows: Look for current Java version in \SOFTWARE\Wow6432Node

I have no idea what this is, but I found the Java version down in
there...

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoAdd 'keithp-fat' target for uploading temporary builds to keithp's machine
Keith Packard [Fri, 6 Feb 2015 11:03:00 +0000 (03:03 -0800)]
Add 'keithp-fat' target for uploading temporary builds to keithp's machine

This lets me quickly prepare a new test version for Windows/Mac in a
single command.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agolibaltos: Use more SetupDi API to get Windows 7 listing devices
Keith Packard [Fri, 6 Feb 2015 09:29:56 +0000 (01:29 -0800)]
libaltos: Use more SetupDi API to get Windows 7 listing devices

My Windows 7 box doesn't include 'SymbolicName' in the registry, but
SetupDiGetDeviceInstanceId *does* return something that includes
vid/pid/serial, so use that in preference.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoUpdate docs for 1.6
Keith Packard [Fri, 6 Feb 2015 06:25:35 +0000 (22:25 -0800)]
Update docs for 1.6

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/lpc: Double buffer USB data transfers
Keith Packard [Fri, 16 Jan 2015 09:09:26 +0000 (22:09 +1300)]
altos/lpc: Double buffer USB data transfers

This allocates twice the space in the USB memory so that transactions
can be double buffered without using separate CPU memory.

Signed-off-by: Keith Packard <keithp@keithp.com>
Conflicts:
src/lpc/ao_usb_lpc.c

5 years agoaltos/lpc: Clean up USB endpoint access functions
Keith Packard [Fri, 6 Feb 2015 00:08:44 +0000 (16:08 -0800)]
altos/lpc: Clean up USB endpoint access functions

The USB device endpoints can have two pointers in them, but we use
only the first. Fix the access functions to take an index as to which
we want so that we can disable the other address registers with them
instead of requiring open-coded access.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/easymini-v1.0: Shrink stack to deal with USB changes
Keith Packard [Thu, 5 Feb 2015 23:34:05 +0000 (15:34 -0800)]
altos/easymini-v1.0: Shrink stack to deal with USB changes

Reverting the USB double buffering means using more RAM, need to
shrink the EasyMini stack to accomodate that.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/teledongle-v3.0: Shrink stacks to 320 bytes to fit in ram
Keith Packard [Thu, 5 Feb 2015 23:01:03 +0000 (15:01 -0800)]
altos/teledongle-v3.0: Shrink stacks to 320 bytes to fit in ram

The old USB code had static in/out buffers in ram

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoRevert LPC usb performance improvements
Keith Packard [Thu, 5 Feb 2015 22:56:13 +0000 (14:56 -0800)]
Revert LPC usb performance improvements

There's something screwy going on, sticking garbage in the input
buffer at boot time

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoRevert "altos/lpc: Fix double-buffered USB changes"
Keith Packard [Thu, 5 Feb 2015 22:54:27 +0000 (14:54 -0800)]
Revert "altos/lpc: Fix double-buffered USB changes"

This reverts commit 41a0604ad1ea1a03e2db7d41731dbadf466b45db.

5 years agoao-bringup: Add turnon_teledonglev3
Keith Packard [Thu, 5 Feb 2015 06:55:24 +0000 (22:55 -0800)]
ao-bringup: Add turnon_teledonglev3

TeleDongle v3 uses the LPC11U14 processor which has no on-chip eeprom,
so we must reflash the device to set the default radio calibration value.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos: Rename teledongle-v1.9 as teledongle-v3.0
Keith Packard [Thu, 5 Feb 2015 04:33:04 +0000 (20:33 -0800)]
altos: Rename teledongle-v1.9 as teledongle-v3.0

No hardware changes from the 1.9 prototypes to the 3.0 final version.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/telebt-v3.0: Set initial radio cal to a sensible value
Keith Packard [Thu, 5 Feb 2015 04:30:15 +0000 (20:30 -0800)]
altos/telebt-v3.0: Set initial radio cal to a sensible value

CC1200 uses a different xtal than CC1120, so the default calibration
needs to change. This value hit 434.550 on SN 2407, so it seems like a
reasonable place to start.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/telebt-v3.0: Add monitor bits
Keith Packard [Sun, 1 Feb 2015 15:57:14 +0000 (16:57 +0100)]
altos/telebt-v3.0: Add monitor bits

Will be useful to actually be able to receive telemetry

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/usbtrng-v2.0: Select PA11/PA12 mapping config value
Keith Packard [Sun, 1 Feb 2015 15:46:40 +0000 (16:46 +0100)]
altos/usbtrng-v2.0: Select PA11/PA12 mapping config value

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/stmf0: Support PA11/PA12 remapping
Keith Packard [Sun, 1 Feb 2015 15:44:52 +0000 (16:44 +0100)]
altos/stmf0: Support PA11/PA12 remapping

Small pin-count versions of the STMF0 can remap PA11/PA12 on the same
pins as PA9/PA10. These are used by USB, so have the USB driver deal
with remapping them.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/telebt-v3.0: Turn red LED off after initialization
Keith Packard [Sun, 1 Feb 2015 15:44:07 +0000 (16:44 +0100)]
altos/telebt-v3.0: Turn red LED off after initialization

This lets the user know the device successfully initialized.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/telebt-v3.0: Fix stdio setup for BTM
Keith Packard [Sun, 1 Feb 2015 15:43:06 +0000 (16:43 +0100)]
altos/telebt-v3.0: Fix stdio setup for BTM

Make sure the BTM module is allowed to be included in stdio, but delay
adding that until the BT link is running.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos: Always include a check for stdio overflow
Keith Packard [Sun, 1 Feb 2015 15:42:01 +0000 (16:42 +0100)]
altos: Always include a check for stdio overflow

For some reason, the check for running out of space to record stdio
devices was disabled when only one device was expected.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/btm: Add fancier debug. Pull serial reset port low.
Keith Packard [Sun, 1 Feb 2015 15:39:17 +0000 (16:39 +0100)]
altos/btm: Add fancier debug. Pull serial reset port low.

Adds an interactive debugging mode to help diagnose BTM issues.

Discovered that the serial reset pin on the BTM needs to be pulled low
for the device to work correctly.

Leave the bt link interrupt disabled until things are initialized.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/stm: Add ability to delay STDIO usage for serial ports
Keith Packard [Sun, 1 Feb 2015 15:36:51 +0000 (16:36 +0100)]
altos/stm: Add ability to delay STDIO usage for serial ports

Bluetooth needs to delay adding the serial port to stdio until the
link is up and running. The cc1111 serial driver had
DELAY_SERIAL_*_STDIN bits which have been added to the STM serial driver.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoAnd, also add the TeleBT v3.0 flash loader Makefile
Keith Packard [Fri, 30 Jan 2015 13:04:50 +0000 (14:04 +0100)]
And, also add the TeleBT v3.0 flash loader Makefile

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoOops, forgot the TeleBT-v3.0 Makefile
Keith Packard [Fri, 30 Jan 2015 13:03:55 +0000 (14:03 +0100)]
Oops, forgot the TeleBT-v3.0 Makefile

git doesn't warn about files named 'Makefile' because they're supposed
to be generated...

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/stmf0: Re-implement fast ADC code for stmf0
Keith Packard [Wed, 28 Jan 2015 04:41:15 +0000 (20:41 -0800)]
altos/stmf0: Re-implement fast ADC code for stmf0

This creates a ring buffer for ADC data so that ADC fetching can run
in parallel with other activities.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/usbtrng-v2.0: Use stmf042 hardware CRC unit
Keith Packard [Wed, 28 Jan 2015 01:18:42 +0000 (17:18 -0800)]
altos/usbtrng-v2.0: Use stmf042 hardware CRC unit

Switch from software to hardware for CRC computation. I think this
must be faster, right?

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/stmf0: Add CRC driver
Keith Packard [Wed, 28 Jan 2015 00:55:27 +0000 (16:55 -0800)]
altos/stmf0: Add CRC driver

Sets up the stm32f0 CRC hardware, exposing inline functions to access
it. DMA access is possible, but usbtrng can't use that.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/stmf0: Remove remaining stm32l bits from stm32f0 code
Keith Packard [Tue, 27 Jan 2015 17:36:19 +0000 (09:36 -0800)]
altos/stmf0: Remove remaining stm32l bits from stm32f0 code

These were left over from the stm32f0 initial implementation work; now
it's more useful to list only the bits which are valid.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoao-tools: Add ao-usbtrng to dump RNG data for testing
Keith Packard [Tue, 27 Jan 2015 06:23:19 +0000 (22:23 -0800)]
ao-tools: Add ao-usbtrng to dump RNG data for testing

ao-usbtrng reads a specified number of kilobytes of random data from
a random number generator.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/stm: Fix typo in stm32l.h
Keith Packard [Tue, 27 Jan 2015 06:22:00 +0000 (22:22 -0800)]
altos/stm: Fix typo in stm32l.h

This crept in while working on the stmf0 bits. oops.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/usbtrng-v2.0: Add random output command
Keith Packard [Tue, 27 Jan 2015 06:16:18 +0000 (22:16 -0800)]
altos/usbtrng-v2.0: Add random output command

Read chunks of random ADC data, do some CRC16 computations to de-bias
and merge 4 bytes of input data into 2 bytes of output data, then dump
that out over USB.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/stmf0: Add ADC and DMA APIs
Keith Packard [Tue, 27 Jan 2015 06:14:57 +0000 (22:14 -0800)]
altos/stmf0: Add ADC and DMA APIs

The ADC api is what USBtrng wants; a way to repeatedly read a single
ADC input as fast as possible.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/stmf0: Add faster USB path
Keith Packard [Tue, 27 Jan 2015 06:12:40 +0000 (22:12 -0800)]
altos/stmf0: Add faster USB path

This adds a way to allocate private USB buffers for sending data
without needing to copy it again. It requires ensuring that all
accesses are 16 bits aligned to 16 bit boundaries.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/stmf0: Fix linker scripts to make ao_boot work
Keith Packard [Tue, 27 Jan 2015 06:10:47 +0000 (22:10 -0800)]
altos/stmf0: Fix linker scripts to make ao_boot work

The flash loader ended up assuming ao_boot was at the start of ram,
while the application stuck it after the interrupt table (where it
needs to go).

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoao-tools: Add --wait option to ao-usbload
Keith Packard [Mon, 26 Jan 2015 03:58:38 +0000 (19:58 -0800)]
ao-tools: Add --wait option to ao-usbload

This waits forever for USB writes to complete, instead of timing out
after five seconds. Useful when debugging the device.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos: Add flash-loader to usbtrng-v2.0
Keith Packard [Mon, 26 Jan 2015 03:37:05 +0000 (19:37 -0800)]
altos: Add flash-loader to usbtrng-v2.0

Uses the new STM32F042 flash loading bits.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos: Add self-flash support for STM32F042 processor
Keith Packard [Mon, 26 Jan 2015 03:35:19 +0000 (19:35 -0800)]
altos: Add self-flash support for STM32F042 processor

Also moves the usual address for applications out of the way of the
flash loader.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos: USBtrng v2.0 hardware bringup
Keith Packard [Mon, 26 Jan 2015 00:43:48 +0000 (16:43 -0800)]
altos: USBtrng v2.0 hardware bringup

Gets the USB connection running and blinks the LEDs.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos: Initial STMF04x support
Keith Packard [Mon, 26 Jan 2015 00:42:39 +0000 (16:42 -0800)]
altos: Initial STMF04x support

Basic clock configuration, OS support, LED and USB drivers.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos: Add support for TeleBT v3.0
Keith Packard [Sat, 24 Jan 2015 19:18:59 +0000 (11:18 -0800)]
altos: Add support for TeleBT v3.0

Add support to the BTM driver for non-CC1111 interrupts
Add HW flow control to STM serial driver

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos/lpc: Fix double-buffered USB changes
Keith Packard [Fri, 23 Jan 2015 05:31:45 +0000 (21:31 -0800)]
altos/lpc: Fix double-buffered USB changes

These got merged when we were down in Auckland, but before they'd been
finished. Transmitting worked fine, but receiving was mis-configuring
the OUT buffer size in the hardware.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos: Get rid of some accidental debug code
Keith Packard [Fri, 23 Jan 2015 04:34:43 +0000 (20:34 -0800)]
altos: Get rid of some accidental debug code

I was debugging the accelerometer calibration code and left some
printfs in it, which made TM run out of flash space.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoSet version to 1.5.9.1 1.5.9.1
Keith Packard [Fri, 16 Jan 2015 09:09:26 +0000 (22:09 +1300)]
Set version to 1.5.9.1

5 years agoaltos/lpc: Switch LPC SPI driver to interrupt-driven bdale-altosdroid
Keith Packard [Tue, 23 Dec 2014 01:27:09 +0000 (17:27 -0800)]
altos/lpc: Switch LPC SPI driver to interrupt-driven

This improves performance for SPI transfers, while allowing other
tasks to get work done during longer SPI transfers.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos: Adjust CC1200 RSSI reporting value
Keith Packard [Tue, 23 Dec 2014 01:11:51 +0000 (17:11 -0800)]
altos: Adjust CC1200 RSSI reporting value

On the test setup, we were about 13dB off, so tweak the settings to
suit. This result wasn't tested; it's just a rough offset until we get
a production run of TeleDongle boards back to do more systematic
measurements.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltos: Document cc115l power measured at RF setting 0x03 as -31.75dBm
Keith Packard [Tue, 23 Dec 2014 01:10:33 +0000 (17:10 -0800)]
altos: Document cc115l power measured at RF setting 0x03 as -31.75dBm

We built a custom TeleGPS load for radio sensitivity measurements with
the lowest documented power level setting (0x03), and measured the
power out at that value of -31.75dBm on the test board.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoao-bringup: Clear pending output before setting frequency.
Keith Packard [Wed, 10 Dec 2014 05:44:53 +0000 (21:44 -0800)]
ao-bringup: Clear pending output before setting frequency.

Maybe this will unwedge things

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agomicropeak: Support µPUSB with our own USB ids
Keith Packard [Sat, 6 Dec 2014 23:08:53 +0000 (15:08 -0800)]
micropeak: Support µPUSB with our own USB ids

This matches the new µPUSB id as well as the FTDI USB id.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoaltoslib: Add usbtrng, usbrelay and mpusb USB ids
Keith Packard [Sat, 6 Dec 2014 23:08:29 +0000 (15:08 -0800)]
altoslib: Add usbtrng, usbrelay and mpusb USB ids

Signed-off-by: Keith Packard <keithp@keithp.com>
5 years agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Sat, 6 Dec 2014 22:39:53 +0000 (15:39 -0700)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

5 years agoimprove test procedures for TeleMega
Bdale Garbee [Sat, 6 Dec 2014 22:39:35 +0000 (15:39 -0700)]
improve test procedures for TeleMega

6 years agoaltos/cc1200: With PQT wide open, we can't use PQT_REACHED for start
Keith Packard [Mon, 24 Nov 2014 02:56:40 +0000 (18:56 -0800)]
altos/cc1200: With PQT wide open, we can't use PQT_REACHED for start

Because we're allowing even signals only weakly correlated with the
preamble through to sync detection, we can't use the PQT_REACHED
symbol to tell when a packet header has been seen. Instead, just look
for SYNC_FOUND.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/cc1200: Open up preamble detect to improve sensitivity
Keith Packard [Mon, 24 Nov 2014 02:50:57 +0000 (18:50 -0800)]
altos/cc1200: Open up preamble detect to improve sensitivity

Increase soft decision PQT value to max (15) to ensure that we detect
even weak packets.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/cc1200: Wait for packet to be placed in FIFO during receive
Keith Packard [Mon, 24 Nov 2014 02:31:15 +0000 (18:31 -0800)]
altos/cc1200: Wait for packet to be placed in FIFO during receive

This changes the receive code to use MCU_STATUS, waiting for
MARC_STATUS1 to indicate that the packet is in the fifo before reading
it out.

It also fixes the receive timeout code to keep receiving if the
preamble or sync have been seen when the timeout fires. This makes
TeleLCO able to use short timeouts during scanning while still
successfully receiving packets.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/teledongle-v1.8: Make this the same as teledongle v1.9
Keith Packard [Mon, 17 Nov 2014 00:39:18 +0000 (16:39 -0800)]
altos/teledongle-v1.8: Make this the same as teledongle v1.9

Remove RSSI LED blinking, add CRC error LED

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Allow TeleMega to be built without MPU6000
Keith Packard [Mon, 17 Nov 2014 00:38:12 +0000 (16:38 -0800)]
altos: Allow TeleMega to be built without MPU6000

Robert Braibish's board has a dead MPU6000; this fix lets the TeleMega
firmware build without that driver so the rest of the board could be verified.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosui: Remove duplicate AltosUIPreferencesBackend.java
Keith Packard [Mon, 17 Nov 2014 00:37:15 +0000 (16:37 -0800)]
altosui: Remove duplicate AltosUIPreferencesBackend.java

There's a copy in altosuilib

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/microsplash: fix .gitignore to ignore resulting binary
Keith Packard [Sun, 16 Nov 2014 21:41:27 +0000 (13:41 -0800)]
altos/microsplash: fix .gitignore to ignore resulting binary

6 years agoAdd AltosDroid release note for version 1.5
Keith Packard [Sun, 16 Nov 2014 21:40:15 +0000 (13:40 -0800)]
Add AltosDroid release note for version 1.5

6 years agoaltosdroid: East and West were flipped in all GPS output
Keith Packard [Sun, 16 Nov 2014 21:17:55 +0000 (13:17 -0800)]
altosdroid: East and West were flipped in all GPS output

East is positive, West is negative

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosdroid: Save AltosState and restore at startup
Keith Packard [Sun, 16 Nov 2014 06:52:42 +0000 (22:52 -0800)]
altosdroid: Save AltosState and restore at startup

Instead of re-parsing the old logfile, save the current state in the
preferences database and restore at restart of the
TelemetryService. This makes the state get restored even before the BT
connection is recovered.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: add AltosPreferences state save/restore interfaces
Keith Packard [Sun, 16 Nov 2014 06:50:31 +0000 (22:50 -0800)]
altoslib: add AltosPreferences state save/restore interfaces

This serializes an entire AltosState object and stores it in the
preferences database for later retrieval. AltosDroid uses this to
recover the old state data when restarting.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosdroid: TabMap needs to expose () constructor
Keith Packard [Sun, 16 Nov 2014 06:49:06 +0000 (22:49 -0800)]
altosdroid: TabMap needs to expose () constructor

Otherwise we get an exception at startup time for some reason.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Add getBytes/putBytes interface to AltosPreferencesBackend
Keith Packard [Sun, 16 Nov 2014 06:48:15 +0000 (22:48 -0800)]
altoslib: Add getBytes/putBytes interface to AltosPreferencesBackend

This lets us store arbitrary binary data in the preferences database

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosdroid: Don't display MISSING flight number
Keith Packard [Sun, 16 Nov 2014 06:46:01 +0000 (22:46 -0800)]
altosdroid: Don't display MISSING flight number

Just check and clear the entry if we end up seeing that value

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Make AltosState serializable
Keith Packard [Sun, 16 Nov 2014 00:03:32 +0000 (16:03 -0800)]
altoslib: Make AltosState serializable

This involved making every class it references serializable as well

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Missing headers for mag sensor in CSV output
Keith Packard [Mon, 10 Nov 2014 22:41:17 +0000 (14:41 -0800)]
altoslib: Missing headers for mag sensor in CSV output

Kelsey Black <nmonic@gmail.com> reported that the TeleMega CSV output
was missing the header labels for the mag sensor data.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Reset interrupt flags before TX in CC1200 driver
Keith Packard [Fri, 7 Nov 2014 04:04:47 +0000 (20:04 -0800)]
altos: Reset interrupt flags before TX in CC1200 driver

Failing to reset the flags set during interrupt leads to
short-circuiting transmission and not a lot of packets going out.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/teledongle-v1.9: Switch to NXP processor as on prototype boards
Keith Packard [Fri, 7 Nov 2014 00:05:49 +0000 (16:05 -0800)]
altos/teledongle-v1.9: Switch to NXP processor as on prototype boards

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/lpc: Disable JTAG when using pins for GPIO
Keith Packard [Fri, 7 Nov 2014 00:04:56 +0000 (16:04 -0800)]
altos/lpc: Disable JTAG when using pins for GPIO

JTAG is enabled by default, making those pins not support GPIO unless
specifically configured.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/lpc: Declare SPI send parameters as const
Keith Packard [Fri, 7 Nov 2014 00:04:14 +0000 (16:04 -0800)]
altos/lpc: Declare SPI send parameters as const

This matches STM

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Use other TeleDongle LED for CRC-invalid packet reporting
Keith Packard [Fri, 7 Nov 2014 00:02:47 +0000 (16:02 -0800)]
altos: Use other TeleDongle LED for CRC-invalid packet reporting

Instead of blinking out some fake-o RSSI indication, just blink the
red LED when a packet with a bad CRC is received.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosuilib: GPS errors are recorded in floating point, not integers
Keith Packard [Fri, 7 Nov 2014 00:02:07 +0000 (16:02 -0800)]
altosuilib: GPS errors are recorded in floating point, not integers

Fix the format used to present them in the info table.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Use AO_SPO_SPEED_FAST for CC1200
Keith Packard [Fri, 7 Nov 2014 00:01:24 +0000 (16:01 -0800)]
altos: Use AO_SPO_SPEED_FAST for CC1200

This asks for the fastest available SPI speed, instead of fixing it to
8MHz, which may not be supported on every architecture.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Stop attempting to ramp power on CC115L
Keith Packard [Fri, 7 Nov 2014 00:00:06 +0000 (16:00 -0800)]
altos: Stop attempting to ramp power on CC115L

The PA register on the 115L isn't in any way monotonic, making the old
code broken. Just rempve it instead of fixing it; we don't ramp
anywhere else...

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Declare port register type only in arch header
Keith Packard [Thu, 6 Nov 2014 23:58:42 +0000 (15:58 -0800)]
altos: Declare port register type only in arch header

Instead of defaulting to 8 bits, explicitly require declaration of the
type of the port register for each architecture.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoMove teledongle 1.9 to 1.8; there's a new 1.9
Keith Packard [Thu, 6 Nov 2014 21:27:29 +0000 (13:27 -0800)]
Move teledongle 1.9 to 1.8; there's a new 1.9

1.9 is now the lpc11u14-based form-factor prototype board.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Rename microwater to microsplash
Keith Packard [Thu, 6 Nov 2014 06:11:44 +0000 (22:11 -0800)]
altos: Rename microwater to microsplash

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosui: Pop up 'Connecting' dialog during Monitor Idle
Keith Packard [Fri, 31 Oct 2014 04:59:45 +0000 (21:59 -0700)]
altosui: Pop up 'Connecting' dialog during Monitor Idle

This was a bit harder than expected as I had to wire up a way to shut
down the whole monitor idle window when you clicked on the cancel button.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Increase CC1200 SPI data rate to 8MHz
Keith Packard [Sun, 26 Oct 2014 04:14:25 +0000 (21:14 -0700)]
altos: Increase CC1200 SPI data rate to 8MHz

This got set to 125kHz to make debugging with a logic analyzer easier
and never changed back to a reasonable speed.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Fix up telemetry delay computations
Keith Packard [Sun, 26 Oct 2014 02:56:25 +0000 (19:56 -0700)]
altos: Fix up telemetry delay computations

With RDF, APRS and telemetry all being sent at varying rates,
computing when to send the next radio data is not as simple as sending
telemetry and then figuring out whether to send RDF and/or APRS.

Fix this by computing times for the next telemetry/rdf/aprs packet,
and only sending each when that time has passed. Compute the delay
until the next radio activity as the minimum time to any transmission.

This also adds code to the config bits to reset the radio times
whenever something changes that might affect which radio data to send
next.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Perform cc1200 calibration less often. Tweak radio params
Keith Packard [Sun, 26 Oct 2014 00:44:48 +0000 (17:44 -0700)]
altos: Perform cc1200 calibration less often. Tweak radio params

This performs calibration after every 4 operations, or when the
frequency changes. This reduces the time it takes to get to receive
mode.

This also makes the sync and preamble qualifiers more strict to reject
bad packets.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Remove old AO_SEND_ALL_BARO bits
Keith Packard [Sat, 25 Oct 2014 18:20:44 +0000 (11:20 -0700)]
altos: Remove old AO_SEND_ALL_BARO bits

This was used for testing the original TeleMini which couldn't log
data at full speed.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Build TeleDongle v1.9 by default
Keith Packard [Sat, 25 Oct 2014 17:21:30 +0000 (10:21 -0700)]
altos: Build TeleDongle v1.9 by default

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Increase PQT value for cc1200 improving sensitivity
Keith Packard [Sat, 25 Oct 2014 17:20:07 +0000 (10:20 -0700)]
altos: Increase PQT value for cc1200 improving sensitivity

The PQT value indicates how 'good' the preamble is; higher values
allow a lower quality of preamble to pass the test, permitting more
packets to be decoded.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Sort out ao_gps_print altitude fetching
Keith Packard [Sat, 25 Oct 2014 17:17:48 +0000 (10:17 -0700)]
altos: Sort out ao_gps_print altitude fetching

ao_gps_print is used by both teledongle/telebt and the host-based GPS
test code. The first instance uses the old internal GPS structure,
containing just a 16-bit altitude while the second uses an
ao_telemetry structure, which contains 32 bits split into two
members.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/teledongle-v1.9: Add remaining code to complete the project
Keith Packard [Tue, 7 Oct 2014 03:36:18 +0000 (05:36 +0200)]
altos/teledongle-v1.9: Add remaining code to complete the project

This turns the prototype board into a full teledongle

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Complete cc1200 driver
Keith Packard [Tue, 7 Oct 2014 03:34:06 +0000 (05:34 +0200)]
altos: Complete cc1200 driver

Deal with differences between cc1120 and cc1200, including built-in
packet support and various register changes.

This now works to send and receive telemetry, as well as send APRS and
RDF.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Expose telemetry altitude macros even without GPS
Keith Packard [Tue, 7 Oct 2014 03:35:10 +0000 (05:35 +0200)]
altos: Expose telemetry altitude macros even without GPS

This allows for APRS testing in the new teledongle code

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Mark STM ao_spi_send as taking const pointer
Keith Packard [Tue, 7 Oct 2014 03:32:00 +0000 (05:32 +0200)]
altos: Mark STM ao_spi_send as taking const pointer

We don't write to this, so let it be const for type checking

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoao-tools/ao-send-telem: Add verbose, fake and rate options
Keith Packard [Sat, 25 Oct 2014 02:10:45 +0000 (19:10 -0700)]
ao-tools/ao-send-telem: Add verbose, fake and rate options

Verbose dumps some data while sending packets.
Fake sends constructed packets, once every 500ms.
Rate sets the transmit bit rate.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosuilib: Try to detect the architecture when loading JNI lib
Keith Packard [Wed, 15 Oct 2014 23:10:11 +0000 (16:10 -0700)]
altosuilib: Try to detect the architecture when loading JNI lib

Look at sun.arch.data.model and os.arch to try and load the right
libaltos file the first time.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: synchronize access to serial debug output list
Keith Packard [Sat, 25 Oct 2014 04:21:19 +0000 (21:21 -0700)]
altoslib: synchronize access to serial debug output list

This list is access by both the receiver and the monitor task, so it
needs to be locked to prevent collisions.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agodocument pyro current limits in an appendix
Bdale Garbee [Thu, 9 Oct 2014 19:11:16 +0000 (13:11 -0600)]
document pyro current limits in an appendix

6 years agoaltos: Add prototype TeleDongle v1.9 code
Keith Packard [Sun, 5 Oct 2014 07:07:10 +0000 (00:07 -0700)]
altos: Add prototype TeleDongle v1.9 code

Lights up the hardware, sends carrier and RDF tones. A bit more cc1200
work to be done still.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Copy cc1120 driver to cc1200 driver and hack a bit
Keith Packard [Sun, 5 Oct 2014 07:03:28 +0000 (00:03 -0700)]
altos: Copy cc1120 driver to cc1200 driver and hack a bit

The cc1200 is similar to the cc1120, although many registers have
changed.

This driver can send a bare carrier and an RDF tone, but does not yet
receive or transmit telemetry data.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Fix syntax error with ao_log_mega change.
Keith Packard [Sat, 4 Oct 2014 07:30:54 +0000 (00:30 -0700)]
altos: Fix syntax error with ao_log_mega change.

Missed a semi-colon.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Compute tilt angle from eeprom data
Keith Packard [Sat, 4 Oct 2014 07:11:13 +0000 (00:11 -0700)]
altoslib: Compute tilt angle from eeprom data

This copies the computation of tilt angle from the firmware so that
post-flight analysis can also show the data.

This change also renames all of the imu values to make them easier to
understand:

accel gyro axis

along roll length of the board
across pitch across the board
through yaw through the board.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosui: Update 'Imperial Units' checkbox when units change
Keith Packard [Sat, 4 Oct 2014 07:10:03 +0000 (00:10 -0700)]
altosui: Update 'Imperial Units' checkbox when units change

If you have two graphs running, make sure the imperial units
checkboxes agree.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Deal with new Mega log format that has 32-bit gyro cal
Keith Packard [Sat, 4 Oct 2014 07:07:39 +0000 (00:07 -0700)]
altoslib: Deal with new Mega log format that has 32-bit gyro cal

This adds parsing for the new log format type to get all 32 bits of
the gyro calibration data.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Record 32-bits for gyro calibration values
Keith Packard [Sat, 4 Oct 2014 07:04:39 +0000 (00:04 -0700)]
altos: Record 32-bits for gyro calibration values

The gyro ground calibration values are scaled by 512 to provide a bit
more precision for the computations. This means they don't fit in 16
bits, so change the format of the flight log record. Also change the
reported format so that AltosUI has a chance of figuring it out.

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