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
smoothchat
Posts: 41
Supporter
I have set up a rotary switch to emulate the Autobrake rotary switch and to send commands to the PMDG737 Autobrake rotary switch..

Now and then, a turn of the switch does not register. Do I need to alter the polling rate somewhere?
[Last edited by smoothchat, 2017-02-14 13:57]
2017-02-14 13:51
Avatar
Mpe737
From: EDDH, Germany
Posts: 58
Supporter
Hi, I don´t think so.
Some days ago I had the same problem connecting the brake panel rotary with my arduino mega together with the pmdg ngx. The problem was discussed in the german section of this forum. I connected the rotary and use eventid 70092. Send the parameters 0 to 5 according to offset 6562. Thats it. Works perfectly. Don t turn the knob to fast.
Do you use the same parameters?
regards
Michael
2017-02-14 20:15
Avatar
smoothchat
Posts: 41
Supporter
Thanks Michael,

Yes, that's the eventid I use.

Sometimes a step of the rotary switch is not captured.

eg: Sometimes, a step from 0 to 1, then back to zero sees the NGX switch stay on 1.

I am not switching quickly.

On a related topic, I am wondering, is there a way to display the status of the inputs in mobiflight without loading the sim?

It would be nice if Mobiflight had a monitor window which showed the status of the various inputs. It appears that you can view the offset values coming from the sim, but not the status of the input pins.
2017-02-15 00:31
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
hi smooth

Mobiflight can´t give you a "Pin Status" at the moment cause itself don´t know the status ( and not need to know it ) at the moment.
A Pinstatus is only sent to Mobiflight if a switch is moved. If its On MF sends a "Push" if its turn to off MF sends a "Release" . Between 2 shiftings there is no comunication between Mobiflight and Arduino.

If this happend often that switch actions not captured then think about two things...
If its always on same switch/position please check youre electrical setup.
If it happend on different switches please look in FAQ or other Forum Threads about the "Logging Debug Issue"
For testing please enable Logging Mode and set "Debug" as logging Typ.....

Please Report if this helps you !
Good Luck !
2017-02-15 19:07
Avatar
MadTrooper
Posts: 52
HI, I'm planning to install a rotary switch on the arduino Mega 560 with Mobiflight to make it work. This is for the FSX default Boeing 737-800. Any Idea on how to connect the switch propely and to program it on Mobiflight? The offset info is below but how does it work?

Thanks for your help.

2F80 1 Panel autobrake switch
Read to check setting, write to change it.
0=RTO, 1=Off, 2=brake1, 3=brake2, 4=brake3, 5=max
2017-11-12 02:54
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
Re-Hi,

you need six INPUT-configs related to the same offset.

1. AUTOBRAKE RTO FSUIPC-Input 0x2F80 set value: 0
2. AUTOBRAKE OFF FSUIPC-Input 0x2F80 set value: 1
3. AUTOBRAKE1 FSUIPC-Input 0x2F80 set value: 2
4. AUTOBRAKE2 FSUIPC-Input 0x2F80 set value: 3
5. AUTOBRAKE2 FSUIPC-Input 0x2F80 set value: 4
6. AUTOBRAKE1 FSUIPC-Input 0x2F80 set value: 5

Wire your rotary switch as follows:
Central connection to GND
Every AUTOBRAKE Pin in sequence (1-6) to a corresponding pin of the MEGA (i.e. 2-7)

You do not need to read the setting because the position of the rotary is the setting of the autobrake.
Please report your experiences here.
Grüße,
Stephan (Time: UTC+2)
2017-11-12 09:43
Avatar
MadTrooper
Posts: 52
OK, thanks for your help stephanHO. I'll try this and post on the result.
2017-11-12 13:57
Avatar
MadTrooper
Posts: 52
HI StephanHO, I did install

6 x inputs using Button (not the Encoder) and chose pins number 28-33.

Then I went to the inputs configs and made the following:

1. AUTOBRAKE RTO FSUIPC-Input 0x2F80 set value: 0
2. AUTOBRAKE OFF FSUIPC-Input 0x2F80 set value: 1
3. AUTOBRAKE1 FSUIPC-Input 0x2F80 set value: 2
4. AUTOBRAKE2 FSUIPC-Input 0x2F80 set value: 3
5. AUTOBRAKE3 FSUIPC-Input 0x2F80 set value: 4
6. AUTOBRAKEMax FSUIPC-Input 0x2F80 set value: 5

Kept it this ways saved all then I tried it and nothing.

Tried with the values of each config like this:

1. if($=0,1,0)
2. if($=1,1,0)
3. if($=2,1,0)
4. if($=3,1,0)
5. if($=4,1,0)
6. if($=5,1,0)
tried it and nothing is happening.

The wiring of the switch is ok I guess, I put a resistor on all 6 pins and connected the ground correctly. So what I'm I doing wrong?

Thanks.
2017-11-12 17:52
Avatar
MadTrooper
Posts: 52
Do I have to put any input settings on action on Release? or only put the value on action on PRESS?

Thanks
2017-11-12 18:07
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
If your wiring is corresponding with the pins (RTO - 28, OFF - 29 ...MAX - 33) then should this to be the right way

IF-Condition are not needed in this case and your selection as Button/Switch is OK.

You need either pull-down-resitors nor pull-ups. They were installed into the MEGA by default.
You also have only to define the ON PRESS action.

In the same situation i would have done the same steps as you. So I see some question marks in front of my eyes.
You are sure that you use the standard B737 of the FSX and you don't use any other add on?

Please wait until pizman read this. I'm sure, he can help you
Grüße,
Stephan (Time: UTC+2)
2017-11-12 21:07
Avatar
MadTrooper
Posts: 52
iconQuote:

You need either pull-down-resitors nor pull-ups. They were installed into the MEGA by default.

ho..thanks I did not know that.

Yes I'm using the default FSX Boeing 737-800.

Thanks for your help StepanHO. Its appreciated.
2017-11-12 21:33
Avatar
MadTrooper
Posts: 52
HI StephanHO, I changed the switch and then, YES it Worked:D

The only thing is that sometimes it seems like it skips a notch. I donj't know what could cause this. But in general, wow I'm really happy. It opens up all kinds of possibilities for my cockpit switches.

Thanks again for your great help!
2017-11-13 00:00
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi Guys... I See my help is not longer needed... :thumbup:
I would say the resistors was the problem.... Thats not needed with mobilfight Boards..... Only with basic Arduinos ( if you not solve this by your sketches softwareside)

About missing notches.
If you have a "New" rotary switch and you build another project please check out then..... If you Resolder the Resistors you maby got cold solder points... Or you overheat a part.
i think thats a hardware issue.

Alternate.... If it´s a Porlbem that occure with different inputs and other buttons please check you FSUIPC Polling Rate in the Settings and try to use "Logging Mode" in "Debug" ON.... Some Users report missing inputs and can fix this problem with enableing Logging mode permanetly.

****
Last Thing !

iconMadTrooper:


1. if($=0,1,0)
2. if($=1,1,0)
3. if($=2,1,0)
4. if($=3,1,0)
5. if($=4,1,0)
6. if($=5,1,0)
tried it and nothing is happening.



i High recommend to "understand" what if condition will make before you use it ! ..... Sorry to report that but this is "trash" and make compelte no sence !

You say in every Config " IF Value is the target Value for this detent THEN Set Value to 1 ELSE Set Value to 0.
Result.... If you turn Your Switch to the Position it is in the sim THEN it will be Set to OFF ( Position 1 ) In all other Cases it will be set to RTO ( Position 0)
So Every Turning will Set it to RTO ( Only if you randomly hit the correct number it will direct go to OFF) .... But Always a Turning to the REAL RTO Position will set it now to OFF.
You See... Complete wrong !!!
Good Luck !
2017-11-13 06:19
Avatar
MadTrooper
Posts: 52
HI Pizman82, thanks for your tips and your good explanations. I took good note of that.
2017-11-13 19:50
icon