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
AlasdairM
Posts: 4
I am very new to this, so any advice would be much appreciated.

I generally fly GA - mainly the Cessna 172 and Baron Beechcraft G36.

MSFS 2020 and Mobiflight with Arduino Mega - I have so far successfully set up a panel with seven switches/buttons.

I would now like to add a fairly generic "fuel tank selector".

I believe this will need a rotary switch - or should I use another type?

To try and cover both C172 and G36, I am thinking of incorporating 4 options: (1) Left tank (2) Right tank (3) Both (4) Off.

Alternatively I could perhaps go with only 3 options (Left/Right/Both), and have a separate switch for Cut off/Shut off.

If anyone has done anything similar and can pass on their advice, this will be gladly welcomed.

If you think I am way off beam, so to speak, don't hesitate to say so!

Thanks in advance, Alasdair
2022-10-05 07:42
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

Basically no problem....

The most easy way is to use our SEARCH within Mobiflight or (to me) more comfortable in the HubHop Webpage....

so go there.... https://hubhop.mobiflight.com/ and click on Presets .....

In the Search mask you can reduce hits by make some entrys.
You should at first choose for INPUT in the lower "Select Input/Output" box..... Cause you need a Input... We not want to see presets for Outputs now.
Second choose for a Vendor.
Your Aircrafts are Stock (not AddOns) .... Here you need "Asobo" or "Microsoft"
At last.... Type in a Keyword.... Logical we use "Fuel"

E.g. for Asobo and Aircraft "C172" you will get 7 Hits.... And all your needed ones are included.

With this logic you can check for every In and Out of all Aircraft in FS2020.

NOTE: Try different Wordings.... e.g. if "Fuel" not help use "Tank" or "both".

At the end.... If a needed element not exist NOT means its not working..... It just means nobody (till now) build this entry.
In that case you can read our guides to learn how you can figure out missing Data yourself, or you ask on our DISOCRD a friendly user to help you here.
Good Luck !
2022-10-05 19:31
Avatar
AlasdairM
Posts: 4
Pizman82 - thank you for this - very helpful..

I will follow your suggestions - I think I might even be beginning to understand how things work!

Kind regards, Alasdair
2022-10-06 11:21
Avatar
Captain_Johnny
Posts: 21
Hi, I'm trying to do almost exactly the same thing. However, I need to use FSUIPC Offsets because my switch panel needs to be generic for use with both MSFS and XPlane. I'm struggling to find the offset codes I need within the FSUIPS Offset status list. To further complicate things, I'm trying to make my switch panel aircraft-generic (i.e. for use with multiple aircraft from 1 engine through 4 engines eg. C172 thru B747). Are you able to please point me in the right direction? Many thanks.
2023-01-16 12:14
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconCaptain_Johnny:

. However, I need to use FSUIPC Offsets because my switch panel needs to be generic for use with both MSFS and XPlane. I



Thats possible, but not really smart. We not recommend this !

Better idea is to build 2 MCC Files... You can for sure use your hardware for both without problems.... And you use same Mobiflight Installation. You just have 2 MCC Files.... One for Xplane in use.... the other for FS2020 in use.

You also not need to build both from scratch each..... Build one ( whatever the Xplane or FS2020 one) .... Create all the Configs, choose for the devices and so on. Also do your PRecondition, Variables and all you need.
After finish you save it and then you say "SAVE AS" and create a new file.... e.g. the first one is "xxxFS2020.mcc" the second now is xxxXplane.mcc
NOW you just need to change the data source in the second one. In each config you swap e.g. the FS2020 Simconnect Variable with a Xplane Dataref.
The whole structure and the devices are still set. So the second file only take some little time to be finsihed.

Benefit: Each file work in a Perfect way....
Specially if you fly a AddOn Aircraft then FSUIPC is no longer usefull and there is no alternate as using Dataref and Variables.
Good Luck !
2023-01-18 20:03
Avatar
Captain_Johnny
Posts: 21
Many thanks, yes I agree, that looks like the better way to do it :) .
2023-01-19 06:17
Avatar
Captain_Johnny
Posts: 21
I've searched everywhere but cannot find the syntax of how to add an input value in the 'Action Type - Microsoft Flight Simulator 2020'.

Example:

I have 3 x Fuel pump switches (Left, Centre, Right).
From the filter preset list, I selected vendor as Microsoft, Aircraft Generic, and System Fuel.
For the Centre Pump, I selected the preset FUEL_PUMP, but there is no selection for ON or OFF. So I assume I have to somehow add a '1' for ON and '0' for off, but I don't know how to code that.
I notice below the 'Show Preset Code' it shows: (>K:FUEL_PUMP) and a note underneath advising it supports input value (@), but I have no idea how to add an input value eg. '1' for 'On Press' and a '0' for 'On Release'.

The other problem is that other than the B747, I cannot find presets for Left, Centre and Right fuel pumps, but that's another problem :).

Can you please guide me in the right direction?

Thanks.
2023-01-19 08:04
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
There are lots of events.
The generic ones are often "Toggles".
Means you can not say SET to 1 or SET to 0 ..... Those events just simulate a click in the cockpit and set the switch to the opposit direction as it was before.

Also a lot events are written by advanced users..... Who implement e.g. a logic to use a toggle event ( with a indication) to clearly SET to ON or OFF.

I recommend: Search on HubHop ! https://hubhop.mobiflight.com/
Thats the database (taht is used by MF Software) .
Here you can use search and see the code and discription without the uncomfortable "show preset code" click like in MF itself.

Another tip.... For generic stuff try different Presets.... E.g. if there exist no Fuel Pump for B747.... Check if there is one for B787 or Cessna and if it work fine?
Lots of Events are shared by all the Aircrafts.
So if somebody build a special SET Input for Cessna there is a chance it also work fine for your B747.
Good Luck !
2023-01-21 22:44
Avatar
Captain_Johnny
Posts: 21
iconCaptain_Johnny:


From the filter preset list, I selected vendor as Microsoft, Aircraft Generic, and System Fuel.
For the Centre Pump, I selected the preset FUEL_PUMP, but there is no selection for ON or OFF.



Thanks.
So, in this example, would this definitely be just a TOGGLE (so I can't actually add a 1 or 0)? If it doesn't say TOGGLE, how would I know this one for example is only a TOGGLE?
2023-01-26 11:22
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconCaptain_Johnny:


So, in this example, would this definitely be just a TOGGLE (so I can't actually add a 1 or 0)? If it doesn't say TOGGLE, how would I know this one for example is only a TOGGLE?



Mostly its logical by check the name and available Variables....
You know yourself if the system in Sim is a Latching switch or a Momentary Button cause you can see it in the Sim Virtual Cockpit.
So e.g. if the Fuel Pump switch in Sim got 2 Positions and is latching then we know it have a ON and OFF Position .... So we will expect there is a SET to ON and a SET to OFF Event available.

So... If you know this but the Search only give ONE Event then its 99% a Toggle Event ( Whatever toggle is not in the name) cause if it would be a SET Event then its logical that 2 will exist for the 2 Positions.
Simply try out if your not sure.... But logical this is correct in most cases.

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

About the other question...
If there exist just a Toggle instead of ON and OFF Events that NOT means its impossible to have them.
It just means nobody till now try to create them.

As i said in last Posting.... With the RPN Code we tell the Sim what it should do.... The Preset you find maybe just say "Toggle the Fuel Pump"
For sure you could create 2 single Events yourself....
E.g. the ON Event say.... "Check if Virtual Switch is currently OFF... If yes send 1 time Toggle (to set it to ON).... ELSE so if its still ON in Sim do nothing"
For the OFF Event its done inverted.... Only send a Toggle if Sim Switch is still ON.

Sounds a little strange.... Cause good AddOn Aircrafts already support a nice On and OFF event directly. I just want to show you that its possible with just the available Toggle Event to create a Logic for SET On and SET Off by simply use the current Sim Switch Position as a logical indication in an IF Statement.




Summary:
Missing Events mostly not means somithing is not possible.... It just mean in most cases, nobody still create it.
Feel free to do this and share your events on HubHop.
If your experience is to low here then join Discord https://discord.gg/99vHbK7 and ask a advanced user there to help you or to create the code for you.
E.g. our user "JaimeLeon" create thousends of Events for users already
Good Luck !
2023-01-28 10:44
icon