fw/altos
4 weeks agoVersion 1.9.11 master
Keith Packard [Mon, 30 May 2022 00:50:47 +0000 (17:50 -0700)]
Version 1.9.11

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agodoc: Update copyrights to 2022
Keith Packard [Mon, 30 May 2022 00:48:01 +0000 (17:48 -0700)]
doc: Update copyrights to 2022

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agodoc: Add release notes for 1.9.11
Keith Packard [Mon, 30 May 2022 00:47:41 +0000 (17:47 -0700)]
doc: Add release notes for 1.9.11

Signed-off-by: Keith Packard <keithp@keithp.com>
4 weeks agodoc: Document 10mw limit configuration
Keith Packard [Mon, 30 May 2022 00:46:43 +0000 (17:46 -0700)]
doc: Document 10mw limit configuration

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agosrc: Add easymini-v3.0
Keith Packard [Fri, 20 May 2022 23:20:13 +0000 (16:20 -0700)]
src: Add easymini-v3.0

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agolpc: Make beeper configurable
Keith Packard [Fri, 20 May 2022 23:20:32 +0000 (16:20 -0700)]
lpc: Make beeper configurable

Need to set the port, pin, timer and channel values

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agolpc: ADC 5 was busted
Keith Packard [Fri, 20 May 2022 23:41:19 +0000 (16:41 -0700)]
lpc: ADC 5 was busted

Signed-off-by: Keith Packard <keithp@keithp.com>
5 weeks agoao-tools/ao-eeprom: Dump converted info for F packets
Keith Packard [Thu, 5 May 2022 00:06:36 +0000 (17:06 -0700)]
ao-tools/ao-eeprom: Dump converted info for F packets

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agodoc: add an appendix with examples for configurable pyro channels
Bdale Garbee [Tue, 12 Apr 2022 17:13:44 +0000 (11:13 -0600)]
doc: add an appendix with examples for configurable pyro channels

2 months agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Thu, 7 Apr 2022 04:51:13 +0000 (22:51 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

2 months agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Tue, 5 Apr 2022 23:55:06 +0000 (17:55 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

2 months agouse correct test script for v1.0 easymega
Bdale Garbee [Tue, 5 Apr 2022 23:54:32 +0000 (17:54 -0600)]
use correct test script for v1.0 easymega

2 months agotelegps-v0.3: Reduce stack size to fit in ram
Keith Packard [Mon, 4 Apr 2022 21:40:37 +0000 (14:40 -0700)]
telegps-v0.3: Reduce stack size to fit in ram

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoao-telem: Read from stdin if no filenames
Keith Packard [Mon, 28 Feb 2022 00:10:30 +0000 (16:10 -0800)]
ao-telem: Read from stdin if no filenames

Make ao-telem work as a filter if no filenames are passed on the
command line.

Signed-off-by: Keith Packard <keithp@keithp.com>
2 months agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Mon, 4 Apr 2022 07:22:04 +0000 (01:22 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

4 months agodial it down a bit more to not exceed +10 dBm, or 10 mW radio-limit
Bdale Garbee [Sat, 26 Feb 2022 05:11:17 +0000 (22:11 -0700)]
dial it down a bit more to not exceed +10 dBm, or 10 mW

4 months agoAllow TX power to be limited to 10mW
Keith Packard [Fri, 25 Feb 2022 23:43:15 +0000 (15:43 -0800)]
Allow TX power to be limited to 10mW

This allows the radio power to be limited so that it doesn't generate
more than 10mW.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoVersion 1.9.10.4 1.9.10.4
Keith Packard [Mon, 21 Feb 2022 17:40:07 +0000 (09:40 -0800)]
Version 1.9.10.4

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos: Document how delay_done is used in ao_pyro.c
Keith Packard [Mon, 21 Feb 2022 17:43:54 +0000 (09:43 -0800)]
altos: Document how delay_done is used in ao_pyro.c

delay_done is the time at which the delay finishes, but non-zero
values also indicate that some delay is pending. Add a comment about
why the value is set to 1 when it is zero, and switch the tests of
this value to comparisons against zero.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos: Deal with 8-character version numbers
Keith Packard [Sat, 19 Feb 2022 23:35:31 +0000 (15:35 -0800)]
altos: Deal with 8-character version numbers

With 8 characters, the version number isn't null-terminated, so we
need to limit use to the available length in a couple of places.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos: Add -Wconversion
Keith Packard [Thu, 17 Feb 2022 05:48:01 +0000 (21:48 -0800)]
altos: Add -Wconversion

This adds the -Wconversion flag to detect potential mistakes in
implicit type conversion.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/telemega-v5.0: Add casts to beep values
Keith Packard [Thu, 17 Feb 2022 05:46:57 +0000 (21:46 -0800)]
altos/telemega-v5.0: Add casts to beep values

Need to be careful with types to make sure the math doesn't overflow.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_lco_v2: Add casts to reduce -Wconversion warnings
Keith Packard [Thu, 17 Feb 2022 05:46:07 +0000 (21:46 -0800)]
ao_lco_v2: Add casts to reduce -Wconversion warnings

No bugs identified

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_lco_v2: Use int32_t for temporary box value in step_box
Keith Packard [Thu, 17 Feb 2022 05:44:52 +0000 (21:44 -0800)]
ao_lco_v2: Use int32_t for temporary box value in step_box

Stepping to the next box will generate negative values and values
beyond the highest box number. Use a type capable of holding all of
those values, instead of int16_t.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agotelefireone-v1.0: Use a boolean value for ao_log_running
Keith Packard [Thu, 17 Feb 2022 05:42:50 +0000 (21:42 -0800)]
telefireone-v1.0: Use a boolean value for ao_log_running

Instead of reading a hex value and saving it directly, use
zero/none-zero to compute a boolean instead, avoiding a type
conversion warning.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/telefire: Add cast to AO_LED_CONTINUITY to eliminate -Wconversion warning
Keith Packard [Thu, 17 Feb 2022 05:41:44 +0000 (21:41 -0800)]
altos/telefire: Add cast to AO_LED_CONTINUITY to eliminate -Wconversion warning

All of these products had the same warning.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/stmf0: Add casts to reduce -Wconversion warnings. Use AO_TICK_TYPE
Keith Packard [Thu, 17 Feb 2022 05:38:25 +0000 (21:38 -0800)]
altos/stmf0: Add casts to reduce -Wconversion warnings. Use AO_TICK_TYPE

No bugs identified. Serial timeout types updated to AO_TICK_TYPE.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/stm32l0: Add casts to reduce -Wconversion warnings
Keith Packard [Thu, 17 Feb 2022 05:34:37 +0000 (21:34 -0800)]
altos/stm32l0: Add casts to reduce -Wconversion warnings

No bugs identified

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/stm: Add casts to reduce -Wconversion warnings
Keith Packard [Thu, 17 Feb 2022 05:32:07 +0000 (21:32 -0800)]
altos/stm: Add casts to reduce -Wconversion warnings

No bugs identified

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_micropeak.c: Add casts to reduce -Wconversion warnings
Keith Packard [Thu, 17 Feb 2022 01:53:41 +0000 (17:53 -0800)]
ao_micropeak.c: Add casts to reduce -Wconversion warnings

No bugs identified

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_flash_task: Add casts to reduce -Wconversion warnings
Keith Packard [Thu, 17 Feb 2022 01:53:11 +0000 (17:53 -0800)]
ao_flash_task: Add casts to reduce -Wconversion warnings

No bugs identified

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/micropeak-v2.0: Add casts to reduce -Wconversion warnings
Keith Packard [Thu, 17 Feb 2022 01:52:11 +0000 (17:52 -0800)]
altos/micropeak-v2.0: Add casts to reduce -Wconversion warnings

No bugs identified

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoaltos/lpc: Add casts to reduce -Wconversion warnings
Keith Packard [Thu, 17 Feb 2022 01:49:42 +0000 (17:49 -0800)]
altos/lpc: Add casts to reduce -Wconversion warnings

Most of these were caused by int/long mixes as uint32_t is 'long' on
arm for reasons, meaning that bare int constants need to be cast to
avoid a warning.

No bugs identified.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_tracker: Fix tracker_interval type to match config type (plus -Wconversion)
Keith Packard [Thu, 17 Feb 2022 01:38:56 +0000 (17:38 -0800)]
ao_tracker: Fix tracker_interval type to match config type (plus -Wconversion)

config.tracker_interval is uint8_t, so make the local copy match that
type.

Also fix other warnings found by -Wconversion.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_telemetry: Add casts to reduce -Wconversion warnings
Keith Packard [Thu, 17 Feb 2022 01:36:12 +0000 (17:36 -0800)]
ao_telemetry: Add casts to reduce -Wconversion warnings

No bugs noted

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_telemetry: Use int16_t types for telemetry packet intervals
Keith Packard [Thu, 17 Feb 2022 01:34:41 +0000 (17:34 -0800)]
ao_telemetry: Use int16_t types for telemetry packet intervals

This avoids concerns about overflow from int8_t types when computing
long intervals between packets as the base interface type was an
int16_t. This should help deal with higher sample rate sensors when
that occurs.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_telemetry: Switch time variables to AO_TICK_TYPE
Keith Packard [Fri, 28 Jan 2022 23:49:48 +0000 (15:49 -0800)]
ao_telemetry: Switch time variables to AO_TICK_TYPE

This makes sure telemetry packet intervals are computed correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_task: Task ids are 8-bits, fix type in struct ao_task
Keith Packard [Fri, 28 Jan 2022 23:44:03 +0000 (15:44 -0800)]
ao_task: Task ids are 8-bits, fix type in struct ao_task

These are densely allocated and should never be larger than the
maximum number of task slots, so fix the type to be 8-bits just like
all other places where a task_id is used.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_serial: Change serial_sleep_for APIs to use AO_TICK_TYPE
Keith Packard [Fri, 28 Jan 2022 23:40:19 +0000 (15:40 -0800)]
ao_serial: Change serial_sleep_for APIs to use AO_TICK_TYPE

These timeouts should all be short, but there's no reason to use a
different type.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agokalman, report, romconfig, sample, send_packet: Clean up -Wconversion warnings
Keith Packard [Fri, 28 Jan 2022 23:39:45 +0000 (15:39 -0800)]
kalman, report, romconfig, sample, send_packet: Clean up -Wconversion warnings

No bugs detected

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_monitor: Clean up -Wconversion warnings
Keith Packard [Fri, 28 Jan 2022 23:35:18 +0000 (15:35 -0800)]
ao_monitor: Clean up -Wconversion warnings

No bugs detected

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_radio_cmac_cmd: Clean up types for -Wconversion
Keith Packard [Fri, 28 Jan 2022 23:33:12 +0000 (15:33 -0800)]
ao_radio_cmac_cmd: Clean up types for -Wconversion

Use more reasonable types for lengths and the like to avoid
overflows. No actual bugs detected.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_radio_cmac: Make recv timeouts AO_TICK_TYPE
Keith Packard [Fri, 28 Jan 2022 23:31:09 +0000 (15:31 -0800)]
ao_radio_cmac: Make recv timeouts AO_TICK_TYPE

While these should generally be short enough to live in a 16-bit type,
use AO_TICK_TYPE for consistency.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_micro: Add casts to micropeak code for -Wconversion warnings
Keith Packard [Fri, 28 Jan 2022 23:18:49 +0000 (15:18 -0800)]
ao_micro: Add casts to micropeak code for -Wconversion warnings

No bugs detected

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_log: Add casts to reduce -Wconversion warnings
Keith Packard [Fri, 28 Jan 2022 23:12:47 +0000 (15:12 -0800)]
ao_log: Add casts to reduce -Wconversion warnings

No bugs noted here.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_log: Fix sensor time triggers to use AO_TICK_TYPE
Keith Packard [Fri, 28 Jan 2022 23:11:07 +0000 (15:11 -0800)]
ao_log: Fix sensor time triggers to use AO_TICK_TYPE

These values were used to determine when various log information would
be recorded. Using the wrong type meant that they would always
trigger, causing the log to fill up rapidly with data that should be
sampled at a lower rate.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agomore 16-bit log tick values
Keith Packard [Fri, 28 Jan 2022 23:10:06 +0000 (15:10 -0800)]
more 16-bit log tick values

4 months agoao_log: Change flight type to uint16_t, widen APIs dealing with flight numbers to...
Keith Packard [Fri, 28 Jan 2022 23:06:18 +0000 (15:06 -0800)]
ao_log: Change flight type to uint16_t, widen APIs dealing with flight numbers to int32_t

Real Flight numbers are 16-bit unsigned values, but APIs using them
pass values that areoverloaded to also represent broken log slots
using negative numbers. This means that these APIs need to be able to
represent all 65535 possible flight numbers *and* all possible log
slots as negative values. Switch the variables holding only flight
numbers to uint16_t and those holding either a flight number or log
slot to int32_t.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months agoao_gps, ao_log: Make conversions to 16-bit time log values explicit
Keith Packard [Fri, 28 Jan 2022 23:00:38 +0000 (15:00 -0800)]
ao_gps, ao_log: Make conversions to 16-bit time log values explicit

All log formats record only the low 16-bits of the time value, make
conversions to those explicit to silence -Wconversion warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
4 months 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>
5 months 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>
5 months agoneed to save .bin for TeleGPS v2.0
Bdale Garbee [Tue, 25 Jan 2022 19:34:31 +0000 (12:34 -0700)]
need to save .bin for TeleGPS v2.0

5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
6 months 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

6 months 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

6 months 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

7 months 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

8 months 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>
8 months 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>
8 months 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>
8 months 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

8 months 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>
8 months 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>
8 months 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>
8 months 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>
8 months 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>
8 months 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>
8 months 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>
8 months 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>