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
opus
Posts: 15
I want to create an Input-Switch which is supposed to turn ON an indicator. The switch state is NOT connected to any simulated value.
I want to display the (connected) values on the indicator only if the this switch is in the ON position.
I figured such is possible using a Precondition, what I don't get is how to use this switch state in the Precondition.

Use case: Turn&Slip Indicator, indicating Turnrate, Turn-coordinator ball position and Power Flag (all working). This indicator has a seperatly switchable power source, I want to use the position of that switch to turn ON the indications..
2021-12-23 13:48
Avatar
opus
Posts: 15
With a bit more thinking I found a solution( sort off) myself.
For the above mentioned switch I will use a swich setting ( like offset 0378/ not tested yet) that will not be used by instance. That way the documented way of usage for a precondition would work.
2021-12-24 13:16
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

Basically this is "strange".

In Cockpitbuilding we have a simple rule....
INPUTS controll a element within the simulated Aircraft.....
OUTPUT show the status of the simulated system.

"Normaly" we not indicate something to a real switch position! ( Only in improvisional solutions if the software block us)


So in your case....
The Real switch you use "should" controll the virtual Switch ( that indicate if the power is on) .....
And the Outputs should also use a precondition the Value of the VIRTUAL switch only..... Not the Real switch !

Thats the only way to get the Virtual Cockpit and the real Cockpti "sync" !

********************

Solution:
If there is no way to handle this correctly.... You need a improvisional Solution.... And thats done with a Variable and a Precondition !

The real switch must write a Variable ( Best way MF Variable or a free FSUIPC Offset) e.g. to "0" (Off) and "1" ( On)
Then you READ this Variable with a Output Config.... Call it e.g. "Status"

Finally you can use this Indication in your Output Configs.
For example you can say the Turn Indicator should show the current Value..... But only if "Status" =1 else it should show e.g. full left position.
Same for LED.... You can say "Aslong "Status"=1 show virtual cockpit value.... Else show all time "0" and let the LED stay Off"

***************

Alternate:
Electrical Solution.....
You can think also about a "cut" of a line.....
E.g. if the Switch simply is connected to the GRD Line of the effected Outputs..... Then all LED/Servos are out of Power aslong the switch is on OFF Position.

************

Summary:
Possible with improvisional ideas..... In Hard or Software.
BUT
Best way is to work with the Sim Aircraft Switches.... Only use this if there is fully no other way !
Good Luck !
2021-12-24 20:01
Avatar
opus
Posts: 15
Thanks for the reply and " Frohe Weihnacht"!

Actually I was trying to describe the same as you in your "solution". I should have used the term "real switch"!

Sorry for this unclear posting.

What is new to me was the "MF Variable", I was looking for something like that (if I understand correctly) . Where can I declare such?
[Last edited by opus, 2021-12-25 15:18]
2021-12-25 08:31
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
The MF Variable is a new Feature..... We not have any Guides or Tutorials till now.
It come to mobiflight some months ago.


BUT..... Basically its nothing "new"..... Its just a new way, simmular to the old "FSUIPC Custom Offsets". So in easy words.... Just Memory Slots!

In the Past ( FSX, P3D) we have to work with FSUIPC by default.
So if we need "Memory slots" we simply use the free FSUIPC Offsets..... Cause we still work with it. So it was easy and already possible.

With FS2020 we have our new own WASM System so FSUIPC is no longer needed. BUT for sure we still need Mem Slots for things like those switches you like to build.
In case it would be totaly unlogical to use FSUIPC just to have the Mem Slots Sebastian decide to impliment "own Memory" into Mobiflight.

Result:
People who use FSUIPC ( Whatever FSX, P3D or FS2020) can already work with the old logic.
But Everybody can also use the new System! .....

Finally..... The Mobiflight Variables are much more powerfull like FSUIPC Offsets. There is no longer a limitation, a bypass or a feelable lagging.
We recommend to use always the MF Variables if you build something new !
Good Luck !
2021-12-29 20:47
Avatar
opus
Posts: 15
Thanks for this explanation :thumbup: :thumbup: !

"Guten Rutsch in Neue Jahr"
2021-12-31 13:47
icon