fw/altos
2 years agoao_flight: ao_interval_end type was too small, could cause premature landing state
Keith Packard [Fri, 28 Jan 2022 22:50:58 +0000 (14:50 -0800)]
ao_flight: ao_interval_end type was too small, could cause premature landing state

ao_interval_end is used to provide a window of time during which the
max/min values for sensors are measured. After that time expires,
those bounds are compared to see if the airframe has been stable and
should be moved to landing state. With a type that is too small, that
could happen immediately after transitioning to main (for baro-enabled
devices) or coast (for accel-only devices). For baro devices, this
would disable any redundant main firing events. For accel-only
devices, this could disable all events occuring after coast, including
firing separation charges or motor igniters.

There are also a couple of additional changes to reduce -Wconversion
messages.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoao_convert_pa: Switch array index to unsigned type
Keith Packard [Fri, 28 Jan 2022 22:43:31 +0000 (14:43 -0800)]
ao_convert_pa: Switch array index to unsigned type

This seems more appropriate for this use.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoao_companion: Make motor_number uint16_t
Keith Packard [Fri, 28 Jan 2022 22:42:45 +0000 (14:42 -0800)]
ao_companion: Make motor_number uint16_t

Make it match the types used elsewhere

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agofifo: Add casts to fifo operation macros for -Wconversion
Keith Packard [Fri, 28 Jan 2022 22:41:59 +0000 (14:41 -0800)]
fifo: Add casts to fifo operation macros for -Wconversion

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agobeep, cmd, config, convert_volt, data, distance, fec, kalman: -Wconversion warnings
Keith Packard [Fri, 28 Jan 2022 22:41:10 +0000 (14:41 -0800)]
beep, cmd, config, convert_volt, data, distance, fec, kalman: -Wconversion warnings

No bugs noted, just adding casts to resolve -Wconversion warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoaltos/ao_freq: Use uint32_t for radio freq setting value
Keith Packard [Fri, 28 Jan 2022 22:15:42 +0000 (14:15 -0800)]
altos/ao_freq: Use uint32_t for radio freq setting value

These values are always unsigned; changing this resolves some
-Wconversion messages.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoaltos/ao_stdio: use uint8_t for stdio index
Keith Packard [Fri, 28 Jan 2022 22:13:53 +0000 (14:13 -0800)]
altos/ao_stdio: use uint8_t for stdio index

This makes type usage of this value consistent. Also fix another
-Wconversion warning.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoaltos: Switch ao_radio_recv timeout to AO_TICK_TYPE
Keith Packard [Fri, 28 Jan 2022 22:12:31 +0000 (14:12 -0800)]
altos: Switch ao_radio_recv timeout to AO_TICK_TYPE

Make sure all times are in the wider type.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agodrivers/ao_rn4678: Fix timeouts to use AO_TICK_TYPE
Keith Packard [Fri, 28 Jan 2022 22:10:31 +0000 (14:10 -0800)]
drivers/ao_rn4678: Fix timeouts to use AO_TICK_TYPE

Also fix other -Wconversion messages.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agodrivers/ao_quadrature: Fix -Wconversion warnings
Keith Packard [Fri, 28 Jan 2022 22:08:56 +0000 (14:08 -0800)]
drivers/ao_quadrature: Fix -Wconversion warnings

No bugs detected.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agodrivers/ao_pad: Convert from/to 16-bit times over the air
Keith Packard [Fri, 28 Jan 2022 22:06:25 +0000 (14:06 -0800)]
drivers/ao_pad: Convert from/to 16-bit times over the air

The radio protocol sends only 16 bits of time, make sure we translate
from/to those correctly. No bugs detected, just casts added to
clarify. Also fix other -Wconversion warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agodrivers/ao_packet: Switch time values to AO_TICK_TYPE
Keith Packard [Fri, 28 Jan 2022 22:00:43 +0000 (14:00 -0800)]
drivers/ao_packet: Switch time values to AO_TICK_TYPE

Make sure times are kept in the right type. Also resolved other
-Wconversion issues.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agodrivers: Resolve -Wconversion in m25, mma655x, mmc5983, mpu and ms5607
Keith Packard [Fri, 28 Jan 2022 21:59:26 +0000 (13:59 -0800)]
drivers: Resolve -Wconversion in m25, mma655x, mmc5983, mpu and ms5607

No bugs identified.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agodrivers/ao_lco: Fix box types to be uint16_t. Also clean other -Wconversion messages
Keith Packard [Fri, 28 Jan 2022 17:33:17 +0000 (09:33 -0800)]
drivers/ao_lco: Fix box types to be uint16_t. Also clean other -Wconversion messages

Old LCO code uses 0x1000 as magic value for "DRAG" box, so we need 16
bits. Switch all box variables to 16 bits, use int32_t when switching
box numbers to deal with negative values and still hold the whole
possible range (even though 16 bits "should" be plenty).

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoao_hmc5883: Add explicit casts for -Wconversion
Keith Packard [Fri, 28 Jan 2022 17:29:06 +0000 (09:29 -0800)]
ao_hmc5883: Add explicit casts for -Wconversion

No bugs noted.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoao_companion: Make time conversion to 16-bits in companion protocol explicit
Keith Packard [Fri, 28 Jan 2022 17:26:08 +0000 (09:26 -0800)]
ao_companion: Make time conversion to 16-bits in companion protocol explicit

Companion protocol only passes low 16-bits. Also add explicit casts for -Wconversion

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoao_gps_skytrac, ao_gps_ublox: Add explicit casts to quiet -Wconversion
Keith Packard [Fri, 28 Jan 2022 17:25:15 +0000 (09:25 -0800)]
ao_gps_skytrac, ao_gps_ublox: Add explicit casts to quiet -Wconversion

No bugs noted.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agodrivers: Fix type of radio timeout parameter
Keith Packard [Fri, 28 Jan 2022 17:20:29 +0000 (09:20 -0800)]
drivers: Fix type of radio timeout parameter

Move from uint16_t to AO_TICK_TYPE. Also add explicit casts to quiet
remaining -Wconversion messages.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoaltos/drivers/ao_button: Save all 32-bits of irq status
Keith Packard [Fri, 28 Jan 2022 17:16:49 +0000 (09:16 -0800)]
altos/drivers/ao_button: Save all 32-bits of irq status

Was saving in a uint8_t

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoaltos/drivers: Add explicit casts in ao_aprs, ao_bmx160 and ao_btm
Keith Packard [Fri, 28 Jan 2022 17:15:57 +0000 (09:15 -0800)]
altos/drivers: Add explicit casts in ao_aprs, ao_bmx160 and ao_btm

No bugs spotted here, but this quiets -Wconversion warnings

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoaltos/attiny: Eliminate warnings from -Wconversion
Keith Packard [Thu, 27 Jan 2022 23:52:44 +0000 (15:52 -0800)]
altos/attiny: Eliminate warnings from -Wconversion

These have no effect on the generated code as they simply make
implicit conversions explicit.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoaltos: Re-enable apogee delay
Keith Packard [Thu, 17 Feb 2022 01:00:59 +0000 (17:00 -0800)]
altos: Re-enable apogee delay

When the igniter code was changed to support booster mode, the code
which delayed apogee firing based on the configure apogee delay value
was lost. Re-enable that by sticking a delay before firing the drogue
charge when the ignite mode is not redundant apogee.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoVersion 1.9.10.3
Keith Packard [Wed, 9 Feb 2022 17:58:07 +0000 (09:58 -0800)]
Version 1.9.10.3

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agolibaltos: Build Mac OSX libaltos.dylib for arm64 too
Keith Packard [Wed, 9 Feb 2022 17:51:33 +0000 (09:51 -0800)]
libaltos: Build Mac OSX libaltos.dylib for arm64 too

Make this work on the M1.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoSwitch from AdoptOpenJDK to Adoptium
Keith Packard [Wed, 9 Feb 2022 17:49:49 +0000 (09:49 -0800)]
Switch from AdoptOpenJDK to Adoptium

This project moved to Eclipse foundation but seems otherwise about the same.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoao_pyro: Move delay_done out of pyro structure
Keith Packard [Fri, 28 Jan 2022 23:27:02 +0000 (15:27 -0800)]
ao_pyro: Move delay_done out of pyro structure

The pyro structure should be read-only in flight operations. Move the
'delay_done' element to a parallel array as that gets written. Change
types to pointers to const structs to enforce this in the future.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoaltos: AES code was storing bytes in an int array
Keith Packard [Thu, 27 Jan 2022 23:49:15 +0000 (15:49 -0800)]
altos: AES code was storing bytes in an int array

The only operations using these values are logic using bytes, not
arithmetic, so shrinking the size of the elements should have no
effect on operation.

This saves space *and* eliminates a type conversion warning from
-Wconversion.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agodata_interval == 0 means no data collection
Keith Packard [Sat, 22 Jan 2022 03:45:14 +0000 (19:45 -0800)]
data_interval == 0 means no data collection

All of the timer functions were still taking one sample every 256
clock ticks.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoVersion 1.9.10.2
Keith Packard [Tue, 11 Jan 2022 22:34:14 +0000 (14:34 -0800)]
Version 1.9.10.2

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoaltosdroid: Add BLUETOOTH_CONNECT permission, handle its lack
Keith Packard [Tue, 11 Jan 2022 22:32:55 +0000 (14:32 -0800)]
altosdroid: Add BLUETOOTH_CONNECT permission, handle its lack

Android 12 switched how bluetooth permissions work, so now we need a
new one to talk to devices. Also deal with a lack of that by not
crashing when we can't get the name of a BT device.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoaltos: Switch all tick variables to AO_TICK_TYPE/AO_TICK_SIGNED
Keith Packard [Thu, 16 Dec 2021 21:39:33 +0000 (13:39 -0800)]
altos: Switch all tick variables to AO_TICK_TYPE/AO_TICK_SIGNED

Instead of trying to pick and choose which work as 16-bit values,
change everything that doesn't affect external values (log, companion,
radio) to AO_TICK_TYPE.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoaltos/attiny: Switch to avrisp2 for development programmer
Keith Packard [Thu, 16 Dec 2021 21:38:39 +0000 (13:38 -0800)]
altos/attiny: Switch to avrisp2 for development programmer

My bench programmer puck is the avrisp2, not usbtiny

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agoao-tools/ao-test-igniter: Deal with devices that use both 'apogee' for ADC
Keith Packard [Thu, 16 Dec 2021 21:37:17 +0000 (13:37 -0800)]
ao-tools/ao-test-igniter: Deal with devices that use both 'apogee' for ADC

Some devices report drogue igniter ADC value with 'apogee' tag. Deal
with this.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agomicropeak: detect empty log received from device
Keith Packard [Thu, 16 Dec 2021 21:36:10 +0000 (13:36 -0800)]
micropeak: detect empty log received from device

Avoid reporting a failure to the user when the device has no flight
log.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 years agodoc: add an appendix on frequency calibration to the all-in-one manual
Bdale Garbee [Wed, 22 Dec 2021 18:35:52 +0000 (11:35 -0700)]
doc: add an appendix on frequency calibration to the all-in-one manual

2 years agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Mon, 20 Dec 2021 20:49:41 +0000 (13:49 -0700)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

2 years agoneed to capture .bin file for telebt loader, too
Bdale Garbee [Mon, 20 Dec 2021 20:49:28 +0000 (13:49 -0700)]
need to capture .bin file for telebt loader, too

2 years agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Wed, 3 Nov 2021 19:24:41 +0000 (13:24 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

2 years agoVersion 1.9.10.1
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>
2 years 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>
2 years 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>
2 years 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

2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Thu, 7 Oct 2021 18:11:06 +0000 (12:11 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

2 years 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>
2 years 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

2 years 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 years 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 years 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 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Wed, 22 Sep 2021 17:53:17 +0000 (11:53 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

2 years 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

2 years 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

2 years agocapture odd changes from production machine?
Bdale Garbee [Wed, 22 Sep 2021 17:45:49 +0000 (11:45 -0600)]
capture odd changes from production machine?

2 years 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

2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years agoShow mag sensor SPI ID
Keith Packard [Tue, 7 Sep 2021 14:54:01 +0000 (07:54 -0700)]
Show mag sensor SPI ID

2 years 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>
2 years 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>