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
Falcon50
Posts: 2
Hi,

I made a landing gear indicator with three green LEDs and three red LEDs.
The operation has been successfully performed with reference to various forums.

Ex, https://www.mobiflight.com/forum/message/6275.html

But in cold and dark, I want to turn off the green LED in conjunction with the battery switch.
But I don't know how. Can you set it?
2020-02-05 13:34
Avatar
VR-FlightSim
From: United Kingdom
Posts: 99
Supporter
You can create another config referring to the battery switch and then add precondition to your gear LED config (only turn on if the battery switch = 1).

Jay
2020-02-05 15:55
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi
The recommendation of Jay is correct..... Whatever it is just the "half" of the system.
NOTE: I will explane the Precondition System and also the Placeholder logic behind !


If we like to refering a indicator for a logic ( Like "Gear LED only on if Battery Switch is ON) we can use precondition..... BUT Then we need Two Configs for each LED ....
The Precondition Logic just say "Config should only work, if Condition is TRUE "

In your example....
You create a Config that Read Battery Switch Status.... Named it for example " BatStatus" .... Its 1 if Bat is ON and 0 if Bat is OFF .
Now you add the Precondition in your current LED Config for the Gear.... And you Say " Only work if "BatStatus" = 1 .

That sounds wonderfull.... But it will not work ! Cause what will happen if you set the Batteryswitch to OFF..... The Config will STOP working as you want.... BUT then no Config is controlling the LED..... That means the LED simply stay ON cause nobody tell it to go OFF and basicly nobodoy controll it finaly at the moment.


To solve this we work with a SECOND Config for the ame LED ..... With opposit Precondition .... And this Config now should controll LED in the "other" situation.
In your example this config got Precondition " Only work if "BatStatus" = 0"
In case this Config should set your LED to OFF the Value must be always Zero..... So you should use Transform "0" or you say for example in Compare "IF Value = 1 THEN 0 ELSE 0 .... Finaly in every case the Value is Zero.... So LED is OFF.
Here its also no mater what offset you choose cause we use always zero already.

Summary:
If Battery is ON then Config 1 is working and show Status of Gear to LED.... If Battery is OFF then Config 2 is Working and show "Zero" .... means LED is OFF.


***************
More easy is the "Placeholder" System cause this not need a second Config.

Basic logic is the Same.... At firt you need also a Output Config that read Battery Switch Status.... Lets call it again "BatStatus"
Now you open your current Config that Controll LED in case of Gear Offset.... And you Enable in FSUIPC Tab the first Placeholder line below.
You Choose "BatStatus" in the Dropdown and give it a Symbol.... lets say "a" . NOW "a" represent the value of Battery Switch.

Finaly you enable Transform line and say .... if(a=0,0,$)
That means.... IF Value form "a" (Battery Switch) is zero THEN set Value of GearLED Config also to Zero (LED is OFF) ..... ELSE (So if Battery is not Zero.... means its 1 and ON) then show "$" Dollar..... Means the current Value of Gear.

NOTE: Maby you still got a IF ELSE Formula here to transform the Gear Offset like if 16383 then 1 else 0 .... Then you must "include" the other logic.
for example if(a=0,0,if($=16383,1,0))

***********
Simply ask if you need more help !
Good Luck !
2020-02-06 08:39
Avatar
Falcon50
Posts: 2
Hi,

Although it was quite difficult, it worked at last with reference to this.

https://www.mobiflight.com/forum/message/7310.html

I didn't notice assigning multiple configs to one LED.
I thought it was an error because the "!" Red mark on the Mappings page.
That was a pause.

It may be premature, but I hope FSUIPC will upgrade to support FS2020.
And I hope that MobiFlight can be used.
Or can you make MobiFlight with SimConnect?
2020-02-07 04:08
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi Again
The ! Symbol show you if a config is disabled.

Note: The Precondition Logic is basicly wonderfull for INPUTS.... Like if 2 Functions should be controlled by one Switch..... Here we basicly have 2 Configs ( one for each function) and a Condition so only ONE of TWO configs is "active" same time.

For Outputs the same is needed but at first it sounds "wrong" cause most users think its enough to "disable" the Config.
Please also note to my recomendation with "placeholders" .

Exactly to prevent users from creating 2-3 Configs for each LED to implement for example the Battery Switch or Lighttest we include this new feature last year.
So it is still posible to make the old precondition system with multiple configs OR you can use placeholders..... Need a bit of scripting in transform formula..... But save you a lot of configs.

**********

About MSFS2020

Your right.... Sebastian also think already about it. At the moment we plan tu support it.
It is to early to tell you "how" we will do this.
Maby Pete Dowson will create a FSUIPC Version for MSFS2020 in a good way and Mobiflight can be used simmular like now.....
Maby Sebastian rework mobiflight completly.... So There is a new Programm like "Mobiflight2020" that only work for FS2020 and we stop work on "Old Mobiflight"
Maby Sebastian rework MF in a way that it can handle FSUIPC and SimConenct same time.
Maby FS2020 will use a new Plattform overall so we will not talk about SimConnect or FSUIPC finaly.

Lets wait until we got a real Alpha or Beta..... Then Sebastian can announce his planings.
Good Luck !
2020-02-07 10:54
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
Hi,

I think that Pete Dowson would not develop a new version because he is aged over 75 and retired. Maybe that his son John Dowson will develop something but so far there is no knowledge about it.
Grüße,
Stephan (Time: UTC+2)
2020-02-07 14:58
icon