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.

Go to page 1Go to page 112Go to page 3Go to page 2
Avatar
alpan
Posts: 15
Hello Pizman,
I tried the third part of your explanation and works fine with offset 66D0. Thank you very much, you're genious. Have a good day.
Best regards.
Albert
2020-04-15 09:33
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Wonderfull


just a last Idea....

As i wrote in initial Posting some years ago.... I think this System for swapp between MHZ and KHZ for all radios ( Com1,Com2,Nav1,Nav2,ADF) can get combined.
You will not change with two hands same time Com1 and Com2.... So its not needed to have a single swap Logic for each Function.

I recommend....

Use only ONE Offset for all Systems .... Call it for example "Radio Swap Status" on 66D0 1 Byte.

All Encoder-Configs ( Whatever Com1, Com2, Nav1 Nav2 and so on) use the SAME Offset as Precondition Indicator.... 0 for one function like Khz.... 1 for the other like Mhz.
On other side you use for all Push Buttons a own input Config.... BUT All configs will write the same Offset ( 66D0)

Result:
If you press one of the Encoder Buttons ( No matter of wich encoder) you always Toggle bettween Mhz and Khz of ALL other Encoders, too... This is no problem cause you not use the others..... So its no mater if they also swap. .... Big benefit.... You need only one Offset finaly !
Good Luck !
2020-04-15 19:03
Avatar
alpan
Posts: 15
Good idea, I'll try this in the future. Many thanks.
Best regards
Albert
2020-04-15 20:33
Avatar
alpan
Posts: 15
Hello Pizman82, I tried what suggested to me on last reply and it works perfectly. Thanks a lot.
Best regards
2020-04-21 14:23
Avatar
mbuto
Posts: 41
Can someone please translate this logic to English? Value= if($>=1800,if($%5==0,$-3,$-2),3697)
It's a nested if, but probably confusing because I don't understand the %5 bit.

Mike
2020-06-17 02:41
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

1. Its recommend to use EventID instead of Offset.... Cause its more easy....
2. If you use a AddOn check if your AddOn itself support a own Input.

3. About your formula. It looks wrong..... It should be if($>1800.... ) not if($>=1800....) The "=" here is wrong an result in a issue at Leftturn at 118.00 Mhz.
also the "double == in the second part is not needed i think..... here a single "=" is enough as i know)
Please tell me WHERE you get this formula !!!


4. "%" is the mathematic Symbol for "Modulo" This is a kind of math action like Addition, subtraction and so on.
Modulo means you devide a number "a" through a other number "b" and the Result is finaly the residue that could not be deivide.
For Example 100 Modulo 30 100%30 is 10 .... Cause 100 can be dived 3 times through 30 ( 90) and then a rest of 10 result but can not be divide again.

In the Com Formula this means..... "$%5=0,$-3,$-2" So if $ ( The current readed frequency) divide through 5 result in 0 THEN Reduce Value by 3 Else ( If Modulo result in a rest of NOT Zero) then reduce 2.

This is used to rebuild the last number that is x.x0 or x.x2 or x.x5 or x.x7
You see if moduu is Zero here the number is 0 or 5 .... So a Minus 3 result in a 7 or 2
If number would be 2 or 7 the modulo is "NOT Zero" so the result is a Minus2 ..... And that result in a correct 5 or 0 again.
Good Luck !
2020-06-17 03:49
Avatar
mbuto
Posts: 41
Thanks!

This code is from the config posted for this project. I'm just building this project piece by piece to learn more about MF.

Mike
2020-06-17 05:03
Avatar
ivota
Posts: 4
[Last edited by pizman82, 2020-08-20 01:36]
2020-07-09 22:54
Avatar
mtalledo
Posts: 5
Hi All,
This is my video with my project of how i went to use only one encoder.
The video is in spanish. :rolleyes:
Regards,

https://youtu.be/0QXf_sgmed8
[Last edited by pizman82, 2020-08-20 01:36]
KL737
2020-08-19 23:38
Avatar
StevenPilot62
Posts: 17
Can anyone advice why in the mobiflight i cannot find the comm1 stby increase or decrease , i can only find in the drop down list there is only comm1 stby

Thanks
2020-08-21 10:20
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Not test this directly but if i remember right the COM1 Active was called only "Com" or "Comm" on some Events. So "Com" is the same like COM1
Good Luck !
2020-08-21 15:46
Avatar
Spike
Posts: 1
Hi. I done this with the new FSMS2020. It worked apart from the toggle. I just read the latest posts and changed the offset to 0x66D0, as Pizman suggested, works fine. Did not work on 0x66C0.
2020-10-06 09:21
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
66C0 is the beginning of the "Free Section" BUT this is also the most common section everybody knows ( there exist a lot of other sections with free offsets, too) .
So if your unlucky then a other Programm..... For example a weather or AI Traffic AddOn or a AddON Aircraft still use some of these Offsets internal for there own. And logical they also start with 66C0 and go forward.

So summary: If you get in trouble with 66C0 that it change it´s value by a strange system itself.... Simply not use it and skip one or more Offsets until you get a realy free offset.
66D0 is a skip of 16 Bytes. This should be perfect in 99% of cases..... Whatever i will say most users not have this problem cause the addons who use those offsets are verry rare.
Good Luck !
2020-10-06 15:43
Avatar
Abtzero
Posts: 22
This tutorial is very important . It should be reworked with pictures!

With the video of the spanisj guy. I understood, how it works.

He does nt use a free FSUIPC offset, but one of the 4th engine, that is not used, because he uses a twin- or single engine plane.

However, he hust uses it as a boolen for two conditions.
In my project I would like to use one encoder for 8 things and maybe more. So I want to change the condition with one single button and cycle through them.
I wouldstore a decimal number into an offset. It can have 256 different values.

Hiw do I do that?
Can the "Store value" field hold more gtha one line?

Lets say the variable is x
On a button press I would like to do something like:
x = x+1;
If x==7 then x=0;

EDIT:
This post was a couple of years old. Maybe before Mobifligzt variables were existing?
Now I found them.
Would it be possible to use a mobiflight variable instead of a free FSUIPC offset?
and how would I set it considering my example above?

EDIT2:
Yeah.I got it!
Made a Mobiflight variable "SetMode"
Set the value formula to
if($<9,$+1,0), because I have 9 differemt states.
and made 9 different actions on my dual-rotary encoder depending on this variable as a condition.
Great! Now I can control all AP values with One dual encoder and one button. Other buttons would be then AP on/off avtivate HDG etc.

I am making this for "blind" use in VR. a little custom "knobster".
What I need now is an accoutsic signal when passing the first (0) mode.
I know that I could use autohotkey tiggered from mobliflight by a keyboard press to play a sound.
If not I would use a lua script (tying to lern how I can start one (sound.play("mySound.wav", devicenumber)) or AAO.
[Last edited by Abtzero, 2023-11-27 23:14]
2023-11-27 19:54
Go to page 1Go to page 112Go to page 3Go to page 2