Author Topic: Gamepad / Controller / Joystick Issue  (Read 13244 times)

lunaxis

  • Newbie
  • *
  • Posts: 4
Gamepad / Controller / Joystick Issue
« on: November 05, 2014, 08:55:56 pm »
Dear FSDreamTeam,

I recently bought your software, and I really like it. Great Job.

I'm using a Xbox 360 Wireless Controller (Windows System Panel is showing "Controller (Xbox 360 Wireless Receiver for Windows)" as Device).
When I start FSX it correctly recognizes my Gamepad as a "Xbox 360 Controller", so the current profile (Controller-Type in settings) is set to "Xbox 360 Controller".
There are no other Gamepads showing up in the "Controller-Type" drop down menu.

However, I noticed that sometimes my controller settings are messed up, when I use GSX.

I've investigated the problem, and I'm able to reproduce it.
Here are the steps:
  • Connect a Xbox 360 Wireless Controller
  • Start FSX
  • Go to Settings -> Controls. The "Controller-Type" should be automatically set to "Xbox 360 Controller"
  • Start a flight
  • Then Addons -> Couatl -> GSX Customize aircraft
  • Close this gsx window
  • After this the controller settings are messed up

After closing the "Customize aircraft" window, a new controller is added to the drop down menu.
Now the Controller-Type is set to "Controller (Xbox 360 Wireless Receiver for Windows)".
The old profile "Xbox 360 Controller" is still there, but you cannot select it, because these changes are not saved.

I cannot use the new profile "Controller (Xbox 360 Wireless Receiver for Windows)", because it has completely wrong button assignments (and it's no longer recognized as an official Xbox 360 Controller).
I cannot change it back to the official profile "Xbox 360 Controller", and therefore I have to restart FSX. And this is really annoying.

I hope you can reproduce this problem and fix it.
Maybe this problem also occurs in other gsx windows, but I was only able to reproduce it (reliably) with the "Customize aircraft" window.

Thanks and best regards

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50875
    • VIRTUALI Sagl
Re: Gamepad / Controller / Joystick Issue
« Reply #1 on: November 06, 2014, 08:43:16 am »
Nothing in GSX ever touches, changes or modify the FSX controls settings so no, what you see doesn't have anything to do with GSX.

What MIGHT be a problem, instead, is when you customize an airplane, GSX will put the sim into slew mode, so the airplane won't move and your edit won't be affected by the airplane weight and IF your joystick null zone is not properly set, and the joystick is set to control slew mode, when the sim go into slew mode, the joystick might spin it around so, perhaps, coupled with the Xbox force controls, might have caused the joystick to be disconnected because the vibrations caused by the fast move made the battery going loose and turn off/on the pad.

This is a very well known problem of the Xbox controller, even on the Xbox: I remember very well not being able to play Halo with vibration on, because when you start shooting, the battery will eventually disconnect and the pad disconnects from the Xbox, and the only solution is to turn vibrations off.

I use a WIRED Xbox controller on the PC ( the PC version, which connects with USB ) and, since it's not powered by batteries, if never disconnects.

lunaxis

  • Newbie
  • *
  • Posts: 4
Re: Gamepad / Controller / Joystick Issue
« Reply #2 on: November 06, 2014, 05:55:46 pm »
After lots of testing today, I can give you a detailed overview.

I've tested two different GamePads, with the same result.
I will go through every suggestion, you made.

GSX will put the sim into slew mode
Slew mode is not causing the problem. I've set the slew mode pressing the "y" key several times. Nothing changed in my controller config.

joystick null zone is not properly set
The problem also occurs when I disable my GamePad using Ctrl+K. So null zones are not causing the problem.

coupled with the Xbox force controls, might have caused the joystick to be disconnected because the vibrations caused by the fast move made the battery going loose and turn off/on the pad.
I've turned of forces/vibration in fsx. I also plugged in the recharging cable. The Xbox 360 Controller is not turning off, and the battery is charging all the time.
So forces/vibrations and/or battery is not causing the problem.

the joystick might spin it around so
My joystick doesn't spin around, I'm standing at the gate, and disabled the GamePad using Ctrl+K.
So the joystick is not causing the problem.

and the only solution is to turn vibrations off.
As said above, even with vibrations off, the problem occurs.

I use a WIRED Xbox controller on the PC ( the PC version, which connects with USB ) and, since it's not powered by batteries, if never disconnects.
I used the wireless controller with the recharger cable attached. I also can confirm that the controller doesn't disconnect.
I also tested a PS3 Controller (attached with an USB Cable and using MotioninJoy Drivers, set to Xbox 360), but the problem still occurs.

what you see doesn't have anything to do with GSX.
I also disconnected the controller manually, and reconnected it afterwards. So disconnecting the controller is not causing the problem.
I also tested windowed and fullscreen mode. Same result. It only occurs, when I'm opening the menus in the couatl menu.

I'm very confident that the problem is related to GSX and/or couatl.

After some investigation I've found out, which windows are changing my config instantly and which windows don't change it.
Here is the list:
  • All FSX windows and popups - No config change
  • Addon Manager Window - No config change :)
  • Couatl -> Key Mappings - Instant config change
  • Couatl -> GSX Settings - Instant config change
  • Couatl -> GSX Customize aircraft - Instant config change
  • Couatl -> GSX Customize airport positions - Instant config change

I've tested it several times (3 times so far). And can reliably reproduce the problem.
So it's definitely a problem related to GSX and/or couatl.

I'm very happy, that this problem doesn't occur when I open the Addon Manager Window.
So we can probably fix this error.

Can you compare the routines, which ared used to open the "Addon Manager Window" with the routines used in den "Couatl -> Key Mappings Window"?
I can confirm that the bug DOES NOT occur in the "Addon Manager Window", and that the GamePad bug DOES occur (for example) in the "Couatl -> Key Mappings Window".

So there must be a difference between these two routines/algorithms.

I've given you a reliable way to reproduce the problem, and I've tested a lot to help you fix this problem.
So please can you look into this problem, and fix it. That would be great.

Thanks and best regards
« Last Edit: November 06, 2014, 06:00:52 pm by lunaxis »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50875
    • VIRTUALI Sagl
Re: Gamepad / Controller / Joystick Issue
« Reply #3 on: November 06, 2014, 09:43:03 pm »
Can you compare the routines, which ared used to open the "Addon Manager Window" with the routines used in den "Couatl -> Key Mappings Window"? I can confirm that the bug DOES NOT occur in the "Addon Manager Window", and that the GamePad bug DOES occur (for example) in the "Couatl -> Key Mappings Window".

So there must be a difference between these two routines/algorithms.

They are entirely different, and there's nothing we can do (or should do) to change them. The main difference is the "key mappings" (and the "customize airplane" menu ) are generated by Python scripts that runs under the EXTERNAL Couatl.exe interpreter, while everything the Addon Manager does, is running INSIDE FSX, because the Addon Manager is a .DLL, not an .EXE.

So, the real issue might be the joypad driver behaving that way, because the window was created from another app, instead from FSX itself, but that's entirely outside our control.

As I've said, there's no direct interaction between anything in GSX or any of our software, with the joystick. Even when we reserve keys ( keys are somewhat related to joysticks, because they both use DirectInput ), we DO NOT try to do it directly, or try to interact with the keys, but we do it in the correct way, which is using official Simconnect calls, to ask FSX to give us a key. But again, this doesn't seem to be a problem, because it's not just happening on the key mapping menu, but any menu created externally.

An useful test would be as follows: do you have other 3rd party apps that create their own windows while FSX is running, that runs as external .EXE ? Maybe you can try opening a window in those apps, and see if the issue is happening the same way.


lunaxis

  • Newbie
  • *
  • Posts: 4
Re: Gamepad / Controller / Joystick Issue
« Reply #4 on: November 07, 2014, 04:22:20 pm »
As I've said, there's no direct interaction between anything in GSX or any of our software, with the joystick.
I understand that your software is not directly manipulating the joystick settings, but apparently there is a behaviour of gsx and/or couatl, that is (indirectly) causing FSX to change these settings.
If you don't want to debug this problem. It would be great, if you can provide me some code snippets from the couatl engine and gsx (the part where those windows are created). So I can debug and fix the problem.

An useful test would be as follows: do you have other 3rd party apps that create their own windows while FSX is running, that runs as external .EXE ? Maybe you can try opening a window in those apps, and see if the issue is happening the same way.
I don't have any other addons installed, but I'm also a developer and can create a simple addon.

So I will then create a simple addon which is using SimConnect (for key input) and the wxWindows Library for the windows.
I would also like to create an addon which is using your couatl engine. Are there any code snippets or documentation I can use?

Best regards
« Last Edit: November 07, 2014, 04:25:04 pm by lunaxis »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50875
    • VIRTUALI Sagl
Re: Gamepad / Controller / Joystick Issue
« Reply #5 on: November 10, 2014, 10:07:41 am »
I understand that your software is not directly manipulating the joystick settings, but apparently there is a behaviour of gsx and/or couatl, that is (indirectly) causing FSX to change these settings.
If you don't want to debug this problem. It would be great, if you can provide me some code snippets from the couatl engine and gsx (the part where those windows are created). So I can debug and fix the problem.

Since you said yourself you don't have any other add-ons installed, you can't say it's a gsx/couatl behaviour. The only way to be sure of this, is to have another add-on that runs as an external .exe file, which also creates a dialog and does NOT affect the joystick. If you could indicate such case, then yes, you could say it's a "gsx/couatl" behaviour"

Quote
So I will then create a simple addon which is using SimConnect (for key input) and the wxWindows Library for the windows.

Be sure you make it as an external .exe, in order to reproduce the same conditions, because that's the key difference between the Addon Manager and the Couatl.exe, the first one being a .DLL which runs in-process, the other one being an external .exe. Both are Simconnect clients, of course.

I wouldn't put wxWindows in the loop, at least not initially. Just create a dialog box using standard Windows API32 calls, and have it on top of the FSX main window. This way, you can test of the problem of being an external .EXE and not a .DLL, or the usage of wxWindow instead.

Quote
I would also like to create an addon which is using your couatl engine. Are there any code snippets or documentation I can use?

You must create a commercial product, and license the Addon Manager/Couatl combination, like Flightbeam is doing. And we usually assist in that.

ctroncy

  • Newbie
  • *
  • Posts: 1
Re: Gamepad / Controller / Joystick Issue
« Reply #6 on: November 14, 2014, 09:12:55 pm »
Bonjour,

I had a lot of problem with a wireless xbox 360 and Opus FSI..
Have a look at this thread..http://forum.avsim.net/topic/453058-joystick-assignments/

 At the end I bought a Sony dualshock 3 connected in BT with the PC... No problem !

Best regards
Claude
« Last Edit: November 14, 2014, 09:15:57 pm by ctroncy »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50875
    • VIRTUALI Sagl
Re: Gamepad / Controller / Joystick Issue
« Reply #7 on: November 16, 2014, 09:03:12 pm »
I was fairly sure this would happen just the same with any other 3rd party add-on, and you just confirmed it. So it's clear it's not a GSX/Couatl issue.

lunaxis

  • Newbie
  • *
  • Posts: 4
Re: Gamepad / Controller / Joystick Issue
« Reply #8 on: January 01, 2015, 01:24:08 am »
Bonjour,

I had a lot of problem with a wireless xbox 360 and Opus FSI..
Have a look at this thread..http://forum.avsim.net/topic/453058-joystick-assignments/

 At the end I bought a Sony dualshock 3 connected in BT with the PC... No problem !

Best regards
Claude
Thank you for your input. Very appreciated.
Unfortunately we don't have the same bug. I assume you only have this bug, when your wireless controller disconnects. I always have this problem when opening a GSX/Cuatl window.

I was fairly sure this would happen just the same with any other 3rd party add-on, and you just confirmed it. So it's clear it's not a GSX/Couatl issue.
At the moment nothing is clear. Claude was having a different issue. As I said many times before, my controller does not disconnect, and I can reproduce the problem, when opening a GSX/Cuatl window.
If I have some spare time, I will write my own little "engine" to test the bug, using your instructions.
Quote from: virtuali
Be sure you make it as an external .exe, in order to reproduce the same conditions, because that's the key difference between the Addon Manager and the Couatl.exe, the first one being a .DLL which runs in-process, the other one being an external .exe. Both are Simconnect clients, of course.

I wouldn't put wxWindows in the loop, at least not initially. Just create a dialog box using standard Windows API32 calls, and have it on top of the FSX main window. This way, you can test of the problem of being an external .EXE and not a .DLL, or the usage of wxWindow instead.
I'll report back, when I have new results =)

namida

  • Newbie
  • *
  • Posts: 12
Re: Gamepad / Controller / Joystick Issue
« Reply #9 on: June 08, 2015, 04:32:05 am »
I'm having exactly same issue since started using a XBOX 360 Controller after my old precision 2 pro was dead.
I've been suffering by this issue for 6-7 times and couldn't find a reason but I realized yesterday it was triggered by GSX menu.

I read the thread and can't agree with GSX team. (again, sadly.)
The computer system can be modified in many ways.
Even GSX does not change the setting of FSX directly, it could be happened when GSX triggers someting. (e.g. shared DLL or calling controller list, etc).
It doesn't matter if other addon is making the change, because without GSX, it never happens.

The GSX is changing a configuration of FSX. It's true.
Maybe there's a driver update for controllers that FSX cannot recognize, and GSX could triggered that while loading their option screen.

It would be appreciate at least showing that you want to help users that using your product..

I UNDERSTAND that it could be unfair to GSX team because Microsoft changed their standard name for controllers.
(From XBOX controller to XBOX controller for windows - yeah this is the source of this issue.)
« Last Edit: June 08, 2015, 04:37:59 am by namida »

namida

  • Newbie
  • *
  • Posts: 12
Re: Gamepad / Controller / Joystick Issue
« Reply #10 on: June 08, 2015, 05:07:14 am »
for lunaxis,

Since this problem does not appears after restarting FSX and not touching any of defected GSX menu,
just copy content of [Xbox 360 Controller #1] to [Controller (XBOX 360 For Windows)] in your Standard.XML.
I think you might already know this but.. just trying to help.

GSX menu seems triggering a new controller scheme into FSX (too old..) and making this issue.
Without help, you could use your gamepad almost normally. (Back and Start button does not working)

It seems that no one's fault. It's just.. FSX is too old program..  :(

alpha46

  • Newbie
  • *
  • Posts: 11
Re: Gamepad / Controller / Joystick Issue
« Reply #11 on: June 18, 2015, 01:16:48 am »
I had the same issue with the Xbox controller. It is nothing but  windows that keeps changing the profiles. I have been trying to figure it out for months. Since I stopped using the XBOX controller, never had any issues.
alpha46

namida

  • Newbie
  • *
  • Posts: 12
Re: Gamepad / Controller / Joystick Issue
« Reply #12 on: June 22, 2015, 06:30:45 pm »
I had the same issue with the Xbox controller. It is nothing but  windows that keeps changing the profiles. I have been trying to figure it out for months. Since I stopped using the XBOX controller, never had any issues.
alpha46

Everytime when choosing option menu or restarting coua.. whatever, It creates a new controller and it makes me mad.
Actually, I really don't use this recently.. so I'm seriousely considering uninstalling GSX.

Because they probably just ignore this issue because only few people using xbox controller.

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50875
    • VIRTUALI Sagl
Re: Gamepad / Controller / Joystick Issue
« Reply #13 on: June 23, 2015, 10:14:47 pm »
Because they probably just ignore this issue because only few people using xbox controller.

Again, GSX and Couatl don't have ANY awareness or ANY effect on the joystick. They don't know what joystick you have, they don't read/write/access ANY of the FSX configuration related to controls, and they don't use/call/interact with ANYTHING in Windows that has any relationship with the joystick (that would be Direct Input. No we DO NOT use it directly, not even for keys, because we only call the related Simconnect so, it's ALL done by FSX itself)

The issue of the XBOX controlled resetting itself it's a very well known issue, and doesn't have ANYTHING to do with GSX, and it happens with OTHER FSX add-ons, see here:

http://answers.microsoft.com/en-us/windows/forum/windows_8-gaming/fsx-drops-connection-to-usb-hardware-on-windows-8/9cff1303-aaaf-4ec1-a160-bb14b169c028

Quote
This error appear for me often when i click on other task outside the real FSX program like chat on vatsim or when click on fscommander (Another program 3 party for FSX).

So it happens with ANY external program that runs together with FSX.

Further down that thread, a possible solution is suggested:

Quote
I went into power management, then power options, change plan, advanced options, USB, then disabled selective suspend.  So far it has fixed my issue.
« Last Edit: October 25, 2016, 09:02:27 am by virtuali »