MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

icon
Avatar
dako74
From: LIMF, Italy
Posts: 36
Hi,
I wanted to know if it is possible to change the data shown on a display with a switch.
for example, on a 2-line display I see nav1, I would like to show nav2 when I turn on a toggle switch.
I tried with a precondition but failed.

thanks
2020-05-16 02:40
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3526
Supporter
Hi
Technical Yes.... But a LCD Display is a bit Different here.

A LCD Display is controlled by ONE Config..... So You can not say for example Config 1 should always show NAV1 On first line ..... And Config 2 Should show for example NAV2 on second line ..... Only ONE Config can be Active at same time !

Lots of solutions.... You can work with PReconditions or with Placeholders.

All solutions have one identical step.
You need to use your "swap" Switch and write a CUSTOM Offset with it..... e.g. 66C0 1 Byte INT.
With a switch you say for example on Press = 1 On Release =0 ..... With a Button you can use a toggle like if($=1,0,1) or you can toggle through e.g. 4 modes with if($<4,$+1,0)
Important is..... We finaly read that Offset in a Output Config..... And this is our Indicator what should be shown on the Display.

The final solution can be different....
You can for example Build TWO LCD Display configs..... One with NAV1 and a other with NAV2 .... and you use Precondition.... One config only work if Custom Offset =1 the other only work if custom Offset = 0 So if you press Button or move switch the two configs swaps and you show TWO things on ONE Display!

More complex systems are done with placeholders.....
Here the Config for the Display is always the same..... It always show the Value(s) of the same config(s).
And INSIDE this config(s) we show on the Display we use formulas and other configs to change the hown Data.

In easy words..... If you just need ONE little Logic ( e.g. 2 Values swap by a switch) then preondition is ok.... if you need Complex logics placeholder ar finaly more profitable!
More advanced but finaly this allow everything witch is not possible with a simple precondition !

Maybe this is enough info to solve your problem. Use Forum search for "Customoffset" or "swap"
If you need help with placeholders simply tell me what exactly you need.... then i can help !
Good Luck !
2020-05-16 03:00
Avatar
dako74
From: LIMF, Italy
Posts: 36
THANK YOU SO MUCH...

I must say that this forum is truly excellent and a good source of inspiration. I've seen a few forums where more experienced users don't feel superior, and this is one of the few ... Congratulations!

I leave you a small result of my work:

https://www.youtube.com/watch?v=rX7lku1cxIE
2020-05-16 22:43
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3526
Supporter
Nice work. So i see you understand !

As you find out, we got a lot of deepness here. Simply do your testings..... If you get stuck report to me. In 95% of situatiosn we find a tricky solution that mobiflight do what you expect.
Good Luck !
2020-05-17 02:12
icon