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.

Go to page 1Go to page 012Go to page 2Go to page 2
Avatar
pluckas
Posts: 104
Supporter
Greetings,

I've just discovered I'm very behind in updates (v7.9) so I downloaded v9.1 and to my surprise have discovered some nice new features. I'm very interested in the retrigger feature, but in order to use it I will have to remove all my Bodnar switches from FSUIPC and define them in Mobiflight. I'm happy to do this of course, but before I get stuck in I'd be interested to know if there are any issues that make it less than perfect (ie, there's no point in having a retrigger option if some switches are not supported).

I'm using the usual variety of momentary, toggle and rotary switches in my overhead (nothing unusual).

Thanks,

Paul
2021-11-04 05:00
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
:-)

This feature is NOT "new" .
Retrigger System is a part of MF since 4-5 Years !
BUT
There was a Problem all the time in case it work only for ON-OFF Switches and Roatrys. 3Way On-Off-On was not perfectly supported.... Here the Retrigger only work if switch was in Mid or lower Pos..... But failed if it was in "upper" Pos.

NOW with 9.1. this issue is gone.
So YES.... There should be no known issue left and this system will work as expected !


EDIT:
Think about momentarys !
if your Bodnar uses those.... You not need to rework / migrate to MF.
Retrigger is only needed for latching switches. So for momentary it make no sense and you can leave them also on the Bodnars.
Additional..... If i´m correct the bodnars not need a Retrigger. As a Joystick device they should be sync at all time.... right ?
And finally with 9.1 you can also use the Bodnar Buttons in MF.... So again a rebuild is not needed!
[Last edited by pizman82, 2021-11-04 20:48]
Good Luck !
2021-11-04 20:43
Avatar
pluckas
Posts: 104
Supporter
Thanks Piz,

I actually spent some time on this yesterday - moving everything into Mobiflight makes sense now that it handles more than Arduino. The retrigger function is fantastic - I was amazed see all of the switches in the virtual cockpit move to the positions that they are left in hardware when starting Mobiflight - it's not even necessary to activate the button that retrigger is mapped to (it's time to send another 'coffee' to Sebastian). One thing - I don't think it handles rotary switches with more than 2 positions (at least not the way I have them set up). Is that correct?

Also, I read somewhere that Mobiflight no longer needs FSUIPC. Am I right, or did I misread this?

Many thanks,

Paul
2021-11-05 00:41
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi again.

The "Retrigger" System is technical pretty basic.... In the past it simply check every INPUT Config ( from Up to down like it is created in the MCC File) ..... Then it "tell" the Mega it should send the current position of every Input ( Low or High) SAME WAY as the button would be pressed ( or released) by the user at this time. ( in the order of Configs)
Mobiflight detect this "imaginary" Inputs and just execute the Event/Offset write/Jeehell Event and so on that was set by the user for this action ( Press or release).

As i said above.... this occure in a issue for ON-OFF-ON switches, cause MF see them as 2 Individual Switches. ( 2 Pins) . If switch was in upper position the first Config send a Press but the second ( from the lower switch) send a Release.... So System was not working. ( The second Overwrite the first)
NOW after 9.1 we send the Retrigger simply in 2 Phases.... First all Inputs that are LOW ( all releases) and then all Inputs that are High ( all presses)
This simple chage solve the Unsync Trouble for ON-OFF-ON.

So your Rotary Switches should be no Problem ( whatever i not know how you set them)
NORMALY a Rotary is set as individual Buttons ( Lets say a 5 Pos Rotary is seen like 5 Buttons)
We normaly not use "On Release" here.... Every Position (Button) have just a PRESS Command that set the virtual System to the same position as the Rotary Switch.

With new Retrigger this is perfect. In the First Loop there happend NOTHING ( Cause non of the Rotary Switches have a Release Command in use)
In the Second Loop only the current selected Position is Press..... So the other 4 are ignored. And finaly this Press Position send a Press comand to MF and this config set the sim to the position of the Rotary.

May i miss a situation in my brain where the system struggle..... But a.t.m. i think it should work NOW for every possible build.
(Tell me your setup.... then we can check if it work)

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

About FSUIPC.
For FS2020 : YES
Here we be able to handle the functions of FSUIPC by our own new WASM System..... And we proudly say: In a better way as FSUIPC ever done.

For older Sims like FSX/P3D,Xplane : NO
Here our WASM IDea is not compatible and you still need FSUIPC as a interface from MF to Sim !
Good Luck !
2021-11-05 01:16
Avatar
pluckas
Posts: 104
Supporter
What about something like the overhead DC meter rotary switch. In my case, PMDG Event ID 69635 which has 8 positions which I've defined a custom parameter 0 - 7 for each config. Does the retrigger work for this (I can't seem to make it work)?

Paul
2021-11-05 08:22
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Again.... I not see your config.... So may you make strange things with preconditions or so..... Means: I can not garantee for every possible idea,...
BUT
From my Point of View.... YES it workes....

This switch is controlled via Event ID
iconQuote:


INPUT :
as you said 69635 .... With Parameter 0-7

Corespondending Output:
6473 1 BYTE ELEC_DCMeterSelector
0: STBY PWR 1: BAT BUS..... 7: TEST



If you use a 8 Position Rotary Switch ( e.g. a standard 30° 12 Pos Lorri Switch with a Endstop on Pos 8)
Then you have in MF simply 8 Button Devices ..... wired by 1 single wire EACH pin (0-7) on the switch to 8 different Pins on the Mega .... Each defined as a Button Device in MF

As explaned above.... You got 8 Input Config ( one for each Button Device / Position of Switch). ..... All INput Configs use only ON PRESS..... EventID 69635 for all
Parameter "0" for the Pos0 Button..... Parameter "1" in the Pos1 Button Config... And so on!

If you use Retrigger Function.... and lets expect REAL Switch is in Pos 0 "Stby PWR" .....
In the First Loop MF only execute "On Release" Inputs......
In case all 8 Configs NOT have a release set by the user all 8 will be ignored. ( Whatever they are released electrical..... Important is if there is a Command set in the Config... And there is NOT!)

In second Loop all Presses would be send.....
Here it send the Press of the Input-Config of the Button Pos 0 Device..... So it send "69635 Parameter "0"" ......
All other Configs ( Buttons) are currently released..... So they will be ignored once again ( cause only Press Inputs are send in that second loop)


Summary; For sure.... the retrigger will work here.


EDIT: In verry easy words....
The Retrigger System say....
1. Ask the Mega if the Button that is used in the FIRST Config of the MCC File is Released ??
If NOT Jump to next Config line in the MCC.....
2. If YES then check if it have a Entry for a executed Command in the "On Release Tab" ....
If YES.... Execute the RELEASE Command that is set by the user ......
If NO then again ignore this Config and jump to the next!
After reach the last config we start again..... But now inverted.... We ask for PRESS!
so ....
1. Ask the Mega if the Button ( first Config in MCC) is currently Pressed.....
If NOT..... Jump to the next Config Line.....
If YES.... And it have a Press Command Set..... Execute it...... If no command is selected by the user then ignore and Jump !
[Last edited by pizman82, 2021-11-06 02:05]
Good Luck !
2021-11-06 01:57
Avatar
pluckas
Posts: 104
Supporter
Thanks for the detailed reply. I have no pre-conditions set on any of the troublesome switches.

I'm trying to narrow down why some of my rotary switches retrigger, but some not. Quick question - is there any difference in the behaviour of the retrigger function with switches run through an Arduino Mega compared to a Bodnar board? My 737 AC/DC panel runs entirely through a Mega. Even the Cab/Util and Seat/Pass toggle switches won't re-trigger.

Also, I presume a 3-way toggle switch will not retrigger if it's in 0-1-2 configuration, where "1" is connected to ground?

Paul
2021-11-06 07:17
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
I not work with Bodnars. So i can not tell you. May they have a internal Retrigger or the fact these are HID Joystick Buttons occure in a permanent trigger ???? You must find out.

Why some of your switches not work..... I don´t know and we would need to figure out each single.

For example.... 3 way switch in "0 1 2" with GRD in the middle..... So it´s not a real 3Way Switch ( ON_ON_ON) its a 3 Way Switch but with only 2 electrical Switches inside. (ON_OFF_ON)

Normaly this must work..... Aslong you use the correct Systme in MF.....
2 Configs.... One for the upper and one for the lower Pin ..... Both use on Press there needed Command ( the upper set to 0 the lower set to 2 )
And Both Configs use a Release and send both the command to set "1" .....

Lets make a Example for all 3 Situations with retrigger.....

1: Switch UP.
In first loop the first get ignored (it´s pressed but only releases are done) ..... The second Config is currently Released ( The lower switch is released whatever the physical switch is in Middle or like currently in upper position) .... So YES.... It would now set the sim to "1" ( it´s release command) . We know this is wrong! But thats no problem cause it also du the second loop.....
NOW in Loop 2 the First Config ( upper switch) get detected as "PRESS" ..... So it send "0" to the Sim .....: And the Virtual switch is now also in UPPER Position.
The second switch get ignored now in case its released and only press Situations are checked in that second loop.

2. Switch Mid.
In first loop it detect a release of Switch 1 ..... So it send "1" to sim. .... Directly behind it detect the release of also Switch 2.... So it send AGAIN a "1" to the sim.
Switch is Sync ! .... Second loop have no effect ( cause both are released)

3. Switch DOWN
First loop in first Config would send a Release ..... So Virtual switch is set to "1" ( again fault but no mater ) Second Config does nothing ( cause currently not released)
Second Loop .... First Config do nothing (not pressed a.t.m.) ..... Second Config NOW detect Press and set Virtual switch to "2"
Again Switch Sync !!


***************
I hope now all is clear.... You got the "logic". Now check if you did it same way.
If there is really a problem left..... Show us ( Via Discord ). We could not test this in thousend of different States. Our Testing was good and the logic looks good.
May there is a issue in the code we not explore !
Good Luck !
2021-11-07 15:27
Avatar
pluckas
Posts: 104
Supporter
Thanks again for confirming my understanding. Just to further refine what I'm seeing based on your feedback so far:

The configuration of my 3 way switches is exactly as you describe "0 1 2" with 1 on ground. None of my three way switches retrigger if left in the middle position. They only retrigger on "up" or "down" (0 or 2).

My configs are exactly as you describe, for example:

Bleed Air Isolation Valve has two configs - Valve Closed and Valve Open. With switch up "On Press" is Event ID 69834 with Custom Param 0. "On Release" (switch middle) the event is 69384 Custom Param 1 (Valve on Auto). Switch down has the same Event ID but with "On Press" Custom Param 2, "On Release" Custom Param 1.

None of my three way toggle switches retrigger when left in the middle position. They are all typically wired with the middle pin to ground.

All of the two way toggle switches and rotary switches retrigger perfectly, including the 4 way engine start switches, the 4 way IRS Selector switches, and the 3 way cabin pressure selector switch.

All of the above switches are run through Bodnar boards.

I have one panel with switches that run through a Mega - the DC and AC selector rotary switches and the simple 2 way toggle switches for "CAB/UTIL" and "IFE/PASS" power. None of these switches retrigger, even the simple two way toggle switches. I have the same experience for my Autobrake selector switch, which also runs through a Mega. The only difference between this and the above working switches is that the switches run through a Mega, rather than a Bodnar. Is there something I'm missing about the way the Mega needs to be configured to retrigger switches?

Finally, can you clarify the re-trigger function? I've tried to find some documentation on it without success. I gather that this function can be assigned to an empty switch (ie, it doesn't actually need a physical switch, it just uses an available pin). It runs automatically when Mobiflight is executed with sim running. That's my experience. I've tried both a 'fake' button on Mega and a 'fake' button on Bodnar. Both retrigger perfectly, except switches running through Megas.

Paul
[Last edited by pluckas, 2021-11-08 04:47]
2021-11-08 03:13
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
I think you/ we got a full understanding Problem.....

1. Why talk about Bodnars again

Do you use the Bodnars WITH Mobiflight ? ..... So the Bodnar is a 32 Button Device and you use e.g. in Mobiflight in a INPUT Config as Device those Buttons ?
So not a Button on a Mega Pin ( Mobiflight Board) .... You choose for the Brandnew tool in Mobiflight ( Using HID Controller Buttons as Input source! ) ????

If YES..... Here there was no testings for the Retrigger Feature..... Simply cause it was build years before the HID Button System comes into MF ( some weeks ago)
(( NOTE To Stephan/Sebastian.... We need to confirm this))
https://github.com/MobiFlight/MobiFlight-Connector/discussions/557

If NO.... and you use the Bodnars 100% indipended from Mobiflight..... then for sure our Retrigger Feature have no effect. MF not talk to Bodnar Firmware. This is a fully own thematic!


2. How to use Retrigger.
You missunderstand.... MF Retrigger is not a "Automatic" thing..... Its a feature you can start by define a Button to it.
Means you create a INPUT Config..... You choose for a existing Button ( e.g. a small momentary Microswitch you set somewhere hidden in your cockpit.)
As Typ of Input you choose for "Retrigger" .
If you now run MF and you press THIS Button then MF make one "Retrigger Phase" and simply fire all Inputs (you have a Config for) in the way i explane above.

EDIT:
To be clear...... Yes. You could simply assign a empty Pin as Button..... and you could use this "FAKE" Pin for the Retrigger Config.....
BUT this not helps.... In case the Retrigger is only fired if the Pin change his state..... So if it get PRessed by a real Button for sure !
[Last edited by pizman82, 2021-11-08 16:28]
Good Luck !
2021-11-08 16:22
Avatar
pluckas
Posts: 104
Supporter
I should have mentioned before that my Bodnars are all used as modules within Mobiflight (the 'new' feature).

Ok, some information from testing that might provide useful:

First, I created a Retrigger event using a 'spare' momentary button on my overhead:

1. When Mobiflight is run (with sim running), switches wired to a Bodnar retrigger "automatically" - ie, pressing the physical retrigger button is not required.
2. Switches connected to a Mega require the retrigger button to be pressed to 'refresh' their position.
3. The Retrigger function does not recognise the 'middle' position of a 3 way toggle switch connected to a Bodnar (using a '0 1 2' config with 1 connected to ground as previously discussed). It does appear to recognise the middle position of a 3 toggle switch connected to a Mega.

In addition, the retrigger button can be either a button connected to a Mega OR a button connected to a Bodnar. Both work as retrigger buttons for switches connected to Megas.

The recent addition of other Modules in Mobiflight makes it very flexible, but some tweaking of the code might be needed to allow retriggering to work with these modules. In my case, everything works as expected, except the middle position of 3 way switches connected via a Bodnar module.

It's interesting also that a physical switch press is not required to retrigger Bodnar connected switches. I wonder if this is possible on the Arduino Mega?

I hope this is useful.

Paul
[Last edited by pluckas, 2021-11-09 02:53]
2021-11-09 01:27
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
OK

thanks for Info....
Looks like our idea was good ( for megas) but not work wor HID Devices in the On-OFF-On State.

BUT

iconpluckas:


It's interesting also that a physical switch press is not required to retrigger Bodnar connected switches. I wonder if this is possible on the Arduino Mega?



Thats a interseting question..... But WHO need this.

I have no stastict data..... But i will say 95%+ Users never use the Retrigger System.... So they also not expect a automatic workarround.
there are easy logics to prevent critical situations ( same way as done in 50.000€ Sims, that also have no kind of retrigger ...... Simply use Startup States )

So.... I agree..... Technical we "could" provide a option that say "automatic retrigger after press RUN" ..... And thats pretty sure usefull for you and some other users.
But....
In case the user base not need or want a retrigger..... this should be optional! Or should it not ????

So.... A Fact that need to be discussed..... Pro and Contrra Arguments..... Lets find a solution !
Good Luck !
2021-11-10 00:26
Avatar
pluckas
Posts: 104
Supporter
Automatic or not, I think the re-trigger function is very important. A saved startup state in the sim does not guarantee the mechanical switch position - the two are separate. I think it's a fundamental feature to have, but I'm more than happy to press a button to activate it.

Now, do you think the middle position HID issue is an easy fix for Seb?

:)
[Last edited by pluckas, 2021-11-10 10:34]
2021-11-10 09:24
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconpluckas:


Now, do you think the middle position HID issue is an easy fix for Seb?



I don´t know. Without see and understand the code here i can not say if this is a bigger deal or not.

About Startup State....
Correct: These are TWO seperate Things.... Thats why a lot of people working with this two states in combination.....
Means they got a Startup State in the Sim ..... and they also get sure the real cockpit is set to exactly the same State.

Mostly done by 3 Systems.....

1. Basic State..... So Sim always load in same Panel State ( standard file) and they got a Checklist for every single Latching Switch and Multi Pos Switch.... So the user will SETUP the Cockpit before start flying to this BASIC State by checking each single Switch if it is correct!

2. The same like Point 1.... But work is done at the End of the Flight..... Means after landing the user shoutdown the Aircraft with a checklist to the Basic state.... Means he put every single switch to the position that is required for the "standard Pnale State".

3. Create new Panel States after every usage......
The user simply after he stop using his Cockpit he SAVE the current State of virtual Cockpit into a new Panel State File..... On next Usage he not work with a standard state.... He simply LOAD the last used file..... So Aircraft stand on same spot like last flight..... And also is set in same condition as it was leaved last time...... If nobody touch a switch in Homeckopit while it was OFF, then again all is Sync !


******
Whatever..... I agree. A Sync system is today way better..... This old logic is no longer needed in case we got this tool !
Good Luck !
2021-11-10 12:52
Avatar
Captain_Johnny
Posts: 21
iconpluckas:


Bleed Air Isolation Valve has two configs - Valve Closed and Valve Open. With switch up "On Press" is Event ID 69834 with Custom Param 0. "On Release" (switch middle) the event is 69384 Custom Param 1 (Valve on Auto). Switch down has the same Event ID but with "On Press" Custom Param 2, "On Release" Custom Param 1.



Hi there, I see you've got 2 different Event IDs; 69834 and 69384. I'm thinking one of those might be a typo - which is correct for the Isolation Valve?

I couldn't find an event ID to use in MobiFlight with my Arduino - is the above a Microsoft, or Asobo generic aircraft?

Are the parameters 0=Close, 1=Auto, 2=Open ?

Thanks.
2023-01-28 11:15
Go to page 1Go to page 012Go to page 2Go to page 2