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
Pietrogramma
Posts: 19
Hi,
I would set mobifight for the Beech Baron B58 flap's.
I set correctly the toggle switch for the three flap's position and now I must set the annunciator leds... Red Led (for the transition movement of the Flap), Blu LED (for APH position) and Green Led (for DN position), can you help me with the setting?

Thanks and ciao
[Last edited by Pietrogramma, 2018-09-23 18:49]
2018-09-23 18:41
Avatar
Pietrogramma
Posts: 19
Yesterday, thanks to the help of some posts read here, I managed to set the LED of the announcer of the B58 Flap Panel.
If you are interested, you can download the image with the settings by clicking here: https://www.dropbox.com/s/6v97zz8i31qhh45/Flap_setting.jpg?dl=0
Thanks and ciao
2018-09-24 14:35
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
Hi Pietrogramma,

why did you take the offset only for the left flap-indicator? If you take the offset 0x0BDC you have the offset for both sides.
Grüße,
Stephan (Time: UTC+2)
2018-09-24 16:59
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

This is working but it is to much difficult i think..... So Other users should NOT rebuild that !
As Stephan said... 0BDC will give you the Value for both flaps ( But this is no problem or issue)

About Configs

1. The Fist RED Config is ok .
Here you like a LED illuminated while Transition. It should be OFF on Value 0 , 8192 and 16383 ... Your Transform is 100% correct

2. The BLUE Config is to difficult.
You like the Blue light ONLY if Flaps are MIDDLE 8192 it should not light while Flaps OFF (0) Flaps FULL(16383) or while Transition
So Simply use Transform if($=8192,1,0)

3. The ORANGE Light is to difficult, too
You like the Orange Light ONLY if Flaps are FULL (16383) ... It should be off in all other Situations
So simply use transform if($=16383,1,0)


If i not understand your logic and it should work different then sorry.... But then your config will also not work cause MY Solution do the same like yours but without 2 unneeded ELSEIF parts !

Have fun !
Good Luck !
2018-09-25 12:38
Avatar
Pietrogramma
Posts: 19
Thanks StephanHo, Thanks pizman, this evening I will config has you say.
Thanks very mutch and ciao
2018-10-01 14:22
Avatar
Pietrogramma
Posts: 19
I'm definitely missing some settings, but using your values ​​does not work
It work if I use offset 0BDC, with 4 bytes and the values for every LED are:
LED RED (transition flap): if($=8192,0,if($=16383,0,$))
LED BLU (AHN position): if($=0,0,if($=8192,1,if($=16384,0,0)))
LED Orange (DN position): if($=0,0,if($=8192,0,if($=16383,1,0)))

Here a dimonstration video with my values: https://www.youtube.com/watch?v=qu0GpcXAtOs
Thanks very mutch
2018-10-02 16:06
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
You Pretty sure get a syntax error while rebuild "my" recommend inputs.
By the way.... Your Function is not wrong ! If it work it is OK.... I just want to show you and other users a more easy solution.... And finaly i think we should not use difficult things if it is possible more easy to make a programm short as possible. Every line we can save make your System more stable and faster.

****
Basicly i just simplyfy your idea in ONE If/else function ( where you use 3)

Lets make a example and use "words" instead of syntax function.

iconQuote:

LED BLU (AHN position): if($=0,0,if($=8192,1,if($=16384,0,0)))



You say... IF Value is "0" then it should set to "0". If it is NOT "0" but it is "8192" then it should set to "1" . If it is NOT "0" and NOT "8192" but it is "16384" then it shouldbe set to "0" . Finaly you say with the last ",0" that ALL Other Values (that are NOT "0 , 8192 or 16384") should be also set to "0"

So summary 0=0 , 8192=1 , 16384=0 , ALL OTHER=0 .... And that is in Simply words.... ALL Values EXCEPT 8192 should be 0 ...Only 8192 should be 1

And now "my" solution is if($=8192,1,0)
Here it say.... if value is exact 8192 then set to 1 .... In all other conditions set to 0.

You see.... This short function did the same thing like your "long" version.

***
Summary: A Function can be done in lots of ways.... All are correct... But it is recommend to choose the more easyest or logical variation.

Last note..... you can also use AND (Syntax is "&" ) and OR (Syntax is "||" ) also for if functions.
For example your RED Config.... if($=8192,0,if($=16383,0,$)) . Here with OR it would work also with ... if($=8192||$=16383,0,$)

Wich solution you choose is your thing.... Just think about how it is more comfortable for you and for the programm.
Good Luck !
2018-10-02 22:34
Avatar
Pietrogramma
Posts: 19
Hi Pizman82, Hi StephanH0
Yesterday I tried again to set mobiflight with your advice and finally everything is ok.
I do not know what was I wrong before but, as you said, the important thing is that now it works (the only problem -but in really don't is a problem- is the offset; if I use 0XBDC dont't work fine, if I use 0XBE0 it's perfect).
Now the mobiflight setting's are much lighter than before.
If now the LEDs, thanks to your help, are perfect I have problem, however, with the toggle switch three positions, it is very unstable, you can give me advice?
Thank you so much again for your help and hello.
2018-10-04 11:05
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi again my friend !

If you say "Offset A is work not good and Offset B is perfect" i can not see the problem :P

Note... Every Addon and badly every FSX Standard Aircraft work a bit different.

For example some Addons not run Flaps to "16383" . On some AddOns the Flaps are just 16381 for example.
So if you say " If Value =16383 then LED is ON.. ELSE OFF .... Then in my example the LED stay OFF whatever the Flaps are FULL cause here the value never reach 16383

That why i say.... YOU must always "explore" your AddOn Aircraft....
In example of Flaps.... ( And your not sure if 0BDC or 0BE0 is correct )
Create a Output config ( No device) and read the first Offset
Create another Config and read the Second. ( And if you get another 10 Offsets you mean that can be good here also create configs and check them, too)
Then Run Mobiflight and Simulator..... Load your AddOn. Set Flaps "0" and check all values of the Offsets.
Then run Flaps to first position..... Observe ALL Configs. How they work. Then check the Values after reaching detent 1.... And write down the values on a pice of paper.
Now run to next Position.... Observe and write down again.
Go backwards.... Do it again 3-4 times.

Simply find out... Are values always the same in different trys.... Are they Same while Inbound or outbound running..... And so on.
Summary... You now now what values can happen and how it work. And You know what offset is the best or most comfortable one.
And THEN you create your configs with that data and it will work fine.

******
About your Inputs. (3 way switch)

Here i not understand.... a 3 way switch is not used for toggle things.... Thats a SET switch. (Toggle are mostly momentary pushbuttons)
I also not know your system. Do you make Offset Controll, do you use Events ? Do you use Axis controlls via FSUIPC , do your AddOn Aircraft have Keybinds ?

For input i need clearly more information. What is the exact Problem ? And What system or logic do you use or do you looking forward to use !
Good Luck !
2018-10-04 19:53
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
Hi,
when reading axis values is always the problem that resistors are "read out" here. These always work with a certain inaccuracy (called tolerance). This tolerance also includes the temperature coefficient, which changes the resistance value within a certain range. For normal potentiometers, this is a fast 10-20%.
Therefore, errors can occur when working with exact values in the evaluation. In this respect I avoid the "=" sign but choose "<" and ">". This intercepts these inaccuracies.
You then runs the risk that in the comparison areas two LEDs light up, in the case of the flaps I would find this optically even positive, because the display flows and does not jump.
Grüße,
Stephan (Time: UTC+2)
2018-10-04 20:17
Avatar
souza
From: IVOTI RS BRAZIL, Brazil
Posts: 53
Supporter
You say... IF Value is "0" then it should set to "0". If it is NOT "0" but it is "8192" then it should set to "1" . If it is NOT "0" and NOT "8192" but it is "16384" then it shouldbe set to "0" . Finaly you say with the last ",0" that ALL Other Values (that are NOT "0 , 8192 or 16384") should be also set to "0"

Hello my friends... i really understood now about these formulas......amazing and simple explanation....thanks
SIMULAR É...
2018-10-29 13:42
icon