fw/altos
7 hours agodoc: add more text to TeleLaunch manual, be less sloppy with dBm assertions master
Bdale Garbee [Tue, 22 Oct 2019 15:30:25 +0000 (09:30 -0600)]
doc: add more text to TeleLaunch manual, be less sloppy with dBm assertions

4 days agoUpdate app to use Material Design Light theme
Mike Beattie [Sun, 13 Oct 2019 07:22:37 +0000 (20:22 +1300)]
Update app to use Material Design Light theme

The Holo theme does weird things these days

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 days agoaltoslib: Don't bother adding FREETTS to CLASSPATH
Keith Packard [Fri, 18 Oct 2019 08:06:55 +0000 (01:06 -0700)]
altoslib: Don't bother adding FREETTS to CLASSPATH

altoslib doesn't use freetts at all

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoaltosdroid: Make altosdroid code more resilient to weird androidisms
Keith Packard [Fri, 18 Oct 2019 08:05:15 +0000 (01:05 -0700)]
altosdroid: Make altosdroid code more resilient to weird androidisms

Sometimes altosdroid was crashing when messing with configuration bits
like selecting different themes. These fixes seem to make that happen
less.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoaltos/test: Get test code working again after restructuring
Keith Packard [Fri, 18 Oct 2019 08:02:51 +0000 (01:02 -0700)]
altos/test: Get test code working again after restructuring

Something changed, the test code wasn't building. Now it does.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 days agoaltos/telefire: Don't arm the box if the local arm switch is off
Keith Packard [Fri, 18 Oct 2019 06:09:47 +0000 (23:09 -0700)]
altos/telefire: Don't arm the box if the local arm switch is off

This skips arming the box when the local arming switch is off. This
keeps the siren and light from going off, and also avoids attempting
to fire the channels in case something else screwy is going on.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoTeleFireEight has simple green LEDs for continuity
Bdale Garbee [Tue, 1 Oct 2019 03:15:56 +0000 (21:15 -0600)]
TeleFireEight has simple green LEDs for continuity

3 weeks agotelegps: Get --graph mode working after recent changes
Keith Packard [Wed, 25 Sep 2019 20:10:36 +0000 (13:10 -0700)]
telegps: Get --graph mode working after recent changes

Was just exiting due to a null pointer exception caused by mis-ordered
setup of the map data. Also using stale API.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltoslib: Don't crash when map flight data is missing
Keith Packard [Wed, 25 Sep 2019 20:09:22 +0000 (13:09 -0700)]
altoslib: Don't crash when map flight data is missing

Just a couple of null pointer checks to allow the map display to come
up even when no data are available.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agodoc: Update for 1.9.1
Keith Packard [Wed, 25 Sep 2019 03:49:56 +0000 (20:49 -0700)]
doc: Update for 1.9.1

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agodoc: Describe new 'show nearest values' in map view
Keith Packard [Wed, 25 Sep 2019 03:50:08 +0000 (20:50 -0700)]
doc: Describe new 'show nearest values' in map view

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Rename 'log' in ao_log_fireone to 'ao_fireone_data'
Keith Packard [Mon, 23 Sep 2019 19:40:19 +0000 (12:40 -0700)]
altos: Rename 'log' in ao_log_fireone to 'ao_fireone_data'

Avoids conflict with global 'log' function

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Switch all main() to return 'int'
Keith Packard [Mon, 23 Sep 2019 19:39:42 +0000 (12:39 -0700)]
altos: Switch all main() to return 'int'

Makes gcc happy

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltosdroid: Update Makefile.am to run gradle-based build
Keith Packard [Thu, 19 Sep 2019 00:38:44 +0000 (17:38 -0700)]
altosdroid: Update Makefile.am to run gradle-based build

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Add missing build files for avr/attiny devices
Keith Packard [Thu, 19 Sep 2019 00:10:14 +0000 (17:10 -0700)]
altos: Add missing build files for avr/attiny devices

These were sitting in my src directory but not in git

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoMerge remote-tracking branch 'mjb/android-build-update'
Keith Packard [Wed, 18 Sep 2019 23:26:44 +0000 (16:26 -0700)]
Merge remote-tracking branch 'mjb/android-build-update'

4 weeks agoUpdate Google Maps API usage.
Mike Beattie [Wed, 18 Sep 2019 22:26:40 +0000 (10:26 +1200)]
Update Google Maps API usage.

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 weeks agoUpdate persistent notification in TelemetryService
Mike Beattie [Wed, 18 Sep 2019 22:25:47 +0000 (10:25 +1200)]
Update persistent notification in TelemetryService

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 weeks agoConvert to AndroidX from support_v4
Mike Beattie [Wed, 18 Sep 2019 22:25:09 +0000 (10:25 +1200)]
Convert to AndroidX from support_v4

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 weeks agoImport cleanup
Mike Beattie [Wed, 18 Sep 2019 22:24:13 +0000 (10:24 +1200)]
Import cleanup

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 weeks agoCommented out duplicate strings
Mike Beattie [Wed, 18 Sep 2019 22:19:11 +0000 (10:19 +1200)]
Commented out duplicate strings

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 weeks agoIndentation cleanup
Mike Beattie [Wed, 18 Sep 2019 22:18:48 +0000 (10:18 +1200)]
Indentation cleanup

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 weeks agoAdd FOREGROUND_SERVICE permission which is now required
Mike Beattie [Wed, 18 Sep 2019 22:17:52 +0000 (10:17 +1200)]
Add FOREGROUND_SERVICE permission which is now required

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 weeks agoRemove versioning data from AndroidManifest.xml.in
Mike Beattie [Wed, 18 Sep 2019 22:17:09 +0000 (10:17 +1200)]
Remove versioning data from AndroidManifest.xml.in

(now in build.gradle)

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 weeks agoClean up duplication in AndroidManifest.xml.in
Mike Beattie [Wed, 18 Sep 2019 22:16:18 +0000 (10:16 +1200)]
Clean up duplication in AndroidManifest.xml.in

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 weeks agobuildinfo data comes from Makedefs now, not Version
Mike Beattie [Wed, 18 Sep 2019 22:12:59 +0000 (10:12 +1200)]
buildinfo data comes from Makedefs now, not Version

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 weeks agoAdd gradle build files
Mike Beattie [Wed, 18 Sep 2019 22:12:30 +0000 (10:12 +1200)]
Add gradle build files

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 weeks agoUpdate files that reference new paths
Mike Beattie [Wed, 18 Sep 2019 22:09:26 +0000 (10:09 +1200)]
Update files that reference new paths

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 weeks agoMove java source, and resources to new paths for gradle
Mike Beattie [Wed, 18 Sep 2019 22:04:58 +0000 (10:04 +1200)]
Move java source, and resources to new paths for gradle

Signed-off-by: Mike Beattie <mike@ethernal.org>
4 weeks agoRemove ant build files
Mike Beattie [Wed, 18 Sep 2019 21:58:06 +0000 (09:58 +1200)]
Remove ant build files

Signed-off-by: Mike Beattie <mike@ethernal.org>
5 weeks agoaltos: Add EasyMega v3.0 bits (not setup correctly yet)
Keith Packard [Mon, 16 Sep 2019 20:12:08 +0000 (13:12 -0700)]
altos: Add EasyMega v3.0 bits (not setup correctly yet)

This adds a new directory for EasyMega v3.0, replacing the mpu9250
with a bmx160.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agoaltos: Integrate BMX160 into data code
Keith Packard [Mon, 16 Sep 2019 20:10:09 +0000 (13:10 -0700)]
altos: Integrate BMX160 into data code

Get conversion functions written and fix up a few warnings

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agoaltos: Add bmx160 driver
Keith Packard [Mon, 16 Sep 2019 19:39:09 +0000 (12:39 -0700)]
altos: Add bmx160 driver

This just adds the driver, it doesn't hook it up yet

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agoaltos: Replace ao_xmem functions with direct mem calls
Keith Packard [Mon, 16 Sep 2019 00:09:26 +0000 (17:09 -0700)]
altos: Replace ao_xmem functions with direct mem calls

We no longer need to wrap these functions

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agodrivers: Use 'main_value' instead of 'main'
Keith Packard [Mon, 16 Sep 2019 00:05:59 +0000 (17:05 -0700)]
drivers: Use 'main_value' instead of 'main'

GCC can emit a warning when programs redefine 'main'.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltosui: Add speed and gps height to map display data
Keith Packard [Mon, 2 Sep 2019 20:20:14 +0000 (15:20 -0500)]
altosui: Add speed and gps height to map display data

And generalize the API so that any other GPS data could be added in
the future.

This feature was proposed by Mike Beattie

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoaltosui: Display data for point nearest cursor in map view
Keith Packard [Sun, 1 Sep 2019 04:20:31 +0000 (23:20 -0500)]
altosui: Display data for point nearest cursor in map view

Include time, lat and lon

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agolibaltos: gitignore btletest
Keith Packard [Thu, 29 Aug 2019 03:40:21 +0000 (22:40 -0500)]
libaltos: gitignore btletest

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoAdd .gitignore files for new projects
Keith Packard [Thu, 29 Aug 2019 03:39:25 +0000 (22:39 -0500)]
Add .gitignore files for new projects

EasyMega v2.0
TeleFireEight v2.0
TeleFireOne v1.0
TeleLco v0.2 with cc1200 radio

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoicon: Ignore generated LED images
Keith Packard [Thu, 29 Aug 2019 03:34:53 +0000 (22:34 -0500)]
icon: Ignore generated LED images

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoAdd new altosdroid icon
Keith Packard [Thu, 29 Aug 2019 03:33:35 +0000 (22:33 -0500)]
Add new altosdroid icon

Remove drop shadow
Change size to make Google happier

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoaltos: Use fast timer for buttons instead of edge-triggered ISR
Keith Packard [Tue, 13 Aug 2019 00:30:48 +0000 (17:30 -0700)]
altos: Use fast timer for buttons instead of edge-triggered ISR

If the button bounces between the triggering interrupt and the button
state check, we could lose the final state change of the button and
send an incorrect event to the application. In the worst case, the button
would end up in exactly the wrong state, toggling in the wrong direction.

Use the fast timer to poll all buttons instead so that there is only
one check of each button at each poll interval (instead of the
interrupt and the state check). This makes buttons reliably debounced.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoaltosui: Make it possible to disable APRS
Keith Packard [Mon, 5 Aug 2019 04:12:29 +0000 (21:12 -0700)]
altosui: Make it possible to disable APRS

The menu says "Disabled", but the device wants "0". Translate back and
forth to avoid an error.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoaltosui: Fix path to easymini-v2.0 ihx file
Keith Packard [Mon, 5 Aug 2019 03:33:21 +0000 (20:33 -0700)]
altosui: Fix path to easymini-v2.0 ihx file

This gets the bits included in macosx and linux builds

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoaltosdroid: Hack up build to 'work' for now
Keith Packard [Tue, 16 Jul 2019 18:15:20 +0000 (11:15 -0700)]
altosdroid: Hack up build to 'work' for now

Android apps are now build with gradle instead of ant; the ant bits
are stale and only work with old java. Use old java to run ant while
using the current java compiler to build things.

This requires a custom version of the google play API library.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoao-bringup: add a turnon_telefireeight script
Bdale Garbee [Fri, 2 Aug 2019 20:20:39 +0000 (14:20 -0600)]
ao-bringup: add a turnon_telefireeight script

3 months agoUse discovered java path for compiler and jni include files
Keith Packard [Wed, 17 Jul 2019 18:40:06 +0000 (11:40 -0700)]
Use discovered java path for compiler and jni include files

Instead of using the discovered java bits just for jni.h, also use
javac from that directory. Add JAVA_VERSION param to set language
version for newer compilers.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltoslib: Stop using deprecated Java functionality
Keith Packard [Wed, 17 Jul 2019 18:38:43 +0000 (11:38 -0700)]
altoslib: Stop using deprecated Java functionality

new Double(x) -> Double.valueOf(x)
c.newInstance() -> c.getDeclaredConstructor().newInstance()

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoao-tools/ao-eeprom: Add support for TeleFireTwo
Keith Packard [Tue, 16 Jul 2019 19:08:33 +0000 (12:08 -0700)]
ao-tools/ao-eeprom: Add support for TeleFireTwo

Display converted pressure and thrust data along with raw thermistor
data.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos: Record all failed sensors and report status at power up
Keith Packard [Tue, 16 Jul 2019 18:12:49 +0000 (11:12 -0700)]
altos: Record all failed sensors and report status at power up

Use DATA bits to mark which sensors have failed, then report that in
beeps at startup time to help diagnose hardware failures while still
allowing the board to be used over USB.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/micropeak-v2.0: Reduce power usage
Keith Packard [Tue, 16 Jul 2019 18:10:36 +0000 (11:10 -0700)]
altos/micropeak-v2.0: Reduce power usage

This gets power consumption down under 1mA on the pad. Not really low
enough to sell, but I think this is about as low as the chip will go.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/stmf0: Allow SPI to be powered down when idle if desired
Keith Packard [Tue, 16 Jul 2019 18:07:27 +0000 (11:07 -0700)]
altos/stmf0: Allow SPI to be powered down when idle if desired

Set SPI_1_POWER_MANAGE and/or SPI_2_POWER_MANAGE to have the spi
blocks powered down when not in use.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/stmf0: Add 'ao_serial_shutdown'
Keith Packard [Tue, 16 Jul 2019 18:04:16 +0000 (11:04 -0700)]
altos/stmf0: Add 'ao_serial_shutdown'

This powers down the UART logic on request.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos/stmf0: Leave power interface disabled until needed
Keith Packard [Tue, 16 Jul 2019 18:02:56 +0000 (11:02 -0700)]
altos/stmf0: Leave power interface disabled until needed

We only need the power interface when placing the chip in the lowest
power state, so don't power up the power interface clock at startup,
instead wait until later.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoicon: Add altosdroid-specific icon
Keith Packard [Tue, 16 Jul 2019 17:23:54 +0000 (10:23 -0700)]
icon: Add altosdroid-specific icon

Google style guides have no drop shadows anymore, so create an icon
for the play store without one.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltosuilib: Don't crash when flashing an unknown device
Keith Packard [Tue, 16 Jul 2019 17:22:02 +0000 (10:22 -0700)]
altosuilib: Don't crash when flashing an unknown device

An unknown device will not have a config; check for that before
showing radio calibration dialogs.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoao-tools/ao-eeprom: Add altitude data for baro values
Keith Packard [Tue, 16 Jul 2019 16:57:24 +0000 (09:57 -0700)]
ao-tools/ao-eeprom: Add altitude data for baro values

Displays altitude along with pressure and temp for baro sensor data.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoao-tools/lib: Add atmosphere model
Keith Packard [Tue, 16 Jul 2019 16:56:39 +0000 (09:56 -0700)]
ao-tools/lib: Add atmosphere model

Converts between pressure and altitude

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoao-tools/ao-telem: Fix man page and usage to match code
Keith Packard [Mon, 15 Jul 2019 20:28:11 +0000 (13:28 -0700)]
ao-tools/ao-telem: Fix man page and usage to match code

ao-telem just parses .telem files.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltos: Allow ms5607 driver to either set ao_sensor_errors or panic
Keith Packard [Mon, 15 Jul 2019 20:26:30 +0000 (13:26 -0700)]
altos: Allow ms5607 driver to either set ao_sensor_errors or panic

Products that want to remain usable (over USB) after a sensor failure
don't want to panic when the ms5607 fails, but products with limited
ROM space don't want to have extra code to check for the sensor
failure and panic. Change the MS5607 driver to allow either option,
and then make the micropeak based devices use it.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoao-tools: Change ao-eeprom into eeprom analysis tool
Keith Packard [Mon, 15 Jul 2019 20:22:15 +0000 (13:22 -0700)]
ao-tools: Change ao-eeprom into eeprom analysis tool

ao-eeprom used to be a TeleMetrum v0.2 specific tool for fetching
eeprom contents from that device. ao-dumpflash handles that case now.

ao-eeprom now parses .eeprom files and displays their contents.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/micropeak-v2: Update .gitignore
Keith Packard [Wed, 19 Jun 2019 06:18:19 +0000 (23:18 -0700)]
altos/micropeak-v2: Update .gitignore

Ignore built stuff

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/micropeak-v2: Correct AO_LOG_ID value
Keith Packard [Wed, 19 Jun 2019 06:17:10 +0000 (23:17 -0700)]
altos/micropeak-v2: Correct AO_LOG_ID value

Typo wasn't caught by the compiler (thanks!)

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/micropeak-v2: Erase log space at end of BOOST_DELAY
Keith Packard [Wed, 19 Jun 2019 06:16:12 +0000 (23:16 -0700)]
altos/micropeak-v2: Erase log space at end of BOOST_DELAY

We have to erase the log before the flight starts, so this seems like
the latest possible moment.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos: Don't dump MS5607 eeprom in 'B' command
Keith Packard [Wed, 19 Jun 2019 06:14:54 +0000 (23:14 -0700)]
altos: Don't dump MS5607 eeprom in 'B' command

MicroPeak v2 now has config stuff where these values get shown

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltoslib: Add support for MicroPeak v2 eeprom format
Keith Packard [Wed, 19 Jun 2019 06:14:05 +0000 (23:14 -0700)]
altoslib: Add support for MicroPeak v2 eeprom format

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/micropeak-v2.0: expose log and config commands over USB
Keith Packard [Tue, 18 Jun 2019 21:50:53 +0000 (14:50 -0700)]
altos/micropeak-v2.0: expose log and config commands over USB

This lets AltosUI handle the eeprom data

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltosui/telegps: Display error message when attempting to graph unknown files
Keith Packard [Tue, 18 Jun 2019 21:50:18 +0000 (14:50 -0700)]
altosui/telegps: Display error message when attempting to graph unknown files

Instead of presenting an empty graph window.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltoslib: Always create an ordered record set for eeprom files
Keith Packard [Tue, 18 Jun 2019 21:25:09 +0000 (14:25 -0700)]
altoslib: Always create an ordered record set for eeprom files

If we can't parse the format, just leave it empty. This makes code
handling arbitrary records much easier as it doesn't have to check for
the ordered set existing.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/micropeak-v2.0: Go into standby mode after landing
Keith Packard [Tue, 18 Jun 2019 20:02:51 +0000 (13:02 -0700)]
altos/micropeak-v2.0: Go into standby mode after landing

This is the lowest power state we can reach, and consumes about 15µA
or less.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/micropeak-v2.0: Fix LED blinking sequence at power-on
Keith Packard [Tue, 18 Jun 2019 20:02:12 +0000 (13:02 -0700)]
altos/micropeak-v2.0: Fix LED blinking sequence at power-on

'pips' happens between altitude report and data dump.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/micropeak-v2.0: Wait for the power supply to stabilize before measuring
Keith Packard [Tue, 18 Jun 2019 07:11:49 +0000 (00:11 -0700)]
altos/micropeak-v2.0: Wait for the power supply to stabilize before measuring

If we don't wait before measuring the battery, it will often read
under 3.2V right at boot time, which puts MicroPeak in flight mode
instead of USB mode.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/micropeak-v2.0: Don't run flight code when plugged in
Keith Packard [Tue, 18 Jun 2019 06:44:50 +0000 (23:44 -0700)]
altos/micropeak-v2.0: Don't run flight code when plugged in

No sense running the flight code when there's a USB cable attached.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos: Support ao_ms5607_dump when no ms5607 task
Keith Packard [Tue, 18 Jun 2019 06:43:02 +0000 (23:43 -0700)]
altos: Support ao_ms5607_dump when no ms5607 task

MicroPeak v2.0 has tasking support, but doesn't have a separate ms5607
task. That means the device isn't getting initialized when not running
the flight code, so in cmd mode we need to make sure it's initialized,
and we also need to actually fetch a value to display.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agodoc: Say 'thousands of feet' instead of '3000-4000 feet'
Keith Packard [Tue, 18 Jun 2019 06:41:51 +0000 (23:41 -0700)]
doc: Say 'thousands of feet' instead of '3000-4000 feet'

No reason to try and be precise here.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltosui: Ship EasyMini v2.0 firwmare
Keith Packard [Mon, 17 Jun 2019 21:49:36 +0000 (14:49 -0700)]
altosui: Ship EasyMini v2.0 firwmare

Left this out in the last release...

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agodoc: Describe what sunlight does to MicroPeak and how to protect it
Keith Packard [Mon, 17 Jun 2019 21:47:56 +0000 (14:47 -0700)]
doc: Describe what sunlight does to MicroPeak and how to protect it

Show flight data from micropeak in sunlight, a picture of foam
installed on micropeak and the resulting data.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoadd an explicit reference to Poron open-cell foam in Appendix A
Bdale Garbee [Wed, 5 Jun 2019 16:46:57 +0000 (10:46 -0600)]
add an explicit reference to Poron open-cell foam in Appendix A

5 months agoaltos: Directly compute radio tuning values from frequency
Keith Packard [Sat, 4 May 2019 04:51:28 +0000 (21:51 -0700)]
altos: Directly compute radio tuning values from frequency

The 8051 compiler doesn't support 64-bit ints, so the old
code used an iterative method in 32-bit values. That could take
a long time when the frequency was mis-entered in Hz or MHz instead of
kHz.

This direct-computation uses 64-bit ints, but takes a fixed amount of
time for any inputs.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 months agoAdd TeleStatic-v3.0 makefiles
Keith Packard [Tue, 23 Apr 2019 13:45:54 +0000 (06:45 -0700)]
Add TeleStatic-v3.0 makefiles

6 months agoaltos: Add preliminary TeleStatic v3.0 code
Keith Packard [Mon, 22 Apr 2019 01:30:43 +0000 (18:30 -0700)]
altos: Add preliminary TeleStatic v3.0 code

This adds the pin definitions and all of the code except for the
ads131a04 driver.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 months agoaltos/telefireone-v2.0: Include MAX6691 data in ring
Keith Packard [Mon, 22 Apr 2019 01:19:59 +0000 (18:19 -0700)]
altos/telefireone-v2.0: Include MAX6691 data in ring

Define HAS_MAX6691 which tells the data code to pull the MAX6691 data
into the data ring for logging etc.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 months agoaltos: Change MAX6691 driver to run its own thread
Keith Packard [Mon, 22 Apr 2019 01:18:55 +0000 (18:18 -0700)]
altos: Change MAX6691 driver to run its own thread

This just captures temp data continuously; it takes 100ms to get the
temp data from the sensor, so the maximum rate is around 10 samples/sec.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 months agoaltos: Add MAX6691 and ADS131A0X data to ring if present
Keith Packard [Mon, 22 Apr 2019 01:14:05 +0000 (18:14 -0700)]
altos: Add MAX6691 and ADS131A0X data to ring if present

Add these two devices as potential data sources to be added into the
ring if available.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 months agoaltos/telefireone-v2.0: Definitions needed for MAX6691 driver
Keith Packard [Sun, 21 Apr 2019 23:53:51 +0000 (16:53 -0700)]
altos/telefireone-v2.0: Definitions needed for MAX6691 driver

Fix the DMA channel definition (STM starts values at 1 for unknown reasons).
Add definition of the power enable bit for the timer.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 months agoaltos: get ao_max6691 driver working
Keith Packard [Sun, 21 Apr 2019 23:49:19 +0000 (16:49 -0700)]
altos: get ao_max6691 driver working

The driver uses a timer connected to a DMA engine to measure pulse
widths from the chip. We get 11 pulses for 4 channels; the first pulse
is caused by the timer starting up, the next two are the marker pulse
and then 8 more indicating the end of the high and low periods for
each channel.

The driver API returns the 8 pulse widths; the caller is expected to
know what to do with those values as using them requires knowing the
value of the configuration resistor and the characteristics of the
thermistors.

The test code assumes a 1k configuration resistor, using that it computes
the resistance of the four thermistors.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 months agoaltos: Work on MAX6691 driver
Keith Packard [Fri, 12 Apr 2019 06:54:37 +0000 (23:54 -0700)]
altos: Work on MAX6691 driver

6 months agoaltos/lambdakey-v1.0: Fix obvious build errors
Keith Packard [Sun, 21 Apr 2019 19:55:20 +0000 (12:55 -0700)]
altos/lambdakey-v1.0: Fix obvious build errors

The code is too large to run on this device at this point, but at least
it doesn't fail to compile?

Signed-off-by: Keith Packard <keithp@keithp.com>
6 months agoaltoslib: Correct monitor idle IMU data for EasyMega v2
Keith Packard [Fri, 19 Apr 2019 02:48:00 +0000 (19:48 -0700)]
altoslib: Correct monitor idle IMU data for EasyMega v2

The IMU on EasyMega v2 is rotated from the other devices using this sensor.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 months agoaltoslib: Fetch correct mag along data for EasyMega v2
Keith Packard [Fri, 19 Apr 2019 02:46:24 +0000 (19:46 -0700)]
altoslib: Fetch correct mag along data for EasyMega v2

Was using the wrong axis (y) instead of the correct one (x)

Signed-off-by: Keith Packard <keithp@keithp.com>
6 months agoaltos: Use ao_data_accel_invert when changing orientation value
Keith Packard [Thu, 18 Apr 2019 21:42:15 +0000 (14:42 -0700)]
altos: Use ao_data_accel_invert when changing orientation value

Instead of using AO_ACCEL_INVERT, use the macro which flips the values
around. This fixes a bug with ADXL375 flight computers (EasyMega v2.0) where the
accel cal values would be scrambled when changing orientation.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 months agodoc: Make sure all 'code' examples are in DejaVu Sans Mono
Keith Packard [Thu, 18 Apr 2019 21:32:48 +0000 (14:32 -0700)]
doc: Make sure all 'code' examples are in DejaVu Sans Mono

We were inheriting the default value for this setting, which was Courier

Signed-off-by: Keith Packard <keithp@keithp.com>
6 months agodoc: Document LEDs on TeleGPS devices
Keith Packard [Fri, 29 Mar 2019 05:29:21 +0000 (22:29 -0700)]
doc: Document LEDs on TeleGPS devices

V1 has just the battery charger. V2 adds the GPS lock indicator.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 months agoaltos/stm32f4-disco: Remove scheme
Keith Packard [Tue, 19 Mar 2019 00:21:57 +0000 (17:21 -0700)]
altos/stm32f4-disco: Remove scheme

This demo doesn't need a lisp interpreter

Signed-off-by: Keith Packard <keithp@keithp.com>
7 months agoaltos/stm32f4: Working on USB
Keith Packard [Tue, 19 Mar 2019 00:20:52 +0000 (17:20 -0700)]
altos/stm32f4: Working on USB

Reset now works, still no packets

Signed-off-by: Keith Packard <keithp@keithp.com>
7 months agoaltos/stm32f4: Wrong value for CK48MSEL_PLL_Q
Keith Packard [Tue, 19 Mar 2019 00:20:14 +0000 (17:20 -0700)]
altos/stm32f4: Wrong value for CK48MSEL_PLL_Q

This meant that the USB clock wasn't actually getting started...

Signed-off-by: Keith Packard <keithp@keithp.com>
7 months agoaltos/stm32f4: Need to read-back register after clock enable
Keith Packard [Tue, 19 Mar 2019 00:17:21 +0000 (17:17 -0700)]
altos/stm32f4: Need to read-back register after clock enable

This was reported as necessary; I have no idea, but it's not
expensive, so why not...

Signed-off-by: Keith Packard <keithp@keithp.com>
7 months agoaltos/stm32f4: Add -mfloat-abi=hard compile option
Keith Packard [Tue, 19 Mar 2019 00:16:16 +0000 (17:16 -0700)]
altos/stm32f4: Add -mfloat-abi=hard compile option

Signed-off-by: Keith Packard <keithp@keithp.com>
7 months agoaltos: ARM ABI requires 8-byte aligned stack
Keith Packard [Tue, 19 Mar 2019 00:15:16 +0000 (17:15 -0700)]
altos: ARM ABI requires 8-byte aligned stack

This makes doubles on the stack (as for var-args functions) work

Signed-off-by: Keith Packard <keithp@keithp.com>
7 months agoaltos/drivers/ao_led.c: Declare LED port as void * to allow any SoC to use this code
Keith Packard [Tue, 12 Mar 2019 11:58:20 +0000 (12:58 +0100)]
altos/drivers/ao_led.c: Declare LED port as void * to allow any SoC to use this code

The generic LED code needs a generic type for the GPIO port.

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