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
SteveBurney
Posts: 14
I'll start with I love the software. I can't believe how easy it makes it to connect hardware through an Arduino to control items in the cockpit. But..

I've been banging my head up against a wall on this issue for over a week now, I'm hoping you can help me. I'm using Mobiflight connected to an Arduino Mega and trying to get it to control a Mindstar GNS 430. I have a button connected to the Arduino pin 32 (I've tried other pins, too). In Mobiflight I have that set to send event ID 66375 param 0 on press. It's the command that corresponds to the CDI key to toggle between VLOC and GPS. When I press the button the Mobiflight log window shows:

8/10/2019 9:38:13 PM(21): Executing OnRelease: GPS_CDI@SN-0f5-0ef
8/10/2019 9:38:13 PM(17): Config found for button: GPS_CDI@SN-0f5-0ef
8/10/2019 9:38:11 PM(805): Executing OnPress: GPS_CDI@SN-0f5-0ef
8/10/2019 9:38:11 PM(801): Config found for button: GPS_CDI@SN-0f5-0ef

There is no OnRelease command, so nothing is happening there. The problem is that when I press the button the command gets sent to FSX-SE twice, which can be seen in the FSUIPC logger.

42609 *** EVENT: Cntrl= 66375 (0x00010347), Param= 0 (0x00000000) TOGGLE_GPS_DRIVES_NAV1
42672 *** EVENT: Cntrl= 66375 (0x00010347), Param= 0 (0x00000000) TOGGLE_GPS_DRIVES_NAV1

This causes the setting to switch from one to the other, then right back where it started. I have other buttons set to other functions that are working fine, I just can't get this one figured out.

Any suggestions?

Thank you.
2019-08-11 03:55
Avatar
DocMoebiuz
Moderator
From: EDSH, Germany
Posts: 1516
I am glad you find MobiFlight helpful and easy to use.

Based on the log output it looks like you it executes some config on Button OnPress and on Button OnRelease.

Please check on more time that there is no input configured for onRelease.

If you like you can share your config, e.g. via Dropbox or so.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - MSFS2020, FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2019-08-11 05:50
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
As Sebastian said.... It look like you have a release in use .... Please check this.

If NOT then we should exclude a "electrical" issue.

You said you have multiple buttons in your setup and multiple elements in sim you like to controll.....

So testing workflow is pretty simple:
Use for the problematic Config for testing a other button ( taht work fine till now with a other function) .
Reversed use on the problematic device a other Config for a other function that also work fine at the moment with the other input device.

The result will be clear..... If in first test the other button occure in same problem ( whatever it work fine before) then the CONFIG is the Problem.
If in Second Test the other Function that worked before ok with another button get broke on your current "problem-Button" then the issue is electrical in the Device itself.
Good Luck !
2019-08-11 15:18
Avatar
SteveBurney
Posts: 14
Thank you for the reply. It’s not an ‘on release’ event, though. I’ve verified that it’s set to ‘none’. Also, the 2 identical lines get sent to FSUIPC if I press and hold the button down (no release). In addition, I’ve altered the configuration for the button I have set up for the MSG function to send the toggle gps event instead of the msg event-I changed it from event 66606 to 66375. While it works perfectly when set to 66606, it, too, sends the event twice when set to 66375. Likewise, when I set the button I’ve configured to toggle the gps to send event 66606 instead the event only sends once and works perfectly. I think the testing I’ve done indicates that it’s not a hardware issue, but that for some reason some part of the software sends the 66375 event twice, regardless of which button it’s sent from. Do you have any insight on why this, and only this, event gets sent twice, regardless of which button is configured to send it?

Thank you again for your assistance with this perplexing problem.
2019-08-11 21:38
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Ok....

The next question is.... Does "Mobiflight" send this second event OR does something else do this ?

To check this..... There are multiple ways.

At first its interesting what AddOn you use. Extremly a AddOn aircraft can also send Events. So for example a Input ( e.g. by Mobiflight) can be overwritten by the AddOn Aircraft itself.... Like the AddOn said " Hey.... Somebody send a event i not like.... so i will send myself a Event of my choice" .

To test if Mobiflight is the nature of problem a registred FSUIPC would be cool. Here you can set Events ( In same way like Mobiflight) directly to Joystick Buttons.
So the most easy test condition is.... Set the problematic Event to a Joystickbutton ( for example of your main joystick you controll your aircraft like the "fire" Button.

Then press this button and observe the logging Mode on FSUIPC..... If Event is sent also 2 times then the "Event" itself is strange. If not we can say the problem is in Mobiflight !
Good Luck !
2019-08-11 23:56
Avatar
SteveBurney
Posts: 14
I tried it like you said. When I mapped the event to a joystick button, the same thing happens. So, it looks like it’s not Mobiflight. I guess I’m off to the A2A forum to see if they can help.

Thank you for your assistance in troubleshooting.
2019-08-13 14:12
icon