iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.2k stars 1.49k forks source link

Custom OSD elements driven by programing tab #9497

Closed error414 closed 9 months ago

error414 commented 1 year ago

Current Behavior

not in inav

Desired Behavior

Add custom element driven by programming tab

Suggested Solution

I created proof of concept of custom OSD elements. Element is divided to three part and each part can be set to a single option

GUI is in develop, I just needed to be able to load/save values image

the settings on sreen is: icon driven by global variable 0 | text (test) | gloval variable 7 value | visibility driven by global variable 2

A simple program for testing image Desription of program:

How it runs on HITL. https://www.youtube.com/watch?v=RtlrOBoGQXU

Who does this impact? Who is this for?

Pawel introduced auto RTH if plane reach some distance. It's was written in inav programming. Custom OSD elements can provide extra information for pilot what is happening. So far inav programming does not have any fall back how to inform pilot. With inav programming + custom OSD elements can be replaced for example "Switch Indicator Settings" or any current simple OSD element.

So main question is. Do you want it in INAV? I can continue of work, I'm going to make configurator more friendly to user, and code for INAV make more pretty.

Jetrell commented 1 year ago

I've often thought about something similar to this. In the past. Systems like the Eagle Tree Vector. Had the ability for the user to write custom text fields or warnings on the OSD to suit their needs. It is possible in the programming tab, to write rather complex functions. I think it would be useful to have the flexibility to write a message stating the function, and its state of operation to the user.

An example of this. Was a guy who wrote a fixedwing cruise mode based on airspeed, using the programming tab. It would be useful for him to display the function and the speed setpoint etc. This is just one case. The possibilities could be endless.

error414 commented 1 year ago

Even MWOSD has possibility to write custom messages.

I ignored programming tab in inav for a long time because I didn't see purpose of that, Pawel talked about programming tab in his video on YT, then I started to make sense for me.

Curretly inav contains posibility to show global variable value in OSD, but it's just for exmaple "GV 155" GV + value. it can be used for debuging program but it does not look good for end users, so it's a reasson a created custom OSD element. You are right possibilities are endless :).

For 3 custom elements, and text size 10 chars new functionality raises hex size by 1.7KB

RomanLut commented 1 year ago

Another use case: https://github.com/iNavFlight/inav/pull/7908

ShikOfTheRa commented 12 months ago

It is quite cool. I use same functionality in MWOSD plane to display FLAPS and other. Also for target icons on OSD.