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
StevenPilot62
Posts: 17
Hi i would like to re program my comm1 radio with a single rotary encoder with push button, I have done this in the past so i know it does work but i have just forgotten the settings for the preconditions etc. any help will be most welcome.
2021-02-24 13:30
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5501
Supporter
Not understand the question ?

Do you talk about a Mhz/Khz swap with the push button ??
If yes.... Here the Pushbutton write a Custom Offset ( E.g. 66C0) to 1 or 0 ( if($=1,0,1)
Then a Output Config READ this Offset 66C0 Called e.g. "Indicator MhzKhz"

Finaly you build 2 Input Configs for the Encoder..... One controll Mhz.... The other Controll Khz
Both got a Precondition... Only Work if "Indicator MhzKhz" Config = 0 or =1 for the other.

***********
Hope this helps.... Else tell me what exactly you need.
Good Luck !
2021-02-27 13:53
Avatar
StevenPilot62
Posts: 17
thanks a lot it worked
2021-03-03 17:00
Avatar
StevenPilot62
Posts: 17
sorry about asking again , would like to create the encoder button to change from mhz to khz and visa versa, i know you explained this ut i dont seem to get through it now. Last time i did manage it.
2022-06-20 20:14
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5501
Supporter
Hi

Meanwhile we have "MF Variables"
So there is no longer need to use a Custom Offset on FSUIPC for that. It still work that way.... But its more comfortable to use the MF Vars today.

The basic logic is still the same.

Your Button will "toggle" a Variable .... Mostly we use as input value here if($=1,0,1)
Means if you press the button then the value of Variable change. If its currently 0 it is change to 1 .... If its 1 it change to 0.

Then we Read this Custom offset or MF Variable with a output Config to have a indication . Lets call it "Swap Info"

At last we use this Output Config Value as a Precondition in a other Config.

E.g. Two Configs are used for the Frequency.... One Config change Khz, the Other change Mhz.
The first got Precondition " Only work if Config "Swap Info" =0" ..... The second use " Only work if Config "Swap Info" =1"

Means at the End.... When you press the button you toggle the indicator.... And related to this indicator only one of the two Inputs work.


Same work for Outputs also.... E.g. you create 2 Configs for a 7Seg Display. One show COM1 the other show COM2.
Again 2 Preconditions.... So we can press a Button und toggle what Display should show "!
Good Luck !
2022-06-21 14:50
icon