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! 

Go to page 1Go to page 112Go to page 3Go to page 2
Avatar
XPRoberto
From: Hungary
Posts: 65
iconnicolask:

Hi, I am having the same issues with xplane 11 and rotary switches. I understand the logic but I am having difficuties entering the info into mobiflight. could I get step by step instructions on how to enter the input and create a precondition. do I still select xplane command under input? when I try to select a precondition there is just nothing to select. What I am doing now is wrong and I would appreciate a little coaching. Thank you


Hi,
1) create an output, where data is coming from the readonly dataref - display tab can be empty
2) create the input - under precondition tab you enter the precondition referring to the output with a value
under action you enter the command.
----------------------------------------------------------------
Do you know that you can simplify: if($=1,0,1) ?
Use simply: 1-$ :)
2024-02-14 15:36
Avatar
nicolask
Posts: 4
iconXPRoberto:

iconnicolask:

Hi, I am having the same issues with xplane 11 and rotary switches. I understand the logic but I am having difficuties entering the info into mobiflight. could I get step by step instructions on how to enter the input and create a precondition. do I still select xplane command under input? when I try to select a precondition there is just nothing to select. What I am doing now is wrong and I would appreciate a little coaching. Thank you


Hi,
1) create an output, where data is coming from the readonly dataref - display tab can be empty
2) create the input - under precondition tab you enter the precondition referring to the output with a value
under action you enter the command.



Thank you very much. I will try this
2024-02-15 12:59
Avatar
testfiggy
Posts: 2
Finally i found a help on how to build the "MCP-Drift Hunters". Thank you very much for sharing your valuable knowledge.
2024-02-19 04:33
Avatar
nicolask
Posts: 4
iconXPRoberto:

iconnicolask:

Hi, I am having the same issues with xplane 11 and rotary switches. I understand the logic but I am having difficuties entering the info into mobiflight. could I get step by step instructions on how to enter the input and create a precondition. do I still select xplane command under input? when I try to select a precondition there is just nothing to select. What I am doing now is wrong and I would appreciate a little coaching. Thank you


Hi,
1) create an output, where data is coming from the readonly dataref - display tab can be empty
2) create the input - under precondition tab you enter the precondition referring to the output with a value
under action you enter the command.



Thank you so much for helping. The switch works well now and I was able to add a state following the logic. This has solved a difficult issue for a newcommer like me. I have learned a lot as well. Once again thank you Roberto
2024-02-20 18:56
Avatar
XPRoberto
From: Hungary
Posts: 65
iconnicolask:


Thank you so much for helping. The switch works well now and I was able to add a state following the logic. This has solved a difficult issue for a newcommer like me. I have learned a lot as well. Once again thank you Roberto


You're welcome. I'm happy if you've learnt a lot from this, now you can figure out a lot more solutions ;)
----------------------------------------------------------------
Do you know that you can simplify: if($=1,0,1) ?
Use simply: 1-$ :)
2024-02-21 08:52
Avatar
lalisa167
Posts: 1
I'm learning what I need to know thanks to the accurate information you supplied. I appreciate you giving this helpful knowledge. papa's freezeria
2024-03-07 04:33
Avatar
PilotOlivier
From: France
Posts: 9
iconXPRoberto:

iconnicolask:


Thank you so much for helping. The switch works well now and I was able to add a state following the logic. This has solved a difficult issue for a newcommer like me. I have learned a lot as well. Once again thank you Roberto


You're welcome. I'm happy if you've learnt a lot from this, now you can figure out a lot more solutions ;)




Hello XPRoberto

Unfortunately, it's not very clear to me. Could you please share the screenshot of the MF output and input to see how you proceed?

Many thanks for your help.
2024-03-10 12:16
Avatar
PilotOlivier
From: France
Posts: 9
iconpizman82:

Hi again

Apollogy for this wrong information !

I talked to Sebastian yesterday, to confirm this....

As you already find out.... The Mobiflight Interface (New feature Xplane Support) currently NOT allow multiple commands and also not a "Hold" Function like XPUIPC do.
Not sure if this will come in the future. We work on it but sure focus is still FS2020.

Solution:

Sebastian already recommend a tool on our discord.... A External programm where users can create "Lua Code" .
In easy words... With MF we tell this Programm "Please Run Macro xxx" and in this programm we write ( In lua coding language) the needed stuff.

There we can do all coding ways we like.

E.g.
Send 3x Left and 2x Right.
or
We can say... check the virtual switch position ... If its higher then our target then turn left, if its lower then turn right..: Check again. If its equal then stop.

In easy words....
For stuff that need a deeper code instead of fire a single command or write a dataref to a hard value we currently need this "external" solution !



Hello Pizman

Could you show us, with a screenshot, where you've placed the macro in MF and where we should store the LUA file?

Thanks for your help.
2024-03-10 12:20
Avatar
XPRoberto
From: Hungary
Posts: 65
iconPilotOlivier:

iconXPRoberto:

iconnicolask:


Hello XPRoberto

Unfortunately, it's not very clear to me. Could you please share the screenshot of the MF output and input to see how you proceed?

Many thanks for your help.


Hi,
Come to discord, there we can share screenshots.
However it is not so complicated.
If you followed the basic tutorials, you can easily create the logic yourself:
- how to set up a simple output (you need one that shows the current position)
- how to setup inputs with preconditions (as I described you need to create several inputs)

Try it step by step, then you can figure out all the others.
a) Your switch is in position #0. (output value of current position = 0)
b) You turn the switch to #1
c) Then the input event: precondition: current_value=0; action=command_up

2nd example:
a) Your switch is now in position #1. (output value of current position = 1)
b) You turn the switch to #2
c) Then the input event: precondition: current_value=1; action=command_up

3rd example:
a) Your switch now is in position #2. (output value of current position = 2)
b) You turn the switch back to #1
c) Then the input event: precondition: current_value=2; action=command_down

Try it :)

[Last edited by XPRoberto, 2024-04-10 15:32]
----------------------------------------------------------------
Do you know that you can simplify: if($=1,0,1) ?
Use simply: 1-$ :)
2024-03-11 13:52
Avatar
azpilot61
Posts: 1
Hi Folks, new to Mobiflight things and I've done some really basic stuff, but now I'm stuck and no understanding or maybe I do and just need more clarification
Autobrake rotary dial for Zibo 737

I have the following commands to work with on the zibo side
-
laminar/B738/knob/autobrake_up
laminar/B738/knob/autobrake_dn

And this that tells me the position of the knob but do I even need it?
-
laminar/B738/autobrake/autobrake_pos

Looking at the below I have a 6 position rotary knob for RTO, OFF, 1, 2, 3, MAX so I need 6 input configs

my questions are below in bold

Assuming you have a readonly dataref: 0..1..2 and commands: up and down
Assuming you have hardware input device: 0...1...2 (e.g. a rotary switch)
you need 4 input configs


Is this a name? config_0-1
I assume this is the first position of the rotary knob? input device #1
Current value is the first position? Action would the command laminar/B738/knob/autobrake_up? (precondition: current_value=0; action=command_up

config_1-2
input device #2
precondition: current_value=1; action=command_up

config: 2-1
input device #1
precondition: current_value=2; action=command_down

config: 1-0
input device #0
precondition: current_value=1; action=command_down

Thanks
2024-04-09 13:51
Avatar
XPRoberto
From: Hungary
Posts: 65
iconazpilot61:

Assuming you have a readonly dataref: 0..1..2 and commands: up and down
Assuming you have hardware input device: 0...1...2 (e.g. a rotary switch)
you need 4 input configs


Is this a name? config_0-1
I assume this is the first position of the rotary knob? input device #1
Current value is the first position? Action would the command laminar/B738/knob/autobrake_up? (precondition: current_value=0; action=command_up
Thanks


Hi,
It is correct, that you have 6 input devices: from RTO to MAX (you connect 6 pins in Arduino, one for each position).
RTO current value=0
OFF current value=1
...
MAX current value=5
The first move is going from position 0 to 1 (RTO->OFF) with an up command.

Therefore you create an input for rotary position#1 (not 0, that is the RTO)
precondition: laminar/B738/autobrake/autobrake_pos=0 (now in RTO)
action: laminar/B738/knob/autobrake_up (goes up to OFF)

You can create the events all the way up and then down.
Certainly for current value=0, only UP command is valid and for current value=5 only DOWN command.

e.g. a down event back to RTO looks like this:
You create an input for rotary position#0 (that is the RTO switch)
precondition: laminar/B738/autobrake/autobrake_pos=1 (now in OFF)
action: laminar/B738/knob/autobrake_dn (goes back to RTO)
[Last edited by XPRoberto, 2024-04-10 15:53]
----------------------------------------------------------------
Do you know that you can simplify: if($=1,0,1) ?
Use simply: 1-$ :)
2024-04-10 15:40
Go to page 1Go to page 112Go to page 3Go to page 2