Allows the user to configure a new OSD stat item called "BATTERY" that will display a live and updating battery voltage. This would allow the user to see how their battery was recovering after disarming by comparing to the stat "END BATTERY".
The pitch stick high can be used to clear the OSD stats screen, but it's also part of the sequence to enter the OSD menu. Entering the OSD menu from the stats page should have cleared the stats, but because of a race condition they weren't always cleared and the OSD menu would draw on top of the stats. Changed the logic to ensure that if the OSD menu is entered the stats page is exited and cleared.
Previously the OSD stats would always display even if the OSD disable switch mode was active.
Additionally, since the OSD stats page must now be dynamically refreshed rather than only rendered once at disarm, "live" stats like RTC clock and the timer "ON TIME" continue to update and display current information. All other stats related to the previous flight remain static as of the disarming.
and OSD_WARNINGS is visible in the OSD.
The stats screen was preventing the user from knowing that a disarm might be casued by runaway takeoff. If the warnings element is visible it will have the message "RUNAWAY" but the disarm it triggers caused the stats display to replace the screen.
The change prevents the stats page from displaying if the ARMING_DISABLED_RUNAWAY_TAKEOFF flag is set and the OSD_WARNINGS element is visible. Otherwise the stats screen is displayed as normal.
Changed the logic so that if currently armed and the previous arming state was disarmed, then blank out the message for just this single iteration. This should allow any elements behind to be properly displayed when armed.
* Make Artificial horizon and crosshairs positionable
* Remove dependency on AHI for AHI sidebars
* Use the old fixed positions as defaults for some OSD elements
Namely:
- crosshairs
- artificial horizon
- artificial horizon sidebars
* optimize math
Results in considerable flash saving
* log_approx, exp_approx, pow_approx
Taken from https://github.com/jhjourdan/SIMD-math-prims/blob/master/simd_math_prims.h
* Fix pow in rangefinder
* Use approximate function in baro calculation
Maximum error is < 20cm
* fixup! Fix pow in rangefinder
Previously the OSD crash-flip warning would only track the state of the activation switch. So if the switch was disabled but still armed the message would go away, but the quad was still in active crash-flip mode until it was disarmed. This change makes the OSD message follow the actual internal state for crash-flip.
Removed the code that used leading and trailing half-dots, now using a regular dot instead.
Also fixed the maximum length of the coordinate string, as the 7th decimal digit was getting clobbered in longitudes with three digits (the count was off by one).
Currently if no black box device is selected the default case sets
storageDeviceIsWorking = true.
I believe this to be wrong.
This commit keeps the initial setting of false.