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
pongi16@gmx.at
Posts: 4
Hello everybody,

I've built a box with 5 Led's. Only controllights for beacon, taxi, Nav, landing and strobe lights. It works fine but I will that these lights only run when the battery is on. How can I do that?

Thank you very much!
Andy
2023-03-05 17:27
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

Simply include this Condition into the Formulas.

At first create one Output Config that read the Sim Battery Status ... Mostly done with the "Master Battery Switch" . More detailed can be the Master Bus Voltage... Cause extremly the Bat Switch can be ON but the Battery is discharged and also no LED will light.
So lets expect you use Battery switch and we know that Value is 0 for OFF and 1 for ON. Lets call this Output Config now "Bat Status"


Now in each single LED Output Config you like to work with this logic you enable a "Config Reference" (Section below the Variable Entrys)
Choose for a new Line.... Enable the Checkmark ..... Choose for Config "Bat Status" from the List .... And choose for a Placehodler Symbol ..... Lets say "a"

NOW you can use the Value from "Bat Status" by type "a" within a formula.

In Transform you can now e.g. say..... if(a=0,0,$) Means IF Value of "a" (Bat Status) is Zero, THEN show 0 (LED Off) ELSE (So if Bat is 1) show $ (Value from LED in Sim).

More easy is to simply say in Transform : $*a (So we multiply the Value from the LED with the Bat Status.
If Bat is 0 then result is always 0 ...... 1*0=0 ----- 0*0=0 .
If Bat is 1 then result is the LED Status .... 1*1=1 ----- 0*1=0

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

With same Logic you can also include a Light Test System.
Lets expect Lighttest is also in a Config.... 0 for OFF 1 for Lighttest Running.

Use it as a second Reference and name it "b"

Now we can say Transform ($+b)*a
We still multiply with Battery.... So LED and also Lighttest only work if Batery is ON ( Else always 0)
If Lighttest is ON then b is 1 .... Means we add +1 to the LED Value.
If LED is currently On in Sim then 1+1=2 .... So it still light.
If it would be OFF in Sim then 0+1=1 Means it light now in case of Test Button.

If Lighttest is OFF then we Add +0 means nothing happens.
************

If you need more help..... Simply ask !
Good Luck !
2023-03-06 11:40
Avatar
pongi16@gmx.at
Posts: 4
Thank you very much!! :)
2023-03-06 22:58
icon