Keith Packard [Sun, 23 Aug 2020 22:32:57 +0000 (15:32 -0700)]
altoslib: Deal with reflashing EasyMega boards with ancient firmware
Ancient EasyMega firmware included radio calibration data in the
romconfig bits, which has since been removed. That means the config
data from those boards will be at a different location than current
firmware. Deal with that by poking around in firmware looking for
valid bits.
Keith Packard [Sun, 23 Aug 2020 17:53:25 +0000 (10:53 -0700)]
altosui: Improve configuration save feedback
Mark window title as (modified) with any unsaved changes. Disable the
'Save' button while the save is happening. Wait for the re-load of
configuration values before clearing the '(modified)' state. This lets
you see when the flight computer has accepted the updated values.
Keith Packard [Sun, 23 Aug 2020 17:51:00 +0000 (10:51 -0700)]
altoslib: Improve configuration performance over remote link
Avoid re-setting dongle radio parameters when they haven't changed
during device configuration setting. This avoids flipping back and
forth from remote to local mode three times during config save.
Wait for remote end to say 'Saved' before dropping radio link. This
ensures that the remote end actually gets the save command before the
link is terminated.
Keith Packard [Sat, 8 Aug 2020 04:48:09 +0000 (21:48 -0700)]
altos: Don't report inhibited pyro channels as fired
Inhibiting channels happens when the channel conditions change during
the delay period and was done by marking them as already fired. This
worked, but the log file would then indicate that the channel had
fired when in fact it was inhibited instead. Separate out the inhibited status
so that the correct data appears in the log.
Keith Packard [Sat, 8 Aug 2020 03:20:59 +0000 (20:20 -0700)]
micropeak: Add support for MicroPeak v2.0
MicroPeak v2.0 sends a 'unique id' with the log data; capture that and
included it in the file name.
MicroPeak v2.0 can be directly connected to the host using the µP I/O
board. Handle that case by sending the 'l' command which will cause
the device to dump the log.
Keith Packard [Thu, 6 Aug 2020 18:05:03 +0000 (11:05 -0700)]
altos: Remove support for !HAS_TASK_QUEUE
This uses a bit more memory, but the amount can be controlled by
setting the size of the sleep hash table, which makes this fit on even
the smaller devices like the early EasyMini boards.
Keith Packard [Sat, 8 Aug 2020 01:17:07 +0000 (18:17 -0700)]
altos: Remove ao_led_toggle API from general code
The generic implementation would need to record LED status as it
cannot be read back from the device on most hardware. Just get rid of
it and let attiny keep its implementation (which does work).
Keith Packard [Mon, 3 Aug 2020 00:29:44 +0000 (17:29 -0700)]
altos/stmf0, stm32f0: Call ao_boot_chain to start application
This used to be done inside ao_boot_check_chain or ao_boot_check_pin,
but it made more sense to have it done in _start instead. stm and lpc
were adjusted, but stmf0 and stm32f4 were missed.
This caused boards using this process to wedge in the boot loader.
Keith Packard [Sun, 2 Aug 2020 20:31:58 +0000 (13:31 -0700)]
altosui: Re-set pad orientation labels after product name is set
We don't know what product is being configured until after we query
the configuration, which means we need to re-set the orientation label
once that has been fetched.
Keith Packard [Wed, 29 Jul 2020 17:53:39 +0000 (10:53 -0700)]
altos: Use new ao_spi_speed inline to set SPI speeds using spec'd frequencies
Instead of hand-adjusting SPI speeds for each driver and product based
on processor supported rates, create an inline function that takes the
maximum frequency supported by the device and maps that to a value
supported by the SoC. This ensures that we don't accidentally drive devices
faster than they want (as could happen with AO_SPI_SPEED_FAST), but do go
as fast as possible in every configuration. Using an inline function means
the value is computed at compile time.
Keith Packard [Wed, 22 Jul 2020 16:04:30 +0000 (09:04 -0700)]
altos: Add 'booster' mode for dual-deploy igniters
Booster mode triggers the 'main' channel at first motor burnout
allowing the use of a simple flight computer in the booster while
providing both a separation charge and an apogee event for recovery.
Keith Packard [Wed, 22 Jul 2020 15:57:05 +0000 (08:57 -0700)]
altos: Use state transitions to directly drive igniters
Instead of a separate igniter API, have the igniter code monitor
flight state changes to trigger igniter events. This simplifes the
code while allowing further changes in the igniter code.
Keith Packard [Thu, 2 Jul 2020 22:11:42 +0000 (15:11 -0700)]
altos: Reduce flash temp buffer to make space for Em v1.0 ISR stack
EasyMini has limited RAM; small enough that increasing the size of the
storage buffer from 128 to 256 bytes left too little space at the top
of memory for the interrupt stack, causing EasyMini v1.0 to crash at
boot.
Keith Packard [Sun, 14 Jun 2020 07:04:31 +0000 (00:04 -0700)]
altos: Leave floating printf enabled on m3 devices
These devices all use floating point computations, so leave the
floating point printf included in case they print one of those
values. If we run short on flash space, we can switch back.
Keith Packard [Tue, 9 Jun 2020 04:26:23 +0000 (21:26 -0700)]
altos: Leave accel data in ring raw; swap for orientation on fetch
Instead of re-writing the acceleration data in the ring to adjust for
pad orientation, just leave it alone and flip it each time it is
fetched. Much simpler this way.
Keith Packard [Tue, 9 Jun 2020 04:03:31 +0000 (21:03 -0700)]
altos: Round selected log size down to ao_storage_block multiple
There was some (broken) code that complained if the value set wasn't
correct, that has been replaced by code that accepts any value and
just rounds it down to a multiple of ao_storage_block. The code also
stops complaining when set to the current value when storage isn't
empty.
Keith Packard [Tue, 9 Jun 2020 04:01:31 +0000 (21:01 -0700)]
altos: Move ao_storage_erase to shared code. Add len
This makes ao_storage_erase take an arbitrary length. The new version
erases each storage block if there's any un-erased data present, and
then also checks after erasing to make sure the block is clear.