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.
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
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.
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'.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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'.
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.