Uses the OSD_WARN element rather than a separate separate screen before arming. The "BEACON ON" message will appear for the first 0.5 seconds and then "AM IN x.y" will countdown for the remaining delay.
Also fixed OSD_WARN element blinking related to battery warnings to only blink the warning element if the battery warnings are actually configured.
Provides a clear indication that arming is delayed for cases where DSHOT beacon is active.
Clears the OSD and displays "DISABLING BEACON" and "ARMING IN X.Y" with an active countdown in tenths of a second while arming is delayed due to DSHOT beacon. Once delay period is over the normal "ARMING" message appears.
If the DSHOT beacon is not active then this delay screen is not displayed.
Previously only a single bitmapped parameter was available in the cli but this wasn't very useful as the users would have to understand the bit positions to enable/disable warning options. This change exposes each warning item as a separate parameter.
Reorder the stats field enumeration to match the actual on-screen display order. Needed to support changes in the configurator so that it will also disply the selections in the same order.
Going forward if there are any changes to the on-screen display order of the post-flight statistics then the enumeration must be updated to match.
Previously the flags controlling the enabled OSD stats were stored as an array of boolean. This change reduces config storage by storing the flags as bits inside a single uint32.
The telemetry data provides eRPM/100. Added a `motor_poles` parameter (defaulting to 14) that is used to calculate the physical RPM.
RPM = (telemetry_rpm * 100) / (motor_poles / 2)
Most motors we commonly use are 14 poles, but the user can adjust if needed for their setup.
Also calculate actual RPM for DEBUG_ESC_SENSOR_RPM, but to fit with in int16 the log value will be RPM/10.
The osd_esc_current_alarm was added but never assigned a default value. Therefore it defaulted to 0 instead of off (-1). This resulted in OSD warnings if the ESCs weren't providing current data as the test looked for values >= the warning setting.
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).