Keith Packard [Sat, 17 Oct 2020 03:48:55 +0000 (20:48 -0700)]
altos: Reset 3d-accel and motor pressure sums each ground interval
We're repeatedly averaging 512 ground samples to get up-to-date values
for all of the sensors, but we need to clear the sums after each
sample interval. The 3d accel values were only cleared if there was a
full IMU, not for devices with only an accelerometer like
EasyMotor. The motor pressure sum was never cleared.
Keith Packard [Sun, 11 Oct 2020 05:00:56 +0000 (22:00 -0700)]
altos: De-bias height/speed data while on pad
Save speed/height values from 64 samples ago and subtract them from
the current value. This reduces the effect of systematic accelerometer
error causing these values to slowly creep when there's no barometric
sensor to keep them in check.
Keith Packard [Mon, 24 Aug 2020 00:32:41 +0000 (18:32 -0600)]
altos/easymotor-v2: Beep out 'pad mode' repeatedly
Easymotor doesn't have igniters, so it would have been silent on the
pad, which seems bad. Add HAS_PAD_REPORT code which beeps out 'pad'
once every five seconds.
Keith Packard [Wed, 30 Sep 2020 22:53:38 +0000 (15:53 -0700)]
libaltos: Avoid using strcmp and strchr on windows
At least one of these caused the library to not load on Windows
10. Work around that by changing the code to use vid/pid instead of
matching on the name provided back by the OS.
Keith Packard [Wed, 30 Sep 2020 05:02:56 +0000 (22:02 -0700)]
altosui: Work around lack of actual USB product names on Windows
Windows doesn't provide an API to get the USB product name for
attached devices, it only provides the name listed in the .inf file
for each vid/pid. This means that you get 'TeleMega', or 'TeleMega
can't isolate the list to the correct version.
With this fix, at least the '#2' is stripped off, and the matching
code restricts itself to showing only TeleMega files instead of all
filenames starting with 'tele'.
Keith Packard [Mon, 31 Aug 2020 22:01:18 +0000 (15:01 -0700)]
libaltos: Map generic windows device names to actual names
When we signed the .ini file for our windows 'driver', IDs 28 and 2c
hadn't been assigned to EasyMega and EasyMotor, so that file has
generic 'AltusMetrum28' and 'AltusMetrum2c' instead. Updating that
file is 'hard', so just map the names in the driver instead.
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.