fw/altos
3 days agoaltos/telelco-v2.0: Do all drag race beeping from the beeping thread master
Keith Packard [Mon, 18 Jun 2018 17:53:35 +0000 (10:53 -0700)]
altos/telelco-v2.0: Do all drag race beeping from the beeping thread

Instead of starting the beep from the calling thread, just update some
state and poke the beeping thread.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoaltos/ao_pad: Move LED test to the monitor task
Keith Packard [Sun, 17 Jun 2018 19:35:23 +0000 (12:35 -0700)]
altos/ao_pad: Move LED test to the monitor task

It sets the LEDs, so it's best to not start doing that until we've
tested them.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoaltos/ao_pad: Turn on all LEDs for a moment at power up
Keith Packard [Sun, 17 Jun 2018 19:30:09 +0000 (12:30 -0700)]
altos/ao_pad: Turn on all LEDs for a moment at power up

Allow validation of all LED connections.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoaltos/ao_pad: Use AO_LED_TYPE for computing active LEDs.
Keith Packard [Sun, 17 Jun 2018 19:29:36 +0000 (12:29 -0700)]
altos/ao_pad: Use AO_LED_TYPE for computing active LEDs.

instead of uint8_t

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoaltos/stm: Let products override AO_LED_TYPE for stm processors
Keith Packard [Sun, 17 Jun 2018 19:28:51 +0000 (12:28 -0700)]
altos/stm: Let products override AO_LED_TYPE for stm processors

No need requiring it to be uint16_t

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoBump version to 1.8.6
Keith Packard [Sun, 17 Jun 2018 08:36:00 +0000 (01:36 -0700)]
Bump version to 1.8.6

Prepare for release.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoaltos/telelco-v2.0: Fix AO_ADC_DUMP
Keith Packard [Sun, 17 Jun 2018 08:20:01 +0000 (01:20 -0700)]
altos/telelco-v2.0: Fix AO_ADC_DUMP

Was printing p.v_batt instead of (p)->v_batt. I don't know why the
former even worked.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoaltos/telelco-v0.2-cc1200: Add build for NAR hacked TeleLCO v0.2 board
Keith Packard [Sun, 17 Jun 2018 06:50:11 +0000 (23:50 -0700)]
altos/telelco-v0.2-cc1200: Add build for NAR hacked TeleLCO v0.2 board

This has the CC1120 replaced with a CC1200, but with 32MHz xtals
instead of 40MHz on the radio chip.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoaltos/driver: Improve quadrature debouncing for mechanical encoders
Keith Packard [Sun, 17 Jun 2018 06:51:26 +0000 (23:51 -0700)]
altos/driver: Improve quadrature debouncing for mechanical encoders

Track state of encoder better and only bump values when the full
motion is detected (all four states).

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoaltos/telelco-v0: Test display, show batt voltage at boot
Keith Packard [Sun, 17 Jun 2018 07:17:29 +0000 (00:17 -0700)]
altos/telelco-v0: Test display, show batt voltage at boot

Just like telelco v2

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoao-bringup: Find dfu-util in $PATH for chaoskey
Keith Packard [Sun, 17 Jun 2018 07:19:37 +0000 (00:19 -0700)]
ao-bringup: Find dfu-util in $PATH for chaoskey

In case it's not in /usr/bin

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoaltos/stm: Define ADC channels for TEMP and V_REF
Keith Packard [Sun, 17 Jun 2018 06:47:42 +0000 (23:47 -0700)]
altos/stm: Define ADC channels for TEMP and V_REF

These are fixed at 16 and 17.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoaltos/stm: Remove unused ADC names from ao_adc_single_stm.c
Keith Packard [Sun, 17 Jun 2018 06:47:15 +0000 (23:47 -0700)]
altos/stm: Remove unused ADC names from ao_adc_single_stm.c

Signed-off-by: Keith Packard <keithp@keithp.com>
2 weeks agoaltos/telelco: Remove STATIC_TEST code from stand-alone LCO boxes
Keith Packard [Fri, 1 Jun 2018 05:45:49 +0000 (22:45 -0700)]
altos/telelco: Remove STATIC_TEST code from stand-alone LCO boxes

This command conflicts with the 'debug' command in these devices and
so wasn't usable anyways.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 weeks agoaltos/telelco-v2.0: Test displays at power on
Keith Packard [Fri, 1 Jun 2018 05:42:13 +0000 (22:42 -0700)]
altos/telelco-v2.0: Test displays at power on

At boot, light up all LEDS and LCD segments for a second to let the
user verify that things are working correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 weeks agoaltos/telefire*: Do voltage tests in decivolts instead of ADC units
Keith Packard [Fri, 1 Jun 2018 05:39:45 +0000 (22:39 -0700)]
altos/telefire*: Do voltage tests in decivolts instead of ADC units

This requires that each pad device specify the ADC reference voltage
and all relevant voltage divider resistor values explicitly so that
the ADC values can be converted to decivolts and compared with one
another. This should be easier to understand in the future when
reading the code.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/telefireeight-v1.0: Fix ADC definitions
Keith Packard [Thu, 31 May 2018 23:24:33 +0000 (16:24 -0700)]
altos/telefireeight-v1.0: Fix ADC definitions

Was missing all of the GPIO configuration bits, which probably meant
the ADCs were returning garbage values.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltoslib: Revert field name changes for accel cal values
Keith Packard [Wed, 30 May 2018 18:38:24 +0000 (11:38 -0700)]
altoslib: Revert field name changes for accel cal values

These names get written in the JSON part of all .eeprom files, so we
can't change the names or the values won't be read and written correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/telelco-v2.0: Set HAS_ADC_SINGLE to enable HSI timer
Keith Packard [Tue, 29 May 2018 02:19:43 +0000 (19:19 -0700)]
altos/telelco-v2.0: Set HAS_ADC_SINGLE to enable HSI timer

The ADC unit requires the HSI timer to run, so make sure it's enabled
for this device.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/stm: Enable HSI timer when HAS_ADC_SINGLE is set
Keith Packard [Tue, 29 May 2018 02:18:48 +0000 (19:18 -0700)]
altos/stm: Enable HSI timer when HAS_ADC_SINGLE is set

The ADC unit always uses the HSI timer.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/telelco-v2.0: Display local batt voltage at startup
Keith Packard [Mon, 28 May 2018 23:10:51 +0000 (16:10 -0700)]
altos/telelco-v2.0: Display local batt voltage at startup

Show the battery voltage for a second at startup.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/stm: Add polling ADC sampler API
Keith Packard [Mon, 28 May 2018 23:09:19 +0000 (16:09 -0700)]
altos/stm: Add polling ADC sampler API

This just fetches ADC values on demand instead of loading them
periodically into a ring buffer from the timer interrupt.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/telelco-v2.0: Change drag race selected/no-continutity pattern
Keith Packard [Mon, 28 May 2018 22:12:26 +0000 (15:12 -0700)]
altos/telelco-v2.0: Change drag race selected/no-continutity pattern

Make it turn on at the same time as the pads with continuity, but turn
off sooner

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/telelco-v2.0: Add debug output for pad voltage display
Keith Packard [Mon, 28 May 2018 22:07:06 +0000 (15:07 -0700)]
altos/telelco-v2.0: Add debug output for pad voltage display

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/telelco-v2.0: A bit fancier with the drag-mode LED show
Keith Packard [Mon, 28 May 2018 21:54:47 +0000 (14:54 -0700)]
altos/telelco-v2.0: A bit fancier with the drag-mode LED show

Continutity leds now show whether the pad is included in the drag race
*and* the continutity using four different patterns:

Drag select & igniter present: long on, short off
Drag select & igniter missing: short on, long off
Not select & igniter present: solid on
Not select & igniter missing: solid off

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/telelco-v2.0: Fix button names and pin mappings. Add drag LED.
Keith Packard [Mon, 28 May 2018 21:41:51 +0000 (14:41 -0700)]
altos/telelco-v2.0: Fix button names and pin mappings. Add drag LED.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/telelco-v2.0: Mixed up the select_button pin (is E0, was set to E13)
Keith Packard [Mon, 28 May 2018 21:35:18 +0000 (14:35 -0700)]
altos/telelco-v2.0: Mixed up the select_button pin (is E0, was set to E13)

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/telelco-v2.0: Only look at drag select presses, not releases
Keith Packard [Mon, 28 May 2018 21:26:47 +0000 (14:26 -0700)]
altos/telelco-v2.0: Only look at drag select presses, not releases

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/telelco-v2.0: Use single-step quadrature code
Keith Packard [Mon, 28 May 2018 21:26:12 +0000 (14:26 -0700)]
altos/telelco-v2.0: Use single-step quadrature code

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/driver: Add support for one-step-per-click quadrature encoder
Keith Packard [Mon, 28 May 2018 21:15:34 +0000 (14:15 -0700)]
altos/driver: Add support for one-step-per-click quadrature encoder

The mechanical encoders go through all four steps per click while the
optical ones have a single step per click. Support both kinds.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/telelco-v2.0: Reduce quadrature debounce time
Keith Packard [Mon, 28 May 2018 20:08:33 +0000 (13:08 -0700)]
altos/telelco-v2.0: Reduce quadrature debounce time

The optical encoders shouldn't bounce at all; let's try a minimal value.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/drivers: Make quadrature debounce longer by default. Fix state tracking
Keith Packard [Mon, 28 May 2018 20:07:06 +0000 (13:07 -0700)]
altos/drivers: Make quadrature debounce longer by default. Fix state tracking

This increases the default debounce time for quadrature encoders to
30ms, which cleans up the mechanical encoders on TeleLCO v0.2. Also
change state tracking to explicitly check for expected state values to
avoid mis-triggering.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/telelco-v2.0: Only switch encoder mode on push, not release
Keith Packard [Mon, 28 May 2018 19:06:41 +0000 (12:06 -0700)]
altos/telelco-v2.0: Only switch encoder mode on push, not release

Was not checking event value.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/ao_button.c: Support up to 16 buttons
Keith Packard [Mon, 28 May 2018 18:23:03 +0000 (11:23 -0700)]
altos/ao_button.c: Support up to 16 buttons

TeleLCO v2.0 has more than 4

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos/telelco-v2: Change select button to alternate box/pad mode
Keith Packard [Mon, 28 May 2018 18:12:36 +0000 (11:12 -0700)]
altos/telelco-v2: Change select button to alternate box/pad mode

Instead of a three-way, just make the select button two-way and have
the arming switch disable it.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Add TeleFireEight v1.0 product
Keith Packard [Tue, 22 May 2018 05:36:35 +0000 (22:36 -0700)]
altos: Add TeleFireEight v1.0 product

Eight pyro channel version of the TeleFire boards.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos/drivers: Pads with multi-port firing and pad selector DIP switch
Keith Packard [Tue, 22 May 2018 05:32:38 +0000 (22:32 -0700)]
altos/drivers: Pads with multi-port firing and pad selector DIP switch

TeleFire 8 scrambles GPIOs to make layout cleaner, placing the 8
firing outputs across two GPIO ports.

We're also adding an 8-unit selector for box number so that boards can
be re-configured in the field. These override any ROM-configuration
value; you can select the rom value by setting all switches to 'off'.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agoaltos/stm: Add per-LED port/pin mode in LED code
Keith Packard [Thu, 17 May 2018 05:03:25 +0000 (22:03 -0700)]
altos/stm: Add per-LED port/pin mode in LED code

If you've got a complicated LED pin arrangement, you can ask for each
one to be configured separately, instead of using groups in a couple
of GPIO registers. The code isn't as efficient this way, but at least
it's easy to read.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agoaltos: Add TeleLCO v2.0 product
Keith Packard [Thu, 17 May 2018 05:02:11 +0000 (22:02 -0700)]
altos: Add TeleLCO v2.0 product

New LCO design with a single rotary knob and lots more buttons.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agoaltos/vidtime: Check for value change in normal code, not irq
Keith Packard [Thu, 17 May 2018 05:05:26 +0000 (22:05 -0700)]
altos/vidtime: Check for value change in normal code, not irq

This makes sure each value change is reported to the user.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoaltos: add 'vidtime', a simple brightness monitor
Keith Packard [Mon, 7 May 2018 18:26:42 +0000 (11:26 -0700)]
altos: add 'vidtime', a simple brightness monitor

This is a testing tool for video refresh tracking. It uses the mpusb
v3.0 hardware and monitors the phototransistor value, sending 0 or 1
to the USB port when the value changes.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoMerge branch 'mpusb'
Keith Packard [Mon, 7 May 2018 16:53:52 +0000 (09:53 -0700)]
Merge branch 'mpusb'

6 weeks agoaltos/mpusb-v3.0: Make it compile again
Keith Packard [Mon, 7 May 2018 16:43:27 +0000 (09:43 -0700)]
altos/mpusb-v3.0: Make it compile again

A few things have changed since this code was written.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoaltos/stmf0: leave ao_power_gpio names undefined without power management
Keith Packard [Mon, 7 May 2018 16:42:28 +0000 (09:42 -0700)]
altos/stmf0: leave ao_power_gpio names undefined without power management

Should make it more obvious at compile time that you've done something wrong.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoaltos: Add µPusb v3.0 project
Keith Packard [Wed, 20 Jan 2016 08:00:07 +0000 (00:00 -0800)]
altos: Add µPusb v3.0 project

This replaces the ft230 with a stm32f04, saving a bit of BOM
and giving us control over the firmware.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agodoc: Update pyro channel info to reflect UI changes
Keith Packard [Mon, 7 May 2018 15:58:21 +0000 (08:58 -0700)]
doc: Update pyro channel info to reflect UI changes

Use the new naming in the UI. Add lots more comments about how things work.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoaltos/test: Replace state name with 10* state value in test log. Fix raw speed
Keith Packard [Mon, 7 May 2018 15:56:32 +0000 (08:56 -0700)]
altos/test: Replace state name with 10* state value in test log. Fix raw speed

Using a state value means we can plot state changes along with the
rest of the graph. Raw speed (simple integrated acceleration) was
busted; mostly needing to skip the first accel sample.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoaltos: Eliminate height requirement for coast detect
Keith Packard [Mon, 7 May 2018 15:51:36 +0000 (08:51 -0700)]
altos: Eliminate height requirement for coast detect

We had required a minimum altitude of 100m to transition from boost to
coast. With small motors in a heavy multi-staged rocket, this can fail
to detect coast in time to light the second motor.

Also, this would fail to deploy recovery systems if the flight failed
before reaching 100m.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoUpdate version to 1.8.5.2
Keith Packard [Mon, 7 May 2018 15:50:33 +0000 (08:50 -0700)]
Update version to 1.8.5.2

Shipped some bits to Fred Taverni to test eliminating the altitude
requirement for boost detect as he stages so low.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoao-chaosread: Add support for the new flash endpoint in chaoskey
Keith Packard [Mon, 7 May 2018 04:16:25 +0000 (21:16 -0700)]
ao-chaosread: Add support for the new flash endpoint in chaoskey

This adds support for endpoint 0x87, which streams the contents of the
onboard flash to the host for firmware verification.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoaltos/chaoskey-v1.0: Add endpoint for reading flash contents
Keith Packard [Mon, 7 May 2018 04:13:02 +0000 (21:13 -0700)]
altos/chaoskey-v1.0: Add endpoint for reading flash contents

This creates another IN endpoint which provides the contents of flash
for validation of the firmware load on the host.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoaltos/stmf0: Fix up USB debug code
Keith Packard [Mon, 7 May 2018 04:11:48 +0000 (21:11 -0700)]
altos/stmf0: Fix up USB debug code

At least make it compile. In this configuration, it's dumping out IN3
endpoint register values.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoaltos/stmf0: Add IN3 alternate endpoint support
Keith Packard [Mon, 7 May 2018 04:11:02 +0000 (21:11 -0700)]
altos/stmf0: Add IN3 alternate endpoint support

This adds the code necessary to drive another IN endpoint.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoaltos/stmf0: Toggle IN2 SW_BUF bit when sending data
Keith Packard [Mon, 7 May 2018 04:09:22 +0000 (21:09 -0700)]
altos/stmf0: Toggle IN2 SW_BUF bit when sending data

This tells the hardware we're done writing data to the second input
buffer and allows it to be switched from NAK to VALID.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoaltos/kernel: Add USB descriptors for IN3
Keith Packard [Mon, 7 May 2018 04:17:32 +0000 (21:17 -0700)]
altos/kernel: Add USB descriptors for IN3

This adds the necessary descriptor information to support another IN
endpoint for applications.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoaltos/kernel: Define usb IN2/IN3 functions
Keith Packard [Mon, 7 May 2018 04:06:31 +0000 (21:06 -0700)]
altos/kernel: Define usb IN2/IN3 functions

These are putchar and flush functions that are used when sending data
to the additional IN2 and IN3 endpoints.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoao-bringup/turnon_telemini: Skip DFU if no DFU device is present
Keith Packard [Wed, 2 May 2018 06:47:27 +0000 (23:47 -0700)]
ao-bringup/turnon_telemini: Skip DFU if no DFU device is present

This skips running dfu-util to load the bootloader if there isn't a
suitable DFU device listed in the system, which allows an
already-flashed device to be run through the same script.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/stmf0: Set 0x0 mapping to Main Flash for boot loader
Keith Packard [Wed, 2 May 2018 06:44:00 +0000 (23:44 -0700)]
altos/stmf0: Set 0x0 mapping to Main Flash for boot loader

When DFU finishes loading firmware and jumps to the application, it
leaves the mapping of addresses starting at 0x0 set to System flash,
which prevents the boot loader from receiving interrupts and requires
a power cycle during flash & cal.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/stmf0: whitespace fix
Keith Packard [Wed, 2 May 2018 06:36:57 +0000 (23:36 -0700)]
altos/stmf0: whitespace fix

Trailing whitespace.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/stmf0: Change tests for AO_BOOT_CHAIN and AO_BOOT_PIN to #if
Keith Packard [Wed, 2 May 2018 06:36:16 +0000 (23:36 -0700)]
altos/stmf0: Change tests for AO_BOOT_CHAIN and AO_BOOT_PIN to #if

Were #ifdef, which meant that #define AO_BOOT_PIN 0 didn't work right.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltoslib: Fix Idle Monitor on TeleMega v3
Keith Packard [Sat, 28 Apr 2018 19:03:10 +0000 (12:03 -0700)]
altoslib: Fix Idle Monitor on TeleMega v3

The new IMU includes a mag sensor, and there's no separate mag sensor.

Add support for reading the mag sensor values from the IMU, separate
out v3 from previous TeleMega versions so that the code can stop
trying to read the mag sensor.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox1ihu: Pull down radio control pin in flash loader
Keith Packard [Sat, 21 Apr 2018 23:16:18 +0000 (16:16 -0700)]
altos/fox1ihu: Pull down radio control pin in flash loader

Ensures that the radio is powered down while in the flash loader.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoRemove ao_radio_cal from stm products without radios
Keith Packard [Sat, 8 Aug 2015 03:16:41 +0000 (20:16 -0700)]
Remove ao_radio_cal from stm products without radios

Products without a radio don't need this value.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agohad the sense backwards .. presence of 'attached' should put us in the loader
Bdale Garbee [Tue, 6 May 2014 06:38:33 +0000 (00:38 -0600)]
had the sense backwards .. presence of 'attached' should put us in the loader

7 weeks agomove signal that forces flash-loader on to PB8, active high
Bdale Garbee [Mon, 5 May 2014 23:32:22 +0000 (17:32 -0600)]
move signal that forces flash-loader on to PB8, active high

7 weeks agoaltos: Build fox1ihu by default
Keith Packard [Sat, 27 Apr 2013 07:36:36 +0000 (00:36 -0700)]
altos: Build fox1ihu by default

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: Enable system timer in flash loader and prod watchdog with it
Keith Packard [Sat, 1 Feb 2014 08:06:30 +0000 (00:06 -0800)]
altos/fox: Enable system timer in flash loader and prod watchdog with it

This makes it possible to reflash the board without needing to disable
the watchdog.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: Update ADC to fox-1 IHU Revision 2
Keith Packard [Sat, 1 Feb 2014 06:39:58 +0000 (22:39 -0800)]
altos/fox: Update ADC to fox-1 IHU Revision 2

Change ADC pin definitions to match new hardware.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: Transition to current altos build environment
Keith Packard [Sat, 1 Feb 2014 01:44:45 +0000 (17:44 -0800)]
altos/fox: Transition to current altos build environment

Fix the library usage, use $(LIBS) instead of $(SAT_CLIB) -lgcc

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: update product name to show v2, enable watchdog by default
Keith Packard [Sun, 28 Apr 2013 07:42:31 +0000 (00:42 -0700)]
altos/fox: update product name to show v2, enable watchdog by default

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: Run app when PD6 is low
Keith Packard [Sun, 28 Apr 2013 07:05:39 +0000 (00:05 -0700)]
altos/fox: Run app when PD6 is low

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: Add fox1ihu flash loader
Keith Packard [Sat, 27 Apr 2013 23:06:48 +0000 (16:06 -0700)]
altos/fox: Add fox1ihu flash loader

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: Add MRAM and SD card drivers
Keith Packard [Fri, 26 Apr 2013 04:25:12 +0000 (21:25 -0700)]
altos/fox: Add MRAM and SD card drivers

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: Enable M25 driver for MRAM.
Keith Packard [Thu, 21 Mar 2013 17:16:35 +0000 (10:16 -0700)]
altos/fox: Enable M25 driver for MRAM.

The M25 driver can also talk to the MRAM chip, with a few adjustments

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: Add watchdog timer
Keith Packard [Thu, 21 Mar 2013 16:49:15 +0000 (09:49 -0700)]
altos/fox: Add watchdog timer

Runs at 25Hz, can be enabled and disabled via the command line

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: Turn on all of the fox lights
Keith Packard [Thu, 24 Jan 2013 05:37:24 +0000 (21:37 -0800)]
altos/fox: Turn on all of the fox lights

Fox has two red and two green LEDs

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: Provide names for fox ADC channels
Keith Packard [Thu, 24 Jan 2013 05:36:18 +0000 (21:36 -0800)]
altos/fox: Provide names for fox ADC channels

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: Fix up Fox ADC bits
Keith Packard [Thu, 24 Jan 2013 05:05:26 +0000 (21:05 -0800)]
altos/fox: Fix up Fox ADC bits

Update to current schematic

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: Initialize FOX adc
Keith Packard [Thu, 24 Jan 2013 04:48:04 +0000 (20:48 -0800)]
altos/fox: Initialize FOX adc

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/fox: rename fox product
Bdale Garbee [Thu, 24 Jan 2013 04:45:28 +0000 (21:45 -0700)]
altos/fox: rename fox product

It's Fox1IHU-v1 now

7 weeks agoaltos/fox: Add fox1ihu bringup firmware
Keith Packard [Thu, 24 Jan 2013 03:03:26 +0000 (19:03 -0800)]
altos/fox: Add fox1ihu bringup firmware

Firmware capable of testing fox1ihu hardware

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltoslib: Fix data fetching during flashing of cc1111-based devices
Keith Packard [Fri, 27 Apr 2018 00:24:51 +0000 (17:24 -0700)]
altoslib: Fix data fetching during flashing of cc1111-based devices

We want to get enough information about the target device to verify
that the new firmware matches, so fetch 512 bytes instead of just
barely enough to cover the romconfig data.

Also catch out-of-bounds accesses and handle them, in case even this
large array isn't enough.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltoslib: Keep config data accel cal in antenna up form.
Keith Packard [Thu, 26 Apr 2018 23:30:54 +0000 (16:30 -0700)]
altoslib: Keep config data accel cal in antenna up form.

Instead of letting the accel cal data live in whatever form it was
fetched in, keep it in antenna up form and provide it in whatever
orientation is necessary.

This fixes bugs in changing pad configuration where the accel cal values
from the old orientation would get used in the new orientation and
wreck them.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltoslib: Flush settings restoration commands after accel cal
Keith Packard [Thu, 26 Apr 2018 06:07:46 +0000 (23:07 -0700)]
altoslib: Flush settings restoration commands after accel cal

To avoid mangling settings when the user doesn't 'save' things,
restore the original accel cal values and orientation after finishing
accelerometer calibration.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltoslib: Remove ascending/descending from pyro config
Keith Packard [Mon, 23 Apr 2018 03:02:04 +0000 (20:02 -0700)]
altoslib: Remove ascending/descending from pyro config

Ascending and descending don't add any functionality and can confuse
people. Clears pyro configuration value when ascending or descending were
selected in the configuration so that the user knows to reset the
channel from scratch.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltoslib: Clarify terms in Mega pyro config
Keith Packard [Mon, 23 Apr 2018 03:01:01 +0000 (20:01 -0700)]
altoslib: Clarify terms in Mega pyro config

Suggestions from Bob Brown et al

Speed -> ascent rate
Height -> height above ground
Acceleration -> Vertical acceleration

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoSet version to 1.8.5.1
Keith Packard [Sat, 21 Apr 2018 23:22:16 +0000 (16:22 -0700)]
Set version to 1.8.5.1

Firmware has changed

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/flash-loader: On STM, don't include ao_usb_disable
Keith Packard [Wed, 16 Jul 2014 05:52:35 +0000 (22:52 -0700)]
altos/flash-loader: On STM, don't include ao_usb_disable

This saves a bit of space, keeping the flash loader under 4k on fox

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos: Use max of 64 previous orient values when checking pyro limits
Keith Packard [Sat, 21 Apr 2018 23:17:26 +0000 (16:17 -0700)]
altos: Use max of 64 previous orient values when checking pyro limits

Instead of checking just a single measurement to see if the
orientation is outside of the desired limits, use the maximum of 64
previous values to that rapidly changing orientation won't
accidentally enable a pyro channel if sampled at the 'wrong time'.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltos/stm: Simplify ao_usb_write a bit
Keith Packard [Sat, 21 Apr 2018 23:14:39 +0000 (16:14 -0700)]
altos/stm: Simplify ao_usb_write a bit

Remove unnecessary 'offset' param (was always passed zero). This also
makes some code conditional on that value no longer necessary.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agodoc: add release check for altusmetrum-docinfo.xml copyright
Keith Packard [Mon, 16 Apr 2018 16:46:22 +0000 (09:46 -0700)]
doc: add release check for altusmetrum-docinfo.xml copyright

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltosdroid: Attempt to avoid some reported altosdroid crashes
Keith Packard [Mon, 16 Apr 2018 16:45:35 +0000 (09:45 -0700)]
altosdroid: Attempt to avoid some reported altosdroid crashes

Just looking at stack traces, maybe these changes will avoid some problems?

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agomicropeak: Make reported 'max height' value show filtered max height
Keith Packard [Thu, 5 Apr 2018 23:41:20 +0000 (16:41 -0700)]
micropeak: Make reported 'max height' value show filtered max height

MicroPeak tries to filter out bogus pressure data so that the value
reported on the LED is reasonable. We want to report that same value
in the UI, which means replacing the normal mechanism for computing
max height from the time series of height data with the value computed
from the saved minimum pressure value recorded in the device.

Signed-off-by: Keith Packard <keithp@keithp.com>
8 weeks agoadd a warning about Google limiting per-day access until/unless we pay
Bdale Garbee [Mon, 23 Apr 2018 01:00:03 +0000 (19:00 -0600)]
add a warning about Google limiting per-day access until/unless we pay

2 months agoanother second seems to help on the very slow Acer laptop
Bdale Garbee [Sat, 31 Mar 2018 23:44:18 +0000 (17:44 -0600)]
another second seems to help on the very slow Acer laptop

2 months agoaltos: Hack up code for TeleMetrum to make it just a tracker tmgps
Keith Packard [Fri, 23 Mar 2018 23:35:47 +0000 (17:35 -0600)]
altos: Hack up code for TeleMetrum to make it just a tracker

Support for a failed TeleMetrum device that uses just the GPS receiver
and radio to create a TeleGPS-compatible device called 'tmgps'.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoaltos/ao_cc1120: Only call ao_packet_slave_stop when HAS_SLAVE
Keith Packard [Fri, 23 Mar 2018 23:34:23 +0000 (17:34 -0600)]
altos/ao_cc1120: Only call ao_packet_slave_stop when HAS_SLAVE

Don't try to disable packet slave mode when the product doesn't
support packet slave mode.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoadd a paragraph to the intro pointing to the altusmetrum email list
Bdale Garbee [Wed, 21 Mar 2018 00:25:43 +0000 (18:25 -0600)]
add a paragraph to the intro pointing to the altusmetrum email list

3 months agodoc: update copyright year in doc/altusmetrum-docinfo.xml
Bdale Garbee [Sun, 18 Mar 2018 21:42:48 +0000 (15:42 -0600)]
doc: update copyright year in doc/altusmetrum-docinfo.xml

3 months agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Sun, 18 Mar 2018 21:33:44 +0000 (15:33 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos