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
sisoffi
Posts: 91
Hi, Sorry for this question probably request many other times.

In my cockpit i need to set some momentary pushbuttons with two functions , One on Press with
State ON and again another Press state OFF.
In the event list i have only one event id but
If i assign a classic 1 on Press and 0 on release i havent Only on and off when i release button.
How to' do ti have this particolar setting?

Many thanks
Simone
2020-08-31 23:21
Avatar
sisoffi
Posts: 91
I did some tests to also know the status if event-ID or offset.
The key in question is controlled by an event at the click on press ON the event is 69917 with parameter 16777217
while when I click again and parameter 16777216.

The problem that if I assign the on press and on release functions in this way I have at the first release the OFF state.

thanks
Simone
2020-09-01 09:03
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

At first you must split between AddOns.
A AddOn ( Your quoted EventID is PMDG) work different to a Standard Aircraft !!

In PMDG most functions are "logical"..... Means the Event do what they should do.

A Momentary Push Button is in PMDG normaly controlled by a EventID with a LeftSingleClick ..... Parameter 536870912
If the Function in Virtual Cockpit can be disabled again with another click then this EventID ( again with LeftSingle Parameter) will also disabled it.... Same way as you click with the mouse.

A Latching switch work with Parameters of there position ( mostly 0 OFF 1ON or 0,1,2,3,4,5 and so on from Left to right or Up to down for Multi Switches)

YOUR PROBLEM:
In your request you try to handle a Latching system with a momentary button. This is possible with a standard Aircraft, but difficult with PMDG.
At the moment the only logical way ( i see) is to build 2 Configs for each button.....
Config 1 set the Switch to ON "1" Config 2 set the Switch to OFF "0" .....
Then you create a Output Config that Read the specific Switch Position from the Sim.
And finaly you build in each INPUT config a Precondition that it should work only if the Output Config says the switch is in Opposit position in the sim.


Solution: Use Latching switches if they are also used in the sim..... then you not need to think about that strange logic !
Good Luck !
2020-09-01 12:35
Avatar
sisoffi
Posts: 91
Thank you Pizman.
is not pmdg but MaddogX, but is the same work with eventID.
CAn you please make an example on how i will set an output with precondition mode?
in my case for example The key in question is controlled by an event at the click on press ON the event is 69917( with parameter 16777217
while when I click again and parameter 16777216)

many thanks
Simone
2020-09-01 18:44
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Why this parameter...... Does Maddog require this ?

As you know i not know maddog. So my first idea is to ask if there are multiple parameters ? For example does there exist a "toggle" Parameter.... If yes you not need a precondition. then this Parameter would simply say "if ON then OFF Else if still OFF then ON"
Otherway if this are Mouse actions like in PMDG then check if there is a different mouse action that occure in the situation you looking forward to.


About your Question:

To solve these with a Precondition you need at first a indicator..... this must be a Offset you read with a OUTPUT Config.
In PMDG e.g. you can read a Offset that is 1 or 0 in case a latching switch is in ON or OFF Position.
If we read it and call the Config e.g. "xxxSwitch Indicator" then we can use it for precondition.

Finaly you create TWO Input Configs here..... Both use the same Hardware Switch.
Config 1 will send the parameter to set the switch to ON ( mostly 1) Config 2 will send the parameter to set the switch to OFF ( mostly 0)
Then you create in each Config a Precondition.....
The First got "Only work if Config "xxxSwitch Indicator" = 0" The second got Precondition "Only work if Config "xxxSwitch Indicator" = 1"

In easy words.... If our Output say the Offset is "0" ( Switch is in OFF position) then the first Config is active.... Means if you press your button then Mobiflight send a "1" to the Sim and Activate the funtion. AFTER this happens the Offset change cause switch is ON now..... That means now Config 2 is active.... And on next Press Mobiflight will send a "0".

Summary: Whatever i not know Maddog.... I think if they work logical then you can solve this with a better parameter and not need the precondition !
Good Luck !
2020-09-02 00:39
Avatar
sisoffi
Posts: 91
thanks piezman, as usual for your invaluable support.
Surely the maddog has parameters but the team does not collaborate or answer my questions :thumbdown: so I have to try to manage myself.

Investigating with pete dowson in the fsuipc log it would seem that "the event id 66917's, with parameters 16777217 (0x01000001) and 16777216 (0x01000000). Not how simple the numbers are in hexadecimal. They appear to be flags so I suspect these are mouse codes"

this is confirmed to me by a macro code table that I received and which I am attaching here. However, the table is not complete and I don't understand where I could be able to read the macro values in order to assign them to the macro: MADDOG_X: L: CM1_EFISCTRL_EVENT


Decision Height + RS, WU 1=L:CM1_EFISCTRL_EVENT=SET MADDOG X: L:CM1 EFISCTRL EVENT set MADDOG_X:L:CM1_EFISCTRL_EVENT 16384
Decision Height - LS, WD 1=L:CM1_EFISCTRL_EVENT=SET MADDOG X: L:CM1 EFISCTRL EVENT set MADDOG_X:L:CM1_EFISCTRL_EVENT 8192
PFD + RS, WU 1=L:CM1_EFISCTRL_EVENT=SET MADDOG X: L:CM1 EFISCTRL EVENT set MADDOG_X:L:CM1_EFISCTRL_EVENT 16385
PFD - LS, WD 1=L:CM1_EFISCTRL_EVENT=SET MADDOG X: L:CM1 EFISCTRL EVENT set MADDOG_X:L:CM1_EFISCTRL_EVENT 8193
ND + RS, WU 1=L:CM1_EFISCTRL_EVENT=SET MADDOG X: L:CM1 EFISCTRL EVENT set MADDOG_X:L:CM1_EFISCTRL_EVENT 16386
ND - LS, WD 1=L:CM1_EFISCTRL_EVENT=SET MADDOG X: L:CM1 EFISCTRL EVENT set MADDOG_X:L:CM1_EFISCTRL_EVENT 8194
WX + RS, WU 1=L:CM1_EFISCTRL_EVENT=SET MADDOG X: L:CM1 EFISCTRL EVENT set MADDOG_X:L:CM1_EFISCTRL_EVENT 16387
WX - LS, WD 1=L:CM1_EFISCTRL_EVENT=SET MADDOG X: L:CM1 EFISCTRL EVENT set MADDOG_X:L:CM1_EFISCTRL_EVENT 8195

if I wanted to try with a precondi

tion, would you explain to me which offset should I assign to the output? one at random? do i create it?
could you give me a practical example?

thank you so much
2020-09-03 09:54
Avatar
sisoffi
Posts: 91
Hi Piezman,
i received from Maddog Team the event ID for pushbutton like Toggle switch without paramter.
I tried to put event ID with parameter 0 (ignore ) but dont work.
The team assue me that is correct.
It work like in the past with parameter 1 on press but without relese remain everytime ON. if i add release dont remain open.

Is mobiflight that not interpret correctly the new event id?

many thanks,
Simone
2020-10-04 09:19
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Mobiflight simply do what you tell it to do.
In your case it send a EventID ....
Mobiflight not Know it is Maddog.... Mobiflight not know what Sim or FSUIPC you ar use. It just do what it do.

If maddog tell you, you should use a EventID for a TOGGLE then pertty sure they also give you the needed Parameter. If they say there is no parameter, then it is a "execute" event. Means it simply do something.... always the same whatver you use parameter 0,1,2, or 9999999999.

So.....

Mobiflight will simply send on Press the EventID you choose with the parameter you choose. If you use no Release it will not send it. If you enable release you can choose there e.g. a other EventID again.
I will say 99,9% this is not a Mobiflight issue.

What does Maddog Support say if you ask them for the Parameter ? If you get in contact and they give you the EventID pretty sure they also explane you how to use it don“t they ?
Good Luck !
2020-10-05 10:58
Avatar
sisoffi
Posts: 91
thanks pizman,
in fact and as I thought, I just wanted to exclude something to be set on mobiflight. Maddog support created the event id especially for me as a eventID like a toggle switch with ignore parameter and I configured exactly as they said:

"maddog ignores the parameter, toggle on / off every time it receives a command. So you can also set it to 1. The important thing is that the command is sent only once, onpress or onrelease as you prefer"
2020-10-05 12:12
icon