broken by the fix for #10220.
Smart Audio will now default to the old (bad) behavior where pulldowns
are being used instead of pullups for most BF supported processors when
in Bidirectional, PushPull mode.
Updated the OSD element and stats rendering code to use this fuction to print floating point values of varying precisions.
Will make adding OSD element variants that provide different decimal precisions (like voltage, amperage, etc.) easy to implement since all that needs to change is the `decimalPlaces` passed to the function. As an example, see the `osdFormatAltitudeString()` function.
If at some later date a more capable `printf` package is inplemented, then the guts of the `osdPrintFloat()` function could just be simplified while leaving the abstraction in place.
Variant 1 (default): Altitude displays with one decimal place. No change in behavior.
Variant 2: Altitude displays as whole number (no decimal) so it will represent meters or feet depending on the units selected.
Provides a properly implemented way for MSP query type OSD implementations (like DJI) to display OSD warnings. Separates the warnings generation from the OSD task and shares common code to make the text available for the OSD and/or via MSP. Eliminates the need to implement hacks and workarounds like using the `CRAFT_NAME` field to display warnings. Since the warnings logic is now separate, the OSD task does not need to be running unlike other hacks.
Adds the `MSP2_GET_OSD_WARNINGS` message formatted as follows:
```
byte description
0 Display attributes including blink (see displayPortAttr_e in drivers/display.h)
1 Length of warning text
2-n Warning text characters
```
This mod adds an arrow symbol showing the location of the up/down on the OSD. The arrow direction points in the direction of up or down.
Update osd_elements.c
Making the Up/Down OSD reference its own element
Removing the Up/Down reference from the artificial horizon and making a specific element for this feature. Activation via CLI (for now)
Updates to Up/Down refernce OSD element
Changed the up/down reference so that it is its own separarte element. The position is absolute on the screen and immutable by the user for consistent operation. Updated settings to include CLI option for turning the feature on and off.
Update cms_menu_osd.c
Updated file to add Up/Down reference selection from OSD menu
Updates to simplify/correct Up/Down OSD element
Simplified/corrected logic and removed arcsine function. OSD up/down reference is now positionable by the user in the configurator.
Tweaks and codestyle updates
Feedback from Michael Keller
Updates to Up/Down OSD indicator
Created a bounding box of +/- 25 degrees for indicator
Coding style correction
minor correction to match BF coding style
Enable Up/Down reference in OSD
This mod adds an arrow symbol showing the location of the up/down on the OSD. The arrow direction points in the direction of up or down.
Update osd_elements.c
Making the Up/Down OSD reference its own element
Removing the Up/Down reference from the artificial horizon and making a specific element for this feature. Activation via CLI (for now)
Updates to Up/Down refernce OSD element
Changed the up/down reference so that it is its own separarte element. The position is absolute on the screen and immutable by the user for consistent operation. Updated settings to include CLI option for turning the feature on and off.
Updates to simplify/correct Up/Down OSD element
Simplified/corrected logic and removed arcsine function. OSD up/down reference is now positionable by the user in the configurator.
Tweaks and codestyle updates
Feedback from Michael Keller
Enable Up/Down reference for artificial horizon in OSD
This mod adds an arrow symbol showing the location of the up/down on the OSD. The arrow direction points in the direction of up or down.
Update osd_elements.c
Making the Up/Down OSD reference its own element
Removing the Up/Down reference from the artificial horizon and making a specific element for this feature. Activation via CLI (for now)
Updates to Up/Down refernce OSD element
Changed the up/down reference so that it is its own separarte element. The position is absolute on the screen and immutable by the user for consistent operation. Updated settings to include CLI option for turning the feature on and off.
Updates to simplify/correct Up/Down OSD element
Simplified/corrected logic and removed arcsine function. OSD up/down reference is now positionable by the user in the configurator.
Tweaks and codestyle updates
Feedback from Michael Keller
Coding style correction
minor correction to match BF coding style
Enable Up/Down reference for artificial horizon in OSD
This mod adds an arrow symbol showing the location of the up/down on the OSD. The arrow direction points in the direction of up or down.
Update osd_elements.c
Making the Up/Down OSD reference its own element
Removing the Up/Down reference from the artificial horizon and making a specific element for this feature. Activation via CLI (for now)
Updates to Up/Down refernce OSD element
Changed the up/down reference so that it is its own separarte element. The position is absolute on the screen and immutable by the user for consistent operation. Updated settings to include CLI option for turning the feature on and off.
Updates to simplify/correct Up/Down OSD element
Simplified/corrected logic and removed arcsine function. OSD up/down reference is now positionable by the user in the configurator.
Tweaks and codestyle updates
Feedback from Michael Keller
Corrections to unit tests
Corrected unit tests link failing due to not being able to find rMat[3][3]
Extends the OSD element position setting to include a 2 bit selector for alternate representations of the element. So up to 4 variants of an element can be supported. Meant to be used instead of adding new elements when the request is a mutually exclusive variant of an existing element. If there are no variants of an element then the logic falls back to "type 1" (`OSD_ELEMENT_TYPE_1`) which is the only representation of the element.
As an example, in this PR the "Battery usage" element has been extended to 4 types:
1. The original capacity remaining graphical bar (shrinks as battery is used) - this is the default.
2. Capacity used graphical bar (grows as battery is used).
3. Remaining capacity numerical percentage (goes down as battery is used).
4. Capacity used numerical percentage (goes up as battery is used).
When extending an element it is not necessary to support all 4 types and the element rendering code should default to the original type 1 version for unsupported types.
Will require Configurator support. Since the 2 high bits of the `uint16` were previously unused the setting will default to the "type 1" original variant in all cases where an incompatible Configurator is used.
Adds angle setpoint roll/pitch expo for self-level modes.
Previously the angle setpoint was a simple linear calculation based on the stick deflection percentage and the angle limit. This makes control very jumpy around center stick and people would often resort to adding expo in their radios to compensate. This then adds the complication of wanting expo in the radio when in self-level but not when in acro - leading to complicated mixes, virtual switches, etc.
This PR adds separate self-level expo settings for roll/pitch so the user can customize the axis behavior. Yaw is excluded because this axis uses normal rates and expo controlling the rotational rate around the yaw axis and not an angle setpoint. The roll/pitch expo can range from 0 (off) to 100 (max) like other RC expo settings. For example:
```
set roll_level_expo = 30
set pitch_level_expo = 40
```
The default values are 0 which disables any expo and behaves as before.
The settings are available in the CMS rate profile menu.