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
MadTrooper
Posts: 52
HI, again Thank you for Mobiflight! Its great.

I`m still new at Mobiflight and just to try it out I have installed an output LED on the Parking Brake just like the one in the tutorial and it works great. Now I would like to set a precondition so that the LED will not lit unless the Master Battery is ON. If I go on the precondition tab of the configwizard how do I set the desired condition? please be specific (including codes if any). It would really help.

Thanks in advance.

MadTrooper
2017-02-26 03:58
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hello MadTroper

First sorry that isn´t already in the Turtorial or Faq Area... I´m still working on new turtorials but this take time.
For now please use search function of the board.... Lot´s of things (This, too) are already discribted in the Topics. If you speak german it will be greate. Else you need to use translator maby.

To help you i will explane this part here again.....

Basic Info:

-A Precondition in Mobiflight is based "True" .... Its like you say " Only work if defined condition is TRUE"
If you say "Only work if Battery switch = 1" Then Battery ON (1) is TRUE and config enabled.... If Value of BatterySwitch is Off (0) its FALSE now and config is disabled now.

- A Precondition need a Value to work/Compare. You can use a Output Config Line for this to say " Work if value of "Config xyz" = ?? .
In Youre example you need a Output Config for the Status of Master Battery Switch !

-LED Problem !
Mobiflight got a Code that have a little Problem with LED Status. Maby Sebastian will change this in the future but at the moment we must use a special logic to work with LED Outputs based on Precondition......
The "bug" is, that a LED need a direct ON or OFF command..... If we disable a LED Config by a precondition, then the Config stop working in Mobiflight.... But the Status of the LED we control with this config not change ( Cause nobody controll the LED now when config is disabled ) .
To solve this always remember...... For LED you need a Active Config ALL the time ! So we must create a Second Config for this LED that worked if the first config is disabled by the Precondition..... To prevent issues THIS 2nd Config itself must be disabled by precondition, too aslong the First Config is active.... Only ONE Config should be active same time !

******************
Guide for youre Situation ( Parking Brake LED witrh MasterBattery )

Here you need 3 Output Config Lines.

1. The Standard Parking Brake LED Config.
(Use Preset from Example or Offset 0BC8 INT 2Byte )

2. The OFF Config, that controll our LED to OFF when Batteryswitch is off.
(Use any Offset here... Maby 0000 , (no reason) Use Compare IF Value=1 THEN 0 ELSE 0 ...... to set Value always to Zero..... Set same LED in DisplayTab like in Config 1

3. A Read Out Config for the Status of MasterBatery. Here you NOT need a Display. This is just for our precondition.
(Offest 281C INT 4Byte 1=ON 0=OFF )

Now we need Preconditon to let this work.....
The 1. Config (Standard LED) got Precondition: Only Work if Value of " Read Out Config3" is =1
The 2. Config (OFF Config Parking LED) got precondition : Only Work if Value of "Read Out Config3" is =0

******************
If you do that, then Config 1 Will work aslong Battery is ON. Config 2 Works only if Battery is Off.... Config 1 shows the real Status of LED in relation to the Parking Brake..... Config 2 ignore the Status, and set the LED always OFF aslong the Battery Switch is on Off Position.

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

Hope you understand. Try Out.... If you need more help please ask here.
Good Luck !
2017-02-26 07:34
Avatar
MadTrooper
Posts: 52
HI pizman82,Thank you very much for taking the time to explain this to me. believe me, I have read a lot of treads here on the forum trying to understand this but so far I was still confused. Your explaination makes sence and I think that I understand better now. I'll try to do this hoping that 7 I understand it right. I also read the treads in German with the google translator but I was still confused.

Thank again for helping me. It is greatly appreciated.

MadTrooper
2017-02-26 20:41
Avatar
MadTrooper
Posts: 52
HI Pizman82, the only thing that I'm not sure is this:

when you say: ''3. A Read Out Config for the Status of MasterBatery. Here you NOT need a Display. This is just for our precondition.
(Offest 281C INT 4Byte 1=ON 0=OFF )''

Do you enter the values here? and in what form? just like that? 1=ON 0=OFF ?


or here like this ?



Thank you!
2017-02-26 21:49
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Sorry... Bad explaning.... :blush:

This config NOT need a Transform or a Compare....

I said only "1 = ON 0 =OFF" to explane you what value this offset can show. You NOT need to enter this! My apology.

It´s important to understand and knowing the posible values of an Offset if you use it for a precondition....
For Example the Gear Status is not 1/0 .......It´s 0 for UP and 16383 for Down.... Here you need to say maby " Only work if value is 16383"
So this data was just for youre information, that you know how to handle it. !

EDIT:
And don´t worry .... The translator is crazy sometimes... If you don´t understnad what you need just ask again in English and maby link the german thread.... Then i can translate it or awnser again in my own words..... Just ask !
Good Luck !
2017-02-26 22:11
Avatar
MadTrooper
Posts: 52
Thanks for your quick reply Pizman82.

I did it and it worked but when Battery is ON and Parking brake is ON, the LED is flashing instead of staying ON. Would you know what is the problem?

Thanks.

MadTrooper
2017-02-26 22:47
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconMadTrooper:


I did it and it worked but when Battery is ON and Parking brake is ON, the LED is flashing instead of staying ON. Would you know what is the problem?



That can heave 2 reasons.....

1. You not "reset" youre Board/Config.
If you change LED Configs sometimes the LED "bug" a bit. For example when a LED light up already (MF Connector runnig) and you change a config entry... Then the Config tell the LED it should be OFF but it´s alredy ON from the last Config that not exist at the moment.
You can solve this by using the "Test" Button in the Config/Display Tab. OR You Save youre config and Close/Restart Mobiflight.
This is just a temporary Bug occure from changing settings and will be solved after restart.

****

2. You got a Error in youre Config.
A flashing LED can be a evidence for a double Config line..... Means One Config wan´t the LED to OFF and another want to set it to ON ... both at same time.

Please check the Mobiflight Window.... If youre Configs workes correct there have to be a RED exclamation Point "!" left of the Config if its Disabled.
In our Example if Battery is ON the 2. "OFF Config" must be disabled (! must be shown)
If Battery is OFF then the Original Config need to be disabled shown by the red "!"

All 3 Configs ( The readout to) must be set to active in the Checkbox ! If there is NO Disabled Config while running, then youre preconditions are not working correct.
Please check this !
[Last edited by pizman82, 2017-02-26 23:49]
Good Luck !
2017-02-26 23:23
Avatar
MadTrooper
Posts: 52
HI Pizman82 and thanks again for your help.

Here is what I got:

There is a white on red exclamation mark to the left of the Parking Brake config when the Battery is OFF. It goes away when Battery in ON but there are no other exclamation mark at anytime beside the Battery OFF config.

In the configwizard window on the Battery OFF config I have - comparison settings with a check mark in the box with the following values

if current value is = 1
set it to 0
else set it to 0

this should work right ?

MadTrooper
2017-02-27 01:52
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hello again... And thanks for detailed reply...

Nice workaround.... We came close to the problem !
Your quoted Compare is correct ! ( So it´s no matter what offset you use for this, cause you compare every posible value to zero "0" )

If the "!" is not shown at any time in the Off Config ( Battery On or off) the reason must be in the "Precondition" Tab of the "Battery Off" Config (OR in the Readout Config of Battery Status)

Please check first the Precondition Tab....
Precondition must be here.... Only work if Config "Battery ReadOut" is zero =0 ... Ensure the checkmark on Precondition is still on and you choose the right target config.

Be 99% shure the issue was here and you solved the problem already.....

If this not work finaly you have to check your "Readout Config" ( the 3.rd Config to scan Battery Status i told you before) .... This should have NO Compare or Transform !
If you did a mistake here and use for example a compare like "If Value =0 Then 5" then we have a problem..... Our precondition say.... Only work if value is 0.... But this compare would say " Never go Zero.... Always show 5 if original Value would be zero."

Hope this finaly will help you and you learn a lot about preconditions.... Next step you can do this aloane ! This technic work for all functions in cockpit by same way !
Good Luck !
2017-02-27 09:43
Avatar
MadTrooper
Posts: 52
HI Pizman82, thanks again for your help but it did not work. I have checked both preconditions and tried different combinations like =1 or =0 on boths of them but still it will only work if the preconditions are like you mentionned at first:

Now we need Preconditon to let this work.....
The 1. Config (Standard LED) got Precondition: Only Work if Value of " Read Out Config3" is =1
The 2. Config (OFF Config Parking LED) got precondition : Only Work if Value of "Read Out Config3" is =0

So therefore on my Parking Brake config I have the following preconditions:

Master Battery read out config=1 (AND)
Master Battery is OFF=0 (AND)

But still no matter what the LED is flashing.

I don't get it, it should work. I dont know ?

MadTrooper
2017-02-27 18:58
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi Trooper :lol:

It´s sometimes difficult to explane those settings without Pictures. We realy need more visual Turtorials i see. Please be patient. I work on !
I know these function will work 100% on every system. Shure there is only a little issue while you rebuild the config from my description.

Last try i summery write this down. If not helping please contact me by Emal ( pizman@freenet.de) So i can send you a mcc file and you "see" how it workes yourself.

(Names of the configs i don´t know. You need to know the names you use ! )
1. Config: "ParkingBrake LED" .......(Parkingbrake Offset) NO Transform NO Compare ..... Precondition Work IF "READ Batteryswitch" = 1 Device Youre LED
2. Config "ParkingBrake LED Blank"....... (Whatever Offset) NO Transform Compare: If 1 Then 0 Else 0 .... Precondition Work IF "READ Batteryswitch" = 0 Device Same LED
3. Config "READ Batteryswitch" (Batteryswitch Offset) NO Transform , NO Compare , NO Precondition , NO Device

*****

iconMadTrooper:


So therefore on my Parking Brake config I have the following preconditions:

Master Battery read out config=1 (AND)
Master Battery is OFF=0 (AND)

MadTrooper



That part confusing me at all.... Do you use this 2 Preconditions in ONE Configline ??
Hope you understand with guide from above... You need ONE Precondition per Config.....

OK . If working ok..... If not send me a Email please !
Good Luck !
2017-02-28 09:15
Avatar
MadTrooper
Posts: 52
HI Pizman82, just sent you an email. Thanks again!

MadTrooper
2017-02-28 17:01
Avatar
MadTrooper
Posts: 52
HI Pizman82, I finally got it thanks to you. Its amazing how well it works now.
:w00t:
I was able to figure it out with your last explainations.

Well Thank you very much for taking your time to help me. I appreciate it a lot!.

MarTrooper
2017-02-28 20:32
Avatar
MadTrooper
Posts: 52
I just want to let you know that I was able to apply the preconditions for the battery ON and OFF to the Gears. Now the green lights are only ON when the Battery is ON.

Many Thanks Pizman82.

MadTrooper
2017-02-28 23:07
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
:thumbup:
Nice that it workes !

Hope i find time to use this situation for a new turtorial section next time......
Would be perfect... After "ParkingBrake Button" and "ParkingBrake LED" the "ParkingBrake Precondition" will be a nice next Turtorial Step !
Good Luck !
2017-03-01 01:59
icon