Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Description
As i talked here #9497 I implemented OSD custom elements for INAV.
It's designed mainly for cooperation with programing framework, without programming framework it does not make sense.
In default are there 3 custom osd elements with three part plus visibility settings. Each part can be set to:
none don't use that part
text show text (for save memory can be set as "text" only one part of element), max 15 chars [A-Z0-9]
icon static user select icon which he wants to show
icon gv icon is driven by global variable value
gv shows global variable value
Visibility can be show only to
gv driven by global variable 0 = hidden , x > 0 = showed
always it's clear :)
Here is demo from development. https://www.youtube.com/watch?v=LKFFJfYywM4
Custom elements are in "Global variables" section in OSD tab, because custom osd elements are higtly connected to programming framework. I can change in.
If this PR will be merged then global variables and Switch Indicator Settings can be removed because these elements can be easily replaced by custom elements.
Code
I tried to folow INAV standarts and use same programming style as it's used in inav, but still please go throught code carefully and check it properly. I'm not sure about saving char array in cli. In the cli.c is hardcoded number of part for custom elements, I did not know how to do dynamically. Maybe not worth to do dynamically.
And next whether it's good uidea to use separated file for custom OSD elements.
Configurator
PR for configurator: iNavFlight/inav-configurator#1901