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! 

icon
Avatar
slammer88
From: LTBJ, Turkey
Posts: 143
Dear fellow users.

I've been spending a huge time -still do- for integrating MobiFlight and XP-11. I came such a long way and below, I'll share my findings.

- For Dataref's (Output's mostly) you use such a command,

Dataref <identifier> <dataref name> <type>
Offset <number> <type> <priority> <access> <conversion expression>

1- "Identifier" is just a name, let's say "yawdamperled" ,
2- "Dataref name" is the unique Dataref of this annunciator in XP-11 (note that it tends to change for 3rd party planes) lets's say "laminar/B738/annunciator/yaw_damp"
3- Type is the section i suck most, it's either int, float or array, but mostly int or float is used. int for "on-off" s, float is for numbers, digits simply.
4- "Number" is the offset number you'll give via Mobiflight. 0x6000 and above is free to use.
5- "Type" is for two things, a) bit size, b) signed & unsigned condition. For simple on-off switches and led's i use 8 bit (1byte), for encoders and digits i use 16 bit (2 bytes) and Float 32 bits (4 bytes) just go for UINT- ones.
6- Prio doesn't do anything tbh, set it to 1 for all
7- Access is the same with Identifier actually, just add "$" in front the identifier and copy here like "$yawdamperled". Don't forget to add "rw" before that.

So, the final appearance is like this;

Dataref yawdamperled laminar/B738/annunciator/yaw_damp int
Offset 0x6510 UINT8 1 rw $yawdamperled

With this, you'll create the fundamental of xpuipc coding. Rest is easy, just create an output config in mobi, use the same offset with 1 byte int and voila.

For Commands, it's kind of more complicated, as there are different type of commands you need to somehow integrate and it's quite different than EventID system.

Command <offset number> <offset type> [ ]

1- Again, you assign a free Offset number,
2- Determine the offset type which is mostly UINT8 for switches, but UINT16 for encoders (its Unsigned as there's no "-" value going on)
3- If the toggle parameter is 1, the command is 'clicked' whenever the offset changes to the given value, i.e fired once. If the toggle parameter is 0, the command is 'held down' as long as the offset has the given value, i.e. fired continuously until the offset change to a different value.
4- Mostly 0 for off and 1 for on, as the structure of Commands are based on momentary actions, like "Autobrake Right", let's say. If you click once, AB turns 1 step right. There's not a separate command to determine its physical position. Actually you can do it via Dataref's but (for Zibo at least) they are non-writable for now.
5- Same rule, hard-coded commands of XP-11

Some examples I use shall be like;

This one is for Left Aft Fuel Pump, just on and off,
Command 0x683B UINT8 1 0 laminar/B738/toggle_switch/fuel_pump_lft1 _
1 1 laminar/B738/toggle_switch/fuel_pump_lft1



This one is for Apu Gen 1, notice that for being momentary, i introduced the values differently,
Command 0x6837 UINT8 1 0 laminar/B738/toggle_switch/apu_gen1_dn _
0 1 laminar/B738/toggle_switch/apu_gen1_dn


This one is for APU itself, notice that there are two separate commands,
Command 0x6833 UINT8 1 0 laminar/B738/spring_toggle_switch/APU_start_pos_dn _
1 1 laminar/B738/spring_toggle_switch/APU_start_pos_up

due to the nature for command code, i need to use it twice to step down twice.
Command 0x6834 UINT8 1 0 laminar/B738/spring_toggle_switch/APU_start_pos_dn _
1 1 laminar/B738/spring_toggle_switch/APU_start_pos_dn _
0 2 laminar/B738/spring_toggle_switch/APU_start_pos_dn


This one is used for momentary commands like MCP buttons etc, notice the values.

Command 0x680E UINT8 0 0 laminar/B738/autopilot/vnav_press _
0 0 laminar/B738/autopilot/vnav_press


This one is used for encoders, but you need to add if($=1,0,1) to the value section in MobiFlight. (credits go to pizman)

Command 0x680A UINT8 1 1 laminar/B738/autopilot/altitude_up _
Command 0x680A UINT8 1 0 laminar/B738/autopilot/altitude_up

Command 0x680B UINT8 1 1 laminar/B738/autopilot/altitude_dn _
Command 0x680B UINT8 1 0 laminar/B738/autopilot/altitude_dn


This one is used for 3-way switches, however in Mobiflight configs, you need to give values to 684B as 0 on press and 1 on release, and to 684C as 1 on press and 0 on release consecutively, or vice versa.
Command 0x684B UINT8 1 0 laminar/B738/toggle_switch/l_pack_dn _
1 1 laminar/B738/toggle_switch/l_pack_up
Command 0x684C UINT8 1 0 laminar/B738/toggle_switch/l_pack_dn _
1 1 laminar/B738/toggle_switch/l_pack_up


For further questions, please don't hesitate to ask. For rotary switches, i still couldn't find a decent solution, once i do, i'll share that as well along with my config.

Cheers
2019-06-02 10:34
Avatar
Banzai
From: France
Posts: 32
great job thanks you for sharing!:thumbup:
2019-06-02 11:46
Avatar
Banzai
From: France
Posts: 32
hello
i test this :

Command 0x6000 UINT8 1 0 laminar/B738/autopilot/flight_director_toggle_
1 1 laminar/B738/autopilot/flight_director_toggle
in MB on press value $1 /on release value $0

but nothing!
i made something wrong,?:confused:
2019-06-03 19:39
Avatar
slammer88
From: LTBJ, Turkey
Posts: 143
iconBanzai:

hello
i test this :

Command 0x6000 UINT8 1 0 laminar/B738/autopilot/flight_director_toggle _
1 1 laminar/B738/autopilot/flight_director_toggle
in MB on press value $1 /on release value $0

but nothing!
i made something wrong,?:confused:



"_" should have a single gap after toggle, it should be like "toggle _" not "toggle_"
2019-06-05 21:15
Avatar
Banzai
From: France
Posts: 32
i do this but :thumbdown:
2019-06-06 18:29
Avatar
slammer88
From: LTBJ, Turkey
Posts: 143
iconBanzai:

i do this but :thumbdown:



Try another offset like 0x6500

And in value area don't use $, just 0 and 1.
2019-06-07 10:21
Avatar
Banzai
From: France
Posts: 32
hello
i test this:
#FD PILOT
Command 0x6500 UINT8 1 0 laminar/B738/autopilot/flight_director_toggle _
1 1 laminar/B738/autopilot/flight_director_toggle
#N1
Command 0x6501 UINT8 0 0 laminar/B738/autopilot/n1_press _
0 0 laminar/B738/autopilot/n1_press
#SPEED
Command 0x66C0 UINT8 0 0 laminar/B738/autopilot/speed_press _
0 0 laminar/B738/autopilot/speed_press
#LVLCHG
Command 0x66C1 UINT8 0 0 laminar/B738/autopilot/lvl_chg_press _
0 0 laminar/B738/autopilot/lvl_chg_press
#HDGSEL
Command 0x66C2 UINT8 0 0 laminar/B738/autopilot/hdg_sel_press _
0 0 laminar/B738/autopilot/hdg_sel_press
#APP
Command 0x66C3 UINT8 0 0 laminar/B738/autopilot/app_press _
0 0 laminar/B738/autopilot/app_press
#ALTHLD
Command 0x66C4 UINT8 0 0 laminar/B738/autopilot/alt_hld_press _
0 0 laminar/B738/autopilot/alt_hld_press
#VS
Command 0x66C5 UINT8 0 0 laminar/B738/autopilot/vs_press _
0 0 laminar/B738/autopilot/vs_press
#CO
Command 0x66C6 UINT8 0 0 laminar/B738/autopilot/change_over_press _
0 0 laminar/B738/autopilot/change_over_press

nothing works!:confused:
MB is connected to xpuipc i dont understand wher is the mistake
2019-06-10 18:53
Avatar
slammer88
From: LTBJ, Turkey
Posts: 143
Interesting. Are you sure that XPUIPC is connected to Mobiflight ? Do you see 2 green marks below Mobi software when XP11 is open ?
2019-06-11 11:40
Avatar
Banzai
From: France
Posts: 32
hello
yes the 2 green marks are present
i also test to desactived some plugins but it same.:confused:
2019-06-11 19:10
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2392
Supporter
Silly Idea.... Please confirm you work with correct Files and installation.

I Remember a day i have installed FSUIPC on my FSX System 7 times in a row.... But always after getting the success Window i start the Sim and the FSUIPC Version was shown the Old one from before the installation.

Then i realise that i have 2 time installed the FSX.... One on HD C:/ the other on my FlightSim HD on F:/
So finaly i have installed FSUIPC always on the wrong one. ( By autodetect)

******
So "maby" you have on your system multiple versions of XPUIPC..... If you try to rework the cfg file of one Version but Xplane load another one then your settings wont fit.
Good Luck !
2019-06-11 21:28
Avatar
Banzai
From: France
Posts: 32
hello
how mobiflight find the plugins xpuipc in xplane?
where is the path ? can i modify this?
2019-06-13 20:08
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2392
Supporter
Thats not possible as i know..... Thats hardcoded in the MF Software.

BUT Thats also not needed..... If you start a Sim ( Whatever Xplane, FSX , P3D) that include FSUIPC or XPUIPC Mobiflight will connect to THIS System.
Maby there is a conflict if you start TWO Sims same time.... But i never heard about that cause its absolutly unlogical to start 2 Sims same time :confused:

So if issue is what i suggest above then not Mobiflight is the Problem...... In That case XPUIPC would be the problem.
Simply think about if you install it multiple times..... if NOT then this can not be possible and the issue is somewhere else.

Sorry if i create confusion .... This was just a little idea!
Good Luck !
2019-06-14 02:22
icon