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! 

Posts: 119

I was thinking about the autopilot in FSX... I do not j¡know how to get this: Each button has is LED.

For instance

I want that if I have ALTITUDE and HEADING ON and also AUTOPILOT ON when I will change AUTOPILOT to OFF, also want the LEDS of HEADING and ALTITUDE will go to OFF. I tried all that I know, but I can´t do it. Thatt´s the reason because I ask if MF has something similar to IF-THEN of Arduino.


I will appreciate any help.

[Last edited by Julesta, 2022-01-14 12:10]
2022-01-14 09:58
From: Bayern - Bibertal, Germany
Posts: 29
That might be what the precondition tab in Mobiflight Connector is for.
2022-01-14 12:56
From: EDDG, Germany
Posts: 1801
Hi Julesta,

what you are trying to do is square the circle...

A LED always shows the status from the simulator, while an external switch should always trigger an action within the simulator. So if you press an external switch, e.g. AP OFF, and you also switch the virtual switch to OFF, that's okay. If the other LEDs in the simulator don't go out, then that's just the way it is because it's set in the simulator. It is simply not desirable that the LEDs for HDG and/or ALT are also switched off.

If you still want it that way, it goes against the logic that has been set for the simulator.

Since it's a simulator, you can build logic with MF that works according to your wishes. It is questionable whether this is useful in the bottom line.
Stephan (Time: UTC+1)
2022-01-14 18:44
Posts: 119
Thanks my friend.

I know that it´s rare question mine.:w00t: :w00t: :w00t: Your explanation is very clever and, after send the question, I was thinking in it and I get the answer to it: it´s not a good idea and simply let it as is ;) but I do not thinked about your explanation.

I can say that thanks to MF (Sebastian...) I have make 3 cockpit . The first one was programming with a hard tool LINKS2FS and it was a big number of hours and to much work. When I discovered MF all is EASY. It´s a great program and very, very clever. However it´s necessary to spend a lot of hours to know it correctly. Other issue is that Microsoft& Asobo each new airplane change the variables and I have to make an MCC for each airplane: mad: :mad: :mad: , but I´m very happy with MF.

Best regards,
[Last edited by Julesta, 2022-01-15 15:15]
2022-01-14 19:54
From: ETSI, Germany
Posts: 5128

Just to give a little more input...

Stephan already said the magic comment.... The master rule normaly is, to do nothing that is "non realistic".


To complete this i think we need to say.... Its possible ( whatever not recommend and not logical)

With Mobiflight it is pretty easy to say something like
"If AP is OFF, then set the Homecokcpit LED´s from ALT and HDG to OFF "whatever" they are still ON in the Sim"
Simply done by a little If-Else in the Transfom field of the two LED Output Configs and a selected Placeholder from the AP Status Data.
Like a Config called "AP Status" that read AP (1 for ON 0 for OFF) .... Lets use it as a placeholder in the LED configs and use symbol "a" for it.
In Transform we say..... if(a=0,0,$)
Means Aslong "a" (AP Status) is currently "0" (Off) then always show "0" ( LED off) ..... ELSE ( So if AP is on) show "$" ( The status of the virtual LED ...e.g. from ALT)

Also the INPUT can be done !
With Preconditions and some duplicated Input Configs you can say something like.....
"If i disable the AP by the AP1 Master Button" THEN Check if ALT and HDG is currently ON..... If YES, then also send 2 Commands to this buttons to set them to OFF immidiatly!"
Means...: We not "fake" the LED´s .... we really set the SIM to the Situation you expect!


But finally as Stephan said..... Both is not logical and not recommend..... But i just want to say. YES it would be possible !
Good Luck !
2022-01-15 21:52