Keith Packard [Thu, 29 Oct 2020 18:40:25 +0000 (11:40 -0700)]
altoslib: Delay accel cal value adjustment until data all read
Instead of trying to compute these values as soon as the necessary
data are available, delay until all data are available as which data
are necessary depends on the target device, and some target devices
don't have some of the data values at all.
Keith Packard [Thu, 29 Oct 2020 18:37:03 +0000 (11:37 -0700)]
altoslib: Avoid sending negative accel cal values to flight computer
Pre-1.9.7 firmware does not handle negative values. Instead, send
large positive values which will wrap around to negative values inside
the flight computer.
Keith Packard [Wed, 28 Oct 2020 21:32:16 +0000 (14:32 -0700)]
ao-bringup: Delay before testing easymini for 0.25 seconds
EasyMini isn't quite ready to play when the USB is first detected as
the sensors haven't yet been initialized. Wait for 0.25 seconds to
give the board time to finish initializing.
Keith Packard [Fri, 23 Oct 2020 23:10:43 +0000 (16:10 -0700)]
altoslib, altosuilib: Get Idle Monitor working with EasyTimer and EasyMotor
This involve splitting out the gyro and mag sensor handling from the
3-d accel stuff, displaying only information that is present. The IMU
support now allows for using the along axis as the primary
acceleration indicator. The Adxl375 now allows using all three axes as
the 3d accelerometer.
Keith Packard [Wed, 7 Oct 2020 01:54:27 +0000 (18:54 -0700)]
altoslib: Don't pass along GPS information when the GPS device is busted
If the telemetry packet indicates that there's no functioning GPS receiver,
then don't pass along those packets so that the UI displays things more accurately.
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).