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
jwmobi2
Posts: 3
I loaded MobiFlight v 8.1.4 and I'm using an Arduino Mega256.
Followed the first tutorial "Your 1st LED"
Everything checked out on the config wizard display tab - I press Test and the led lights, Stop and it turns off.
So back on the main window - with "Active" checked, I start MSFS2020.
After the sim is running I get 3 green checkmarks at the bottom - Modules, FSUIPC, and SimConnect.
I click Test and the LED pulses rapidly, don't know what that means but at least I still have a connection to the arduino mega.
I stop the test and click "Run".
Here's where it goes wrong.
I go into the sim in the Cessna 172 and operate the parking brake - no LED lights - either on or off - nothing.
MobiFlight shows "Running...", Active is checked.
What have I missed? Would like to get past the first tutorial.
Thanks for any ideas.
2021-05-08 19:02
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

At first... there are TWO "Test" Functions.

The first is within each config (output) in the Display Tab..... this TEST just simulate a "high" on the Device you use for. ( As you said this test is working)

The second ( next to the RUN/STOP Buttons) is a Global Test.... Means every Output that is used in a config ( e.g. 100 Configs 100 Leds) will shortly light up... all in a row. This is to test from time to time if all LED are working.
In YOUR case.... Your config only include one single config line..... So the blinking is extremly fast..... If you would have 20 Configs and 20 led they would blink in a sequence and the first one would bling e.g. 1-2 seconds later again ..... So.... Bacause you only got one config, only one led blink and that looks extremly fast.

***********
About the Problem.

The Tutorial was written years ago long time before FS2020 was released. May something is change there. I can not test it cause i not use FS2020.
Please make a workaround....
I see in the tutorial the long time removed "multiply" field is used.
Just use Offset 0BC8 2 BYte INT And NOT use the Transform field. ( Let it empty)

Please report if problem is solved..... If yes we really need to rework the tutorial a.s.a.p.
Good Luck !
2021-05-08 21:13
Avatar
jwmobi2
Posts: 3
Sorry, no change.
I used Offset 0BC8 2 Byte INT And did not use the Transform field.

Just to make sure I understand the correct behavior:
This is an OUTPUT from MSFS2020 to show me the Parking Brake status via an LED being on or off, correct?
When MF is running and I toggle the parking brake in the cockpit I get no indication through MobiFlight.

Is there some newer list of offsets the config function could use?
2021-05-09 03:01
Avatar
jwmobi2
Posts: 3
Further investigation:
I used the logging function in FSUIPC7 and monitored offset 0BC8.
It shows 0 when the parking brake is off and -1 when it is on.
So, that offset appears to be correct. MobiFlight is not picking up the status change.
2021-05-09 03:06
Avatar
dieterp
Posts: 6
Supporter
The following works for me
In an output:
Use preset -'Controls-Brake parking'
click on 'use' to fill in the fields (0x0BC8 - int - 2 - 0xFFFF)
In transform enter - if($=0,0,1)
The if statements has to be in small characters
If you want to turn on a LED then in the Display Tab fill in the required fields
2021-05-09 04:46
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi Again !
iconjwmobi2:


Just to make sure I understand the correct behavior:
This is an OUTPUT from MSFS2020 to show me the Parking Brake status via an LED being on or off, correct?
.......
Is there some newer list of offsets the config function could use?



YES
For older FSUIPC (v3-v6 and XPUIPC) and the older Sims (FS9 FSX P3Dv4 P3Dv5 Xplane) this Offset work and represent Parking Brake.
In case FSUIPC7 is again just a further development of the older versions its logical to assume it is again the correct Offset Adress. And one posting later you self confirm this!

Next time.... There is a List 100% UpToDate always in your FSUIPC Installation included.... That list is always for the version you currently use. It called "Offsetstatus" or so.
Some Offsets change within the time.... So its good to check this list if you get into trouble !

*****

iconjwmobi2:

Further investigation:
I used the logging function in FSUIPC7 and monitored offset 0BC8.
It shows 0 when the parking brake is off and -1 when it is on.



Yes and No !

You use the wrong setting for your Logging pretty sure.
Offset should be 0 for OFF and 32767 for ON .
If you read the Offset ( in the FSUIPC Logging) with the wrong setting this happens.
32767 in UNSIGNED = 32767 .......... 32767 in SIGNED = -1

So The Offset Do what it should do..... You just read it wrong way !

******

Whatever..... This not tell us where the problem is.
In MF ( If all settings are correct) it will light the LED ..... Whatever the value is "1", "32767" or "-1"
For MF a LED is a Bool System.... 0 = OFF ..... ALL OTHER Values = ON

So the IF Condition from Dieter is cosmetical..... But it not solve a Problem..... the LED should light already without use this formula !

*******

LAST IDEA !!!!!
Please Confirm you enable the Hook Checkbox left of your Config Line. And Confirm you have no Precondition or so that blocks the Config !


If this also not work i need to see your Configs..... May we can make a shared Screen in Discord.... or you can send me Screenshots there !
*******
Good Luck !
2021-05-09 11:56
Avatar
dieterp
Posts: 6
Supporter
iconNote:

In MF ( If all settings are correct) it will light the LED ..... Whatever the value is "1", "32767" or "-1"
For MF a LED is a Bool System.... 0 = OFF ..... ALL OTHER Values = ON



This is something that I did not know and this is why these forum post and the discord server help a lot in learning about MF.

However in my own case I do things a little different. My system has a total of 7 LEDs and in different planes they might be used for different purposes. So each LED is defined in the output section. I then use a config reference, in this case the Parking brake which is defined in another output. If I don't use a transform on the LED output definition then the LED will not turn on. Why, I don't know.

If I configure the LED directly in the parking brake output then I don't need, like you said, the transform, but this is just the way I prefer to do it.
2021-05-09 13:53
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
icondieterp:


However in my own case I do things a little different. My system has a total of 7 LEDs and in different planes they might be used for different purposes. So each LED is defined in the output section. I then use a config reference, in this case the Parking brake which is defined in another output. If I don't use a transform on the LED output definition then the LED will not turn on. Why, I don't know.



Thats correct and in case of the used calculation !

As i said.... For a LED Output it is easy..... Value "0" is OFF ( FALSE for the system) ..... If Value is "NOT 0" e.g. -1, 1, 12345 it is ON ( TRUE )
BUT
Without a Transform like a if condition the Value remains ..... So The config for example shows 0 or 32767 ! Not important for LED but verry important for further usage.


Lets say you now like to build a PRecondition somewhere else and you like to use the Parking Brake Config as Indication ......
If you say in that Precondition " Only work if "Parking Brake Config" = 1 then this will not work..... Cause that config is never "1"..... Its "0" or "32767" .
SAME happend with placeholders.... You define PArking BRake Config as "a" and say in a formula something like if(a=1,xxxx,yyyyy) this also not work.... Cause it can not be "1".

Result: If you use those things for Precondition/Placeholders then you need to be carefull !
Way 1..... You clean up the value in the Initial Config ( Like your formula to bring Parkingbrake in a clear 1/0 format)

Way 2..... You build the PRecondition/Formulas more logical.....
For example in parking Brake your condition must say "Only work if Parking BRake Config = 32767" .... Or "Only work if Parking Brake Config is NOT 0 "!=0" "

You see lots of ways..... Important is to understand the basic idea behind !
Good Luck !
2021-05-09 14:57
Avatar
dieterp
Posts: 6
Supporter
Just want to thank you for the detailed explanation. It helped me to see things differently. For me the subject is now closed and I hope that jwmobi2 also found the solution to his problem.
2021-05-09 15:42
icon