Skip to content

Conversation

kernel-machine
Copy link
Contributor

Added the ability to change OSD layout with global function.
It can be useful for example to show a layout with gps coordinates when the distance from home is major of a certain threshold, while a layout without GPS coordinates will be showed when the UAV is near.

@kernel-machine kernel-machine changed the title gf_set_osd_layout Set OSD Layout with global function Jul 10, 2020
@kernel-machine kernel-machine changed the title Set OSD Layout with global function Set OSD Layout with global functions Jul 10, 2020
@kernel-machine kernel-machine marked this pull request as ready for review July 10, 2020 10:33
@DzikuVx DzikuVx added this to the 2.6 milestone Jul 12, 2020
@DzikuVx DzikuVx merged commit 127bec5 into iNavFlight:master Jul 20, 2020
@kernel-machine kernel-machine deleted the gf_change_osd_layout branch July 21, 2020 13:14
@CertainBot
Copy link

CertainBot commented Dec 24, 2020

Great addition! Thanks @kernel-machine. Sadly there is a case when the GF (global function) wont work, not a bug just how its performing now. If the OSD layouts are activated in the MODE tab so that they can be selected with a switch, GF is unable to change the layout.

I would have liked to have a certain OSD layout activating upon going into waypoint navigation but that does not work since all three OSD layouts are governed by the assigned switch. Only if the switch is in a position not driving the OSD mode, then GF can take over the OSD layout.
Thanks

@kernel-machine
Copy link
Contributor Author

Great addition! Thanks @kernel-machine. Sadly there is a case when the GF (global function) wont work, not a bug just how its performing now. If the OSD layouts are activated in the MODE tab so that they can be selected with a switch, GF is unable to change the layout.

I would have liked to have a certain OSD layout activating upon going into waypoint navigation but that does not work since all three OSD layouts are governed by the assigned switch. Only if the switch is in a position not driving the OSD mode, then GF can take over the OSD layout.
Thanks

It can be implemented for the next release, sincerely when I'm implemented this feature I haven't thought at the OSD layout modes, but this is an user preferences, someone prefer that LC override the OSD modes and someone prefers viceversa

@CertainBot
Copy link

I have found it by coincidence. Unfortunately everyone who uses OSD modes has a selection through a channel which will prevent the GF from working. I am unsure how difficult it is to implement but I believe that might be the best scenario:

-If OSD GF is True it overrides OSD Mode until False.
-If OSD GF is True but channel driving OSD Mode changes, priority returns to OSD Mode until OSD GF is recycled.

That way during the triggering event OSD GF will be displayed unless the user manual selects an OSD Mode in which case OSD GF is no longer important until next time it is triggered.

What do you think about?

@kernel-machine
Copy link
Contributor Author

I'm not convinced for the second scenario

-If OSD GF is True but channel driving OSD Mode changes, priority returns to OSD Mode until OSD GF is recycled.

I must think about it

@CertainBot
Copy link

I'm not convinced for the second scenario

I can see one flaw, it is when the OSD layout is only reachable through OSD GF but not through OSD Mode. If the user changes to OSD Mode he cannot come back to the initial layout unless recycling the OSD GF. In some cases thats not feasable, for example when the trigger is starting a WP mission, as recycling the OSD GF means restarting the mission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants