fw/altos
3 days agoVersion 1.9.10.1 master
Keith Packard [Sat, 16 Oct 2021 23:27:52 +0000 (16:27 -0700)]
Version 1.9.10.1

AltosDroid fixes (rotation, crash in maps stuff)

Signed-off-by: Keith Packard <keithp@keithp.com>
3 days agoaltosdroid: Fix tab updates on Android 11 after rotate
Keith Packard [Sat, 16 Oct 2021 22:48:22 +0000 (15:48 -0700)]
altosdroid: Fix tab updates on Android 11 after rotate

Android 11 appears to have "optimized" application rotation by
regenerating fragments automatically. This means the tab fragments
aren't getting created by TabsAdapter.getItem, so that code didn't
know about them, which caused it to not know which tab was active so
all of the application state wasn't getting updated in the tabs after
rotation.

Fix this by telling TabsAdapter about fragments that are already
created -- altosdroid hears about them in the registerTab hook.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 days agoaltosdroid: Skip map draw before transform is set
Keith Packard [Mon, 11 Oct 2021 06:01:18 +0000 (23:01 -0700)]
altosdroid: Skip map draw before transform is set

A crash report indicates that this can happen.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 days agofix version in 1.9.10 release notes
Bdale Garbee [Mon, 11 Oct 2021 04:21:49 +0000 (22:21 -0600)]
fix version in 1.9.10 release notes

9 days agoVersion 1.9.10
Keith Packard [Sun, 10 Oct 2021 16:57:45 +0000 (09:57 -0700)]
Version 1.9.10

Signed-off-by: Keith Packard <keithp@keithp.com>
9 days agoaltos/telemega-v5.0: Add .gitignore
Keith Packard [Sun, 10 Oct 2021 16:49:49 +0000 (09:49 -0700)]
altos/telemega-v5.0: Add .gitignore

Signed-off-by: Keith Packard <keithp@keithp.com>
9 days agodoc: Version 1.9.10 notes
Keith Packard [Sun, 10 Oct 2021 16:47:52 +0000 (09:47 -0700)]
doc: Version 1.9.10 notes

Signed-off-by: Keith Packard <keithp@keithp.com>
10 days agoaltosdroid: Catch log file open failures and show an error dialog
Keith Packard [Sun, 10 Oct 2021 04:32:17 +0000 (21:32 -0700)]
altosdroid: Catch log file open failures and show an error dialog

Android changed which directories we can write to once, let's hope it
doesn't happen again.

Signed-off-by: Keith Packard <keithp@keithp.com>
10 days agoaltoslib: Add callback from AltosLog on file open failure
Keith Packard [Sun, 10 Oct 2021 04:31:24 +0000 (21:31 -0700)]
altoslib: Add callback from AltosLog on file open failure

This lets the UI tell the user that logging isn't working.

Signed-off-by: Keith Packard <keithp@keithp.com>
10 days agoaltosdroid: Switch storage to media dir
Keith Packard [Sun, 10 Oct 2021 03:58:26 +0000 (20:58 -0700)]
altosdroid: Switch storage to media dir

Even with the WRITE_EXTERNAL_STORAGE permission, we appear to no
longer have permission to write to a random external storage
dir. Instead, we only have permission to write to an app-specific dir,
buried deep in the directory tree. We can get that directory name with
getExternalMediaDirs()[0].

Signed-off-by: Keith Packard <keithp@keithp.com>
11 days agoVersion 1.9.9.1
Keith Packard [Sat, 9 Oct 2021 01:31:35 +0000 (18:31 -0700)]
Version 1.9.9.1

Signed-off-by: Keith Packard <keithp@keithp.com>
12 days agolibaltos: Use original windows printf/scanf
Keith Packard [Fri, 8 Oct 2021 05:45:37 +0000 (22:45 -0700)]
libaltos: Use original windows printf/scanf

mingw now uses "improved" versions of printf/scanf, which may cause
trouble with some windows 10 installs. Just use the old versions.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 days agolibaltos: Make windows dlls reproducible
Keith Packard [Thu, 7 Oct 2021 05:58:09 +0000 (22:58 -0700)]
libaltos: Make windows dlls reproducible

Use SOURCE_DATE_EPOCH=0 to ensure these dlls are
reproducible.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 days agolibaltos: don't carry pre-built .dll files in the repo any more
Bdale Garbee [Thu, 7 Oct 2021 05:53:28 +0000 (23:53 -0600)]
libaltos: don't carry pre-built .dll files in the repo any more

13 days agoVersion 1.9.9
Keith Packard [Thu, 7 Oct 2021 04:13:38 +0000 (21:13 -0700)]
Version 1.9.9

Signed-off-by: Keith Packard <keithp@keithp.com>
2 weeks ago1.9.9 release notes
Keith Packard [Fri, 24 Sep 2021 16:44:56 +0000 (09:44 -0700)]
1.9.9 release notes

Signed-off-by: Keith Packard <keithp@keithp.com>
2 weeks agoaltos: Measure mmc5983 offset
Keith Packard [Wed, 29 Sep 2021 17:24:02 +0000 (10:24 -0700)]
altos: Measure mmc5983 offset

This improves mmc5983 accuracy by using the SET/RESET mechanism which
flips the orientation of the mag sensor to cal-out any sensor bias.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 weeks agoaltoslib: Parse TeleMega v5.0 eeprom records
Keith Packard [Wed, 29 Sep 2021 17:22:13 +0000 (10:22 -0700)]
altoslib: Parse TeleMega v5.0 eeprom records

Oops. Missed one spot in adding TeleMega v5.0

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltos: Fix config upgrade from 1.24 to 1.25
Keith Packard [Fri, 24 Sep 2021 16:43:15 +0000 (09:43 -0700)]
altos: Fix config upgrade from 1.24 to 1.25

Alignment of pyro field changed due to increased size of fields which
shifted the whole struct by two bytes, leading to mis-updating the struct.
Fix that by creating a mirror of the ao_config type for version 1.24 and
then using that to fetch the old data.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoRemind us to update ANDROID_VERSION
Keith Packard [Tue, 21 Sep 2021 03:24:13 +0000 (20:24 -0700)]
Remind us to update ANDROID_VERSION

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agoaltosdroid: Set android version to 30
Keith Packard [Tue, 21 Sep 2021 03:23:10 +0000 (20:23 -0700)]
altosdroid: Set android version to 30

Need to change this for each release we do

Signed-off-by: Keith Packard <keithp@keithp.com>
3 weeks agosnapshot TeleMega v4 turnon and test scripts before crafting v5 versions
Bdale Garbee [Tue, 21 Sep 2021 00:17:49 +0000 (18:17 -0600)]
snapshot TeleMega v4 turnon and test scripts before crafting v5 versions

3 weeks agoupdate TeleMega bench scripts for v5.0 hardware
Bdale Garbee [Tue, 21 Sep 2021 00:22:55 +0000 (18:22 -0600)]
update TeleMega bench scripts for v5.0 hardware

4 weeks agocapture updates to Releasing from 1.9.8 release
Bdale Garbee [Tue, 21 Sep 2021 04:06:30 +0000 (22:06 -0600)]
capture updates to Releasing from 1.9.8 release

4 weeks agoVersion 1.9.8
Keith Packard [Tue, 21 Sep 2021 02:56:45 +0000 (19:56 -0700)]
Version 1.9.8

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agodoc: Update for 1.9.8
Keith Packard [Tue, 21 Sep 2021 02:54:36 +0000 (19:54 -0700)]
doc: Update for 1.9.8

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agodoc: Add specs for TeleMega v5.0
Keith Packard [Tue, 21 Sep 2021 02:52:35 +0000 (19:52 -0700)]
doc: Add specs for TeleMega v5.0

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agodoc: Note pyro channel time limits on <1.9.8 firmware
Keith Packard [Tue, 21 Sep 2021 02:49:49 +0000 (19:49 -0700)]
doc: Note pyro channel time limits on <1.9.8 firmware

16-bit delay values instead of 32-bit

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agolibaltos: Ignore cjnitest files for all targets
Keith Packard [Tue, 21 Sep 2021 02:59:45 +0000 (19:59 -0700)]
libaltos: Ignore cjnitest files for all targets

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltoslib: Document how to add a new product
Keith Packard [Tue, 21 Sep 2021 02:58:30 +0000 (19:58 -0700)]
altoslib: Document how to add a new product

Avoid missing some steps

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoAdd test-easymini-v1.0 script
Keith Packard [Tue, 21 Sep 2021 00:17:06 +0000 (17:17 -0700)]
Add test-easymini-v1.0 script

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: All beep-enabled boards have beep config
Keith Packard [Mon, 20 Sep 2021 23:28:37 +0000 (16:28 -0700)]
altos: All beep-enabled boards have beep config

HAS_BEEP_CONFIG is no longer used, switch to HAS_BEEP

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Deal with cc1201 limitations
Keith Packard [Mon, 20 Sep 2021 04:04:41 +0000 (21:04 -0700)]
altos: Deal with cc1201 limitations

The CC1201 works fine at higher data rates, but at lower rates it
can't crank the RX bandwidth as tight as the CC1200. Deal with this by
checking the part number and using the correct settings for each one
when running at 9600 or 2400 baud.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoBump version to 1.9.7.1
Keith Packard [Mon, 20 Sep 2021 00:09:11 +0000 (17:09 -0700)]
Bump version to 1.9.7.1

Preliminary release for TeleMega v5.0

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agolibaltos: Update windows DLLs
Keith Packard [Mon, 20 Sep 2021 02:12:42 +0000 (19:12 -0700)]
libaltos: Update windows DLLs

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltosdroid: Add tilt angle to pad and flight tabs
Keith Packard [Mon, 20 Sep 2021 02:01:34 +0000 (19:01 -0700)]
altosdroid: Add tilt angle to pad and flight tabs

Useful for monitoring attitude

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoAdd TeleMega v5.0 firmware
Keith Packard [Sun, 19 Sep 2021 23:50:18 +0000 (16:50 -0700)]
Add TeleMega v5.0 firmware

Followed steps in Releasing.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Build TeleMega v5.0 bits
Keith Packard [Sun, 19 Sep 2021 23:30:51 +0000 (16:30 -0700)]
altos: Build TeleMega v5.0 bits

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos/telemega-v5.0: Space tones closer together
Keith Packard [Sun, 19 Sep 2021 23:30:08 +0000 (16:30 -0700)]
altos/telemega-v5.0: Space tones closer together

TeleMega beeper needs tones fairly closely spaced to
keep them in range.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Allow beep tone spacing to be changed
Keith Packard [Sun, 19 Sep 2021 23:29:33 +0000 (16:29 -0700)]
altos: Allow beep tone spacing to be changed

New beeper needs closer spaced tones

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Fix up HAS_FLIGHT_DEBUG
Keith Packard [Sun, 19 Sep 2021 23:28:22 +0000 (16:28 -0700)]
altos: Fix up HAS_FLIGHT_DEBUG

Some printf formats weren't right.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltosui: Add options for low frequency beeper
Keith Packard [Sun, 19 Sep 2021 21:56:51 +0000 (14:56 -0700)]
altosui: Add options for low frequency beeper

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltoslib: Support TeleMega v5.0
Keith Packard [Sun, 19 Sep 2021 21:56:16 +0000 (14:56 -0700)]
altoslib: Support TeleMega v5.0

Add normalized data support
Add telemega idle monitor and telemetry packet support.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Update telemega-v5.0 config
Keith Packard [Sun, 19 Sep 2021 21:54:16 +0000 (14:54 -0700)]
altos: Update telemega-v5.0 config

Fix cc120x interrupt pin.
Enable normalized data.
Select 2100Hz beeper default.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Add normalized telemetry support
Keith Packard [Sun, 19 Sep 2021 21:53:47 +0000 (14:53 -0700)]
altos: Add normalized telemetry support

Just like logs

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Support normalized log
Keith Packard [Sun, 19 Sep 2021 21:53:02 +0000 (14:53 -0700)]
altos: Support normalized log

Write log data with standard axes instead of device-specific ones.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Allow devices to override default beep
Keith Packard [Sun, 19 Sep 2021 21:52:13 +0000 (14:52 -0700)]
altos: Allow devices to override default beep

New beeper will want new default.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Support normalized axes in mpu6000 and mmc5983
Keith Packard [Sun, 19 Sep 2021 21:50:28 +0000 (14:50 -0700)]
altos: Support normalized axes in mpu6000 and mmc5983

For monitor idle, devices selecting 'normalized' log format also
get 'normalized' command mode. This reports data in a standard format,
along/across/through instead of raw device axes which depend on how the
part is mounted.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Detect CC120X device type
Keith Packard [Sun, 19 Sep 2021 21:48:50 +0000 (14:48 -0700)]
altos: Detect CC120X device type

Not that it has any effect on the driver, but maybe it should?

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos/telemega-v5.0: Fix config for MMC5983
Keith Packard [Sun, 19 Sep 2021 05:45:33 +0000 (22:45 -0700)]
altos/telemega-v5.0: Fix config for MMC5983

SPI mode 3

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos/stm: Minor cleanups in ao_arch_funcs.h
Keith Packard [Sun, 19 Sep 2021 05:44:19 +0000 (22:44 -0700)]
altos/stm: Minor cleanups in ao_arch_funcs.h

Fix ao_gpio_set_output_mode to actually work again.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Get MMC5983 driver working
Keith Packard [Sun, 19 Sep 2021 05:43:34 +0000 (22:43 -0700)]
altos: Get MMC5983 driver working

SPI ID is different.
Clean up pin settings to avoid transients

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Add bit-bang i2c driver
Keith Packard [Sun, 19 Sep 2021 05:05:32 +0000 (22:05 -0700)]
altos: Add bit-bang i2c driver

Useful for debugging stuff, not useful for flight code as it
burns the CPU for timing.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos/stm: Use picolibc startup code
Keith Packard [Sun, 19 Sep 2021 05:15:50 +0000 (22:15 -0700)]
altos/stm: Use picolibc startup code

Instead of custom bits

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Record MPU6000 failure but let device boot
Keith Packard [Sun, 19 Sep 2021 05:11:11 +0000 (22:11 -0700)]
altos: Record MPU6000 failure but let device boot

Don't panic on MPU6000 failure

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agoaltos: Fix telemega v5.0 CS_FLASH pin
Keith Packard [Fri, 17 Sep 2021 21:24:21 +0000 (14:24 -0700)]
altos: Fix telemega v5.0 CS_FLASH pin

It's on GPIOD 10, not GPIOD 3.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoShow mag sensor SPI ID
Keith Packard [Tue, 7 Sep 2021 14:54:01 +0000 (07:54 -0700)]
Show mag sensor SPI ID

6 weeks agotelemega-v5.0: Add Makefiles
Keith Packard [Tue, 7 Sep 2021 06:07:24 +0000 (23:07 -0700)]
telemega-v5.0: Add Makefiles

Oops

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agoaltos: Prepare for picolibc stdio change
Keith Packard [Wed, 18 Aug 2021 03:04:08 +0000 (20:04 -0700)]
altos: Prepare for picolibc stdio change

Instead of __iob, picolibc will use stdin, stdout and stderr globals.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 weeks agomicropeak: Show error message if USB adapter open fails
Keith Packard [Wed, 18 Aug 2021 03:02:05 +0000 (20:02 -0700)]
micropeak: Show error message if USB adapter open fails

Pop up an error dialog and *don't* show the download dialog as if the
open had worked.

Signed-off-by: Keith Packard <keithp@keithp.com>
7 weeks agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Sat, 28 Aug 2021 19:16:45 +0000 (13:16 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

7 weeks agodoc: add mounting hole spacing information to product outlines
Bdale Garbee [Sat, 28 Aug 2021 19:16:08 +0000 (13:16 -0600)]
doc: add mounting hole spacing information to product outlines

2 months agolibaltos: Add new microchip MAC address to bluetooth map
Keith Packard [Mon, 16 Aug 2021 00:08:44 +0000 (17:08 -0700)]
libaltos: Add new microchip MAC address to bluetooth map

The new batch of BT modules use a new MAC prefix.  On Linux, also add
the RFCOMM channel discovery code in case this happens again. On
windows, suffer.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoaltos: Change MMC5893 driver to avoid interrupts
Keith Packard [Tue, 3 Aug 2021 00:04:20 +0000 (17:04 -0700)]
altos: Change MMC5893 driver to avoid interrupts

Set the chip to sample at 200Hz and then simply read the results at
100Hz to get a reasonably recent sample. This avoids a delay at each
sample interval.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoaltos: Add MMC5983 driver
Keith Packard [Sun, 1 Aug 2021 04:03:15 +0000 (22:03 -0600)]
altos: Add MMC5983 driver

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoaltos: Add preliminary TeleMega v5.0 bits
Keith Packard [Sun, 1 Aug 2021 04:02:42 +0000 (22:02 -0600)]
altos: Add preliminary TeleMega v5.0 bits

Axes not checked yet.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoao-bringup: Use ao-test-igniter voltage check feature in pyro tests
Keith Packard [Tue, 27 Jul 2021 05:13:58 +0000 (22:13 -0700)]
ao-bringup: Use ao-test-igniter voltage check feature in pyro tests

This makes sure all pyro channels are 'in range' during testing to
validate the ADC is operating nominally.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoao-test-igniter: Also test ADC voltage for in-range of 1-4 volts
Keith Packard [Tue, 27 Jul 2021 05:03:04 +0000 (22:03 -0700)]
ao-test-igniter: Also test ADC voltage for in-range of 1-4 volts

This should catch ADC issues, like a solder bridge on the SoC.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoaltos: Fixes for GCC 10 (-fno-common is default)
Keith Packard [Wed, 21 Jul 2021 21:26:35 +0000 (14:26 -0700)]
altos: Fixes for GCC 10 (-fno-common is default)

A couple of duplicate global definitions which GCC 10 flags

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoao-bringup: Revert EasyMini scripts to 1.0
Keith Packard [Wed, 12 May 2021 05:27:27 +0000 (22:27 -0700)]
ao-bringup: Revert EasyMini scripts to 1.0

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agolibaltos: Use cross compilers to build libaltos for i686, amd64, aarch64, armel and...
Keith Packard [Mon, 12 Jul 2021 17:08:05 +0000 (10:08 -0700)]
libaltos: Use cross compilers to build libaltos for i686, amd64, aarch64, armel and armhf

Use current debian packages to build libraries for x86 and arm debian hosts.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoaltosdroid: Show altitude as well as height
Keith Packard [Mon, 12 Jul 2021 17:03:24 +0000 (10:03 -0700)]
altosdroid: Show altitude as well as height

TeleGPS is more useful with altitude

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agodoc: telemini force freq is pin 6, not 7
Keith Packard [Mon, 12 Jul 2021 17:00:30 +0000 (10:00 -0700)]
doc: telemini force freq is pin 6, not 7

Telemini debug connector has only 6 pins

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agokernel: Widen pyro time values to 32 bits
Keith Packard [Tue, 6 Jul 2021 05:52:35 +0000 (22:52 -0700)]
kernel: Widen pyro time values to 32 bits

This lets time values of greater than 327 seconds be used. 99% of this
code is to adjust existing configurations to the new structure, which is
wider than the old.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltosuilib: Remove spurious message about libaltos
Keith Packard [Thu, 24 Jun 2021 04:35:07 +0000 (21:35 -0700)]
altosuilib: Remove spurious message about libaltos

Wait until we've tried all libaltos options before complaining.

Signed-off-by: Keith Packard <keithp@keithp.com>
3 months agoaltosdroid: Work without GPS available
Keith Packard [Mon, 21 Jun 2021 00:06:28 +0000 (17:06 -0700)]
altosdroid: Work without GPS available

On devices without GPS receivers, use network location instead of
crashing.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agodoc: update copyright year assertions
Bdale Garbee [Wed, 9 Jun 2021 04:51:28 +0000 (22:51 -0600)]
doc: update copyright year assertions

4 months agoVersion 1.9.7
Keith Packard [Tue, 13 Apr 2021 01:39:48 +0000 (18:39 -0700)]
Version 1.9.7

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agodoc: Update 1.9.7 release notes
Keith Packard [Wed, 19 May 2021 18:01:16 +0000 (11:01 -0700)]
doc: Update 1.9.7 release notes

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltosdroid: Bump to version 29
Keith Packard [Mon, 7 Jun 2021 23:14:25 +0000 (16:14 -0700)]
altosdroid: Bump to version 29

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltosdroid: Update target API to 29
Keith Packard [Sun, 16 May 2021 03:19:56 +0000 (20:19 -0700)]
altosdroid: Update target API to 29

Required by current Android store

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltosdroid: Revert getResource().getColor to old API
Keith Packard [Wed, 12 May 2021 05:28:32 +0000 (22:28 -0700)]
altosdroid: Revert getResource().getColor to old API

This should keep it compatible with API version 21

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Mon, 7 Jun 2021 23:11:01 +0000 (17:11 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

4 months agoVersion 1.9.6.5
Keith Packard [Sun, 30 May 2021 22:08:25 +0000 (15:08 -0700)]
Version 1.9.6.5

Signed-off-by: Keith Packard <keithp@keithp.com>
5 months agoaltoslib: Protect has_monitor_battery from unset product
Keith Packard [Wed, 19 May 2021 17:52:47 +0000 (10:52 -0700)]
altoslib: Protect has_monitor_battery from unset product

AltosDroid can query has_monitor_battery before the product data has
been set.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 months agoaltosdroid: Don't start bluetooth if address is null
Keith Packard [Wed, 19 May 2021 17:51:44 +0000 (10:51 -0700)]
altosdroid: Don't start bluetooth if address is null

If the address.address string is null, don't bother starting the
bluetooth service.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 months agoaltosdroid: protect USB read/write when connection is null
Keith Packard [Wed, 19 May 2021 17:50:22 +0000 (10:50 -0700)]
altosdroid: protect USB read/write when connection is null

Check to see if connection is valid before attempting to read/write to
it.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 months agoaltosdroid: Synchronize access to the 'rockets' list for online maps
Keith Packard [Wed, 19 May 2021 17:48:58 +0000 (10:48 -0700)]
altosdroid: Synchronize access to the 'rockets' list for online maps

Online maps gets rockets added by the telem code and the same data are
used to create the maps UI. Synchronise access to that object to prevent
simutaneous operations.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 months agoaltosdroid: Safeguard preferences code in case it's called too early
Keith Packard [Wed, 19 May 2021 17:47:37 +0000 (10:47 -0700)]
altosdroid: Safeguard preferences code in case it's called too early

Make sure there's a backend set up before accessing data as it seems
this code can be called before the preferences code is called before
the backend is created.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 months agoaltosdroid: Skip clicks on BT device entries that are too short
Keith Packard [Wed, 19 May 2021 06:26:12 +0000 (23:26 -0700)]
altosdroid: Skip clicks on BT device entries that are too short

Maybe these are some kind of extra object? In any case, nothing that
we care about, so just ignore the click.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 months agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos tirepyro
Bdale Garbee [Wed, 19 May 2021 05:54:48 +0000 (23:54 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

5 months agoaltoslib: Fix accel value flipping for TM v3.0
Keith Packard [Wed, 19 May 2021 05:37:01 +0000 (22:37 -0700)]
altoslib: Fix accel value flipping for TM v3.0

TM v3.0 uses the same log file format value as TM v2.0 but has a
different accelerometer, which requires a different function for
inverting the raw values. Detect v2.0 devices and use the old function
for them while using the new function for all others.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 months agoaltosuilib: Zap all flash when upgrading TeleGPS from pre-1.9.7
Keith Packard [Tue, 18 May 2021 06:09:29 +0000 (23:09 -0700)]
altosuilib: Zap all flash when upgrading TeleGPS from pre-1.9.7

Old versions of TeleGPS firmware would end up spraying log data all
over flash as they mis-computed the place to append new log data.

When the right hardware is detected, a warning dialog will pop up and,
if agreed to, the log storage flash will be completely erased before
the firmware upgrade happens.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 months agoaltos: Simplify discovery of log end position
Keith Packard [Tue, 18 May 2021 05:38:14 +0000 (22:38 -0700)]
altos: Simplify discovery of log end position

Binary search using log block indices rather than byte positions. This
makes the code much easier to understand as there isn't a mystic modulus.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 months agoaltos/telegps-*: Fix log end discovery at startup
Keith Packard [Tue, 18 May 2021 05:33:21 +0000 (22:33 -0700)]
altos/telegps-*: Fix log end discovery at startup

We need to find the first unwritten log block to start appending data,
but the code was actually looking for the first empty 256-byte chunk,
which meant that we'd leave a gap of erased data after the previous
log. AltosUI would stop at that point and not recover the remaining
stored data.

Signed-off-by: Keith Packard <keithp@keithp.com>
5 months agoao-bringup: fix easymotor script to use .bin for dfu-util
Bdale Garbee [Wed, 12 May 2021 06:27:55 +0000 (00:27 -0600)]
ao-bringup: fix easymotor script to use .bin for dfu-util

6 months agodoc: Update for 1.9.7
Keith Packard [Tue, 13 Apr 2021 01:38:50 +0000 (18:38 -0700)]
doc: Update for 1.9.7

Add release notes
Add specs for EasyMotor
Update copyright year to 2021

Signed-off-by: Keith Packard <keithp@keithp.com>
6 months agoVersion 1.9.7
Keith Packard [Tue, 13 Apr 2021 01:39:48 +0000 (18:39 -0700)]
Version 1.9.7

Signed-off-by: Keith Packard <keithp@keithp.com>
6 months agoao-bringup: add tools for flash/cal/test of EasyMotor v2
Bdale Garbee [Tue, 13 Apr 2021 00:36:45 +0000 (18:36 -0600)]
ao-bringup: add tools for flash/cal/test of EasyMotor v2

6 months agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Tue, 13 Apr 2021 00:27:17 +0000 (18:27 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos