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
slammer88
From: LTBJ, Turkey
Posts: 160
Hey there guys.

I've made a short video of my recent problem.

https://www.youtube.com/watch?v=lXuRwEiZa-s

Can someone maybe help ?
2019-05-25 12:23
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi.

I badly get no experience in Xplane and XPUIPC but i think i can see the Problem.

At First:
Your Script say UINT16 ( Means Unsigned 16 Bit Integer .... 2 Byte )
In Mobiflight you use Size "4 Byte" .... Thats Wrong.
Use 2 Byte Size in Mobiflight !

If this NOT solve the problem already then go forward....

The "command" you use look like a "event" not like a Offset.

The name i can see in the Vid is "Hading UP" .... Sound like this is the command for "increase" the Heading Up.
Please check the Sheets of your aircraft if there exist also a "Heading DOWN" part.
If yes try to duplicate the Line.... With another Offset. so for example 6464 is UP ... So create a Line for 6466 (If free) and set the down command .
Set Down to LEFT and Up to RIGHT.

Again i not know that and can test it . If its a Event then the value is maby not important... Every Write here will ocure in a execute of the action. So simply use 1 or 0 for example
Also check for the Size.... A Event not need a biog Size cause it gots no real value.... Im confused why it use UINT16 here.
Good Luck !
2019-05-27 21:20
Avatar
slammer88
From: LTBJ, Turkey
Posts: 160
Hi Pizman,

It's like this now.

Command 0x6803 UINT16 1 1 laminar/B738/autopilot/course_pilot_up
Command 0x6804 UINT16 1 1 laminar/B738/autopilot/course_pilot_dn

There are two separate offsets dedicated for each command (eventid let's say, logic is the same).

This system only works if I write if($=1,0,1) to More Options section, but it works like this, when i turn the encoder with 2 detents, it detectes only 1 of them. So literally i spend double amount of turnings to reach X value.

Yes, i changed the detent option from config to 2 Detents, it works, again with each detent i get 1 value change, but when i change the values fastly, the value change won't stop even if i stop turning the encoder.

Regarding to UINT16, i have little idea about the working system of floats, integers arrays and stuff. You're right tho, i'll try it with UINT8/1 byte now.
Any other option won't work.
2019-05-28 21:14
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Again sorry i can´t directly help you here....

Maby next step is to "understand" the parameters of the XPUIPC File. You just explane that shortly in the Vid.

The Readme of XPUIPC say.... First number is 1 for toggle or 0 for hold function
the second Number is the Indicator.
So "bla bla bla 1,1" means it toggle the command ONE TIME if Offset change to "1" .
If its already "1" nothing happen and you must write it to another value ( Zero e.g.) and then again to "1" to fire the action again.
As you explane this work with "if($=1,0,1) " . But that also mean you need TWO detents.... the first execute the action.... the second reset the "offset" .

Solution:
Try if you can use a mathematical syntax in this code line.
iconQuote:

Command 0x0892 UINT16 1 >1 sim/magnetos/magnetos_off_1 _


With this "bigger then >" trick normaly all numbers greater then 1 will fire the action.
Now a simple "$+1" in Mobiflight will work.
I´m NOT sure if its possible to use operators in this code part. Try out !

EDIT: Another Alternate will be to add 2 Lines here.
iconQuote:

Command 0x0892 UINT16 1 1 sim/magnetos/magnetos_off_1 _
Command 0x0892 UINT16 1 0 sim/magnetos/magnetos_off_1 _



Now Both values ( 0 or 1) will fire a command. With "if($=1,0,1) this also should work !
Good Luck !
2019-05-28 22:06
Avatar
slammer88
From: LTBJ, Turkey
Posts: 160
Hi Pizman,

I love the way you try helping people somehow :love:

The syntax you mentions is quotes as "expressions" in xpuipc system, used only for Dataref's and added to the end of each command line.

I think i'm missing a very simple point but i don't know what it is :)

By the way "_" is used for multiple commands and means kind of "and" command, when you don't use it, means that those command series end.

iconpizman82:

Again sorry i can´t directly help you here....

Maby next step is to "understand" the parameters of the XPUIPC File. You just explane that shortly in the Vid.

The Readme of XPUIPC say.... First number is 1 for toggle or 0 for hold function
the second Number is the Indicator.
So "bla bla bla 1,1" means it toggle the command ONE TIME if Offset change to "1" .
If its already "1" nothing happen and you must write it to another value ( Zero e.g.) and then again to "1" to fire the action again.
As you explane this work with "if($=1,0,1) " . But that also mean you need TWO detents.... the first execute the action.... the second reset the "offset" .

Solution:
Try if you can use a mathematical syntax in this code line.

iconQuote:

Command 0x0892 UINT16 1 >1 sim/magnetos/magnetos_off_1 _


With this "bigger then >" trick normaly all numbers greater then 1 will fire the action.
Now a simple "$+1" in Mobiflight will work.
I´m NOT sure if its possible to use operators in this code part. Try out !

EDIT: Another Alternate will be to add 2 Lines here.
iconQuote:

Command 0x0892 UINT16 1 1 sim/magnetos/magnetos_off_1 _
Command 0x0892 UINT16 1 0 sim/magnetos/magnetos_off_1 _



Now Both values ( 0 or 1) will fire a command. With "if($=1,0,1) this also should work !

2019-05-29 07:29
Avatar
slammer88
From: LTBJ, Turkey
Posts: 160
iconslammer88:

Hi Pizman,

I love the way you try helping people somehow :love:

The syntax you mention is quoted as "expressions" in xpuipc system, used only for Dataref's and added to the end of each command line.

I think i'm missing a very simple point but i don't know what it is :)

By the way "_" is used for multiple commands and means kind of "and" command, when you don't use it, means that those command series end.

iconpizman82:

Again sorry i can´t directly help you here....

Maby next step is to "understand" the parameters of the XPUIPC File. You just explane that shortly in the Vid.

The Readme of XPUIPC say.... First number is 1 for toggle or 0 for hold function
the second Number is the Indicator.
So "bla bla bla 1,1" means it toggle the command ONE TIME if Offset change to "1" .
If its already "1" nothing happen and you must write it to another value ( Zero e.g.) and then again to "1" to fire the action again.
As you explane this work with "if($=1,0,1) " . But that also mean you need TWO detents.... the first execute the action.... the second reset the "offset" .

Solution:
Try if you can use a mathematical syntax in this code line.

iconQuote:

Command 0x0892 UINT16 1 >1 sim/magnetos/magnetos_off_1 _


With this "bigger then >" trick normaly all numbers greater then 1 will fire the action.
Now a simple "$+1" in Mobiflight will work.
I´m NOT sure if its possible to use operators in this code part. Try out !

EDIT: Another Alternate will be to add 2 Lines here.
iconQuote:

Command 0x0892 UINT16 1 1 sim/magnetos/magnetos_off_1 _
Command 0x0892 UINT16 1 0 sim/magnetos/magnetos_off_1 _



Now Both values ( 0 or 1) will fire a command. With "if($=1,0,1) this also should work !

2019-05-29 07:35
Avatar
slammer88
From: LTBJ, Turkey
Posts: 160
Command 0x0892 UINT8 1 1 sim/magnetos/magnetos_off_1 _
Command 0x0892 UINT8 1 0 sim/magnetos/magnetos_off_1

this works like it's supposed to Pizman! You're the man! Danke sehr!
2019-05-29 20:06
Avatar
Banzai
From: France
Posts: 90
hello
can you share your config xpuip file with me , i try to make my mcp working with xplane and b738 but i don't understand how i do this
i try with free ofset but nothing works with me
thanks
2019-05-30 12:59
icon