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! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
delta_tango
Posts: 2
I have this scenario:

one LCD 16x2
one toggle switch ON-ON
one push switch
one encoder with push button

What I try to achieve is: toggle switch jump between COM1 and COM2. The LCD shows active and stand by freq. for COM1 and COM2. The push button swap between ACT and STBY freq. The encoder push button switch between kHz and MHz.

I manage to make the toggle button the change the COM1 and COM2, the bush button to swap the ACT and STBY freq. this as a function of COM1 and COM2 displayed.

I am stuck with the encoder, as the encoder has already the precondition to swap between kHz and MHz, but I need it to be aware of what COM is active.

Can we add to preconditions for the encoder? Perhaps AND?
I have no idea how to achieve this.
Any help is much appreciated.

Cheers
2022-10-25 00:07
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

You can see the basic idea in a lot of Videos.... For example that one.... https://www.youtube.com/watch?v=DZuVu4qU9Uc

Basic Idea:
For The LCD one Output is enough.... Cause it show COM1/2 same time.
You have to create "One Set" of Input Configs for each Situation.

At first you have your ON-ON Switch. this only need ONE Config.... Cause all its do is toggle a Variable between 0 and 1
If in Pos 1 the Variable have to eb "0"..... In Pos 2 the Variable have to be 1 .
With this we say what "Mode" is active ( COM1 or COM2)

We also need now a OUTPTU Config that read the used Variable..... Lets call it MODE to use it later in the Preconditions!

The other Configs need always a Set of 2....
E.g. For the Swap Button you need TWO Input Configs...
Both use the same Button..... But one need to swap COM1..... The other need to swap COM2
And both need there Precondition.... The first Only work if MODE = 0 the second only work if MODE =1 .

Same logic for the Encoders.... You need at first 2 Configs for the Khz Encoder Input.
The first only work if Mode=0 (Com1) and again the second only work if Mode=1 (COM2)

Additional you need for your Khz/Mhz idea a Input for the Encoder Button.
It once again will toggle a own MF Variable.... Input : if($=1,0,1) So every press toggle a between 0/1 !
Lets call this second Variable e.g. "Hz Mode"

So at te End you need 4 Configs for the Encoder....
Config 1 set COM1 Khz ..... It say Only work if Mode=0 (Com1) AND only work if HzMode = 0 (Khz)
Config 2 set COM1 Mhz..... It say Only work if Mode=0 (Com1) AND only work if HzMode = 1 (Mhz)
Config 3 set COM2 Khz ..... It say Only work if Mode=1 (Com2) AND only work if HzMode = 0 (Khz)
Config 4 set COM2 Mhz..... It say Only work if Mode=1 (Com2) AND only work if HzMode = 1 (Mhz)

***********
Please watch the linked Video.
If you not be able to handle this.... Ask here again where you struggle. I will help you !
Good Luck !
2022-10-25 00:24
Avatar
delta_tango
Posts: 2
Thank you very much for your reply. Much appreciated.
I'll give it a try, thanks for the encoder setup details.
Cheers
2022-10-25 02:00
icon