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
FSAddon_boss
Posts: 15
Hi everybody, I am new to this electronics stuff, even though I have been in the flightsim hobby (and business) ever since 1978. Am turning 70 this year, so LEARNING stuff gets harder every day now :D

I have finally started to build a home cockpit of my own, after having supported the flightsim community for some 35 years...... and I am using Arduino, and Mobiflight, linked to some leftover hardware that I still have.

My problem now is to get the (Flightlink) fuel selector switch to work. I have many single switches working, but not this one that has 4 wires. OFF- LEFT - RIGHT - BOTH.
I am assuming the OFF wire is also the wire that goes to the GND on my Arduino.
Each of the three other wires I have connected to a separate pin on the Arduino MegI found the offset in the FSUIPC7 document, and defined a 2-byte mask with the values as indicated.
So I defined three 'devices', one for each setting and each pin.
Then added three input lines, each with value 1 on press and 0 on release.

When testing, I see the fuel selector move in the default FSX DC3, in the default Widgeon, but NOT in the Baron and not in the Cessna Caravan.
Even in the aircraft where it DOES move, it only switches between left and off.

What am I doing wrong ????

Kindest regards,
Francois
former FSAddon Publishing
2022-02-11 17:36
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

Like in lots of other topics.... Lets split this up into the two important Parts.... Hardware and Software !
In your "mixed" situation you not know where the issue is located.

So start with Hardware !

If you got a Multimeter, then use it to find out the logic of the switch.....
If it got 4 Positions ( Off, Left, Right, Both) a "regulary" switch will have 5 Pins !
Yours got 4.... So in whorst case its a BCD Swtich, that is technical not compatibale with MF directly
But may we are lucky and they just use a little tricky logic at all.

Much more direct would be to check the DATASHEET of the Switch.... Then we see what is fact and not need to do the Multimeter testings.

Step 2.... When we know how the switch work is to confirm MF read it correctly.... Done by Enable the Logging Mode in typ DEBUG in Mobiflight.
When you now move your switch the logging will show us exactly what command is received by Mobiflight for every switch position !


When we already point out the first two things.... THEN we can think about the Software.... Means we need to define the correct Commands.
Here FSUIPC7 is a way.... But mostly in FS2020 we going much more comfortable and easy with our new WASM Tool that allow direct inputs to the sim ( without go the FSUIPC Bypass)

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

So please try to figure out the Hardware situation.... If you know what is happen here, then we can talk about the needed Events !
Good Luck !
2022-02-11 21:11
Avatar
FSAddon_boss
Posts: 15
Danke fuer die Antwort :-)

Actually, the switch has many more pins, but only 4 are used. It is mounted in an old Flightlink subpanel, and I don't have any data on it.
So will try the Multimeter method and see if I can find out anything.

Thanks again,
Francois
2022-02-12 10:20
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconFSAddon_boss:


Actually, the switch has many more pins, but only 4 are used.



"Many more" .
This can be a indice for a 12 or 8 Pos Rotary Switch.

E.g. a 12 Pos have 12 Pins + 1 Center Pin for GRD.



Here we would set simply the center Pin to GRD ..... And one pin for each used position to a free Pin of the Mega!
Each Position is technical a single Button.... Pressed if switch is selected on that position or released if switch is on another position !
Good Luck !
2022-02-12 16:31
Avatar
FSAddon_boss
Posts: 15
Counted them, and tested the switch. Yes, it has one central connector and 12 connectors all around it.
The switch only turns into 4 positions, and 3 of the 12 connectors have a wire connected, plus the GND one in the center.

Since it worked in the past with other software, I am assuming the wires are connected to the correct contacts.
But using the MF log it appears that only 2 of the contacts have any effect (Fuel Left and Fuel Right). It could be that the switch is broken (since I don't measure anything on one of the three contacts.
2022-02-12 16:59
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
hhhm.

Technical the other Software could use a little tricky logic....

In MF we normaly say.... Each position is a own switch.... So if we move it to posX then the PRESS ( When we reach the position) execute the needed command.... And tell the sim "Please SET the Virtual switch to the Current Value ( e.g. 0 for the most left and 1,2,3 for the others)"

In case this switch have no 360° Function maybe the former programmers use a little trick.....
Position 1 and Position 4 ( The two outer ) can be build without wire them.....
Cause we can build a logic and say.... If we RELEASE for example Position 2 ( so switch is turned away from Pos2) then 2 things can happen....
We turn it to Pos 3 .... then That PRESS Event is detected....
If we turn it to Position 1 .... Then the Event from Nr3 never occure.
So we could build a logic and say " If we LEAVE Pos 2 but no Pos3 is send behind then we "know" switch must be in Pos1 ( Whatever Pos1 have no real indication)

In theory we can also build this in MF.... But i recommend.... If you not got lovely feels to this switch and if you be able to rework/change it.....
You will be more happy and have a clean logic if you use a working 12Pos Rotary!
No need of difficult logics and maybe follow issues!
Good Luck !
2022-02-12 21:18
icon