XBox Controllers Plugin

Questions and comments specific to a particular plugin should go here.

XBox Controllers Plugin

Postby kgschlosser » Fri May 12, 2017 1:54 am

XBox Controller Plugin.

This plugin is loosely based on the XInput plugin by TheRetroPirate.

It Supports the following controller types:
Game Pad
Steering Wheel
Flight Stick
Guitar
Bass Guitar
Drums
Dance Pad
Arcade Stick
Arcade Pad

Added features:
Guide button.
Battery level events.
Force feedback control.
Combination button presses.
Button release events.
Button held events.
Button repeat events.

Plugin will automatically set the polling speed to make sure it is able to capture each and every button press.

I also did away with the use of enduring events as this would cause a problem with more then one remote because if someone was holding the button on the first remote and then the second remote pressed a button it would end the enduring event of the first remote even tho they did not release the button. So i have used a .Repeat event instead.

Instead of having a single thread to check button states one at a time which would impact performance I have elected to have each controller run in it's own thread this will increase performance 4 fold.
You may see higher then usual CPU times with this plugin. this is due to the 4 threads running at 0% packet loss. what this means is that it will not miss a single button press.

Simply double click the attached file and away you go.
Attachments
XBoxControllers-1.0b.egplugin
(49.6 KiB) Downloaded 31 times
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2516
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XBox Controllers Plugin

Postby jachin99 » Fri May 12, 2017 4:46 pm

Great plugin!! but does it support chatpads. I can see this being a useful feature because on the Xbox One for example, I can use the programmable X buttons to turn up the volume on my reciever, or they can be configured to launch apps.
jachin99
Experienced User
 
Posts: 186
Joined: Sat Feb 13, 2016 8:39 pm

Re: XBox Controllers Plugin

Postby kgschlosser » Fri May 12, 2017 7:29 pm

I am working on this plugin and trying to hammer out some things. but I am going to add enduring events as well as the option to have one of the joysticks control the mouse. and as far as that controller I am not sure if it does or it doesn't. I actually completely forgot to add the unknown controller type. I will do that as well. but the ones i listed are the ones that Microsoft identifies. so I would guess yours will fall under either the unknown or just a gamepad.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2516
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XBox Controllers Plugin

Postby CrazyTimes » Wed May 17, 2017 7:49 pm

Is there anything I can do to troubleshoot this plugin? It freezes Eventghost when I try to load it.

Windows 7
EG 0.4.1.r1722
Xbox Controllers 0.1b

Fwiw the 'Xbox 360 Controller (XInpuit)' works fine.

-ct
CrazyTimes
 
Posts: 10
Joined: Sat Mar 12, 2016 3:51 pm

Re: XBox Controllers Plugin

Postby kgschlosser » Thu May 18, 2017 12:37 am

at the present moment it is not compatible with EG 0.4 so if you upgrade to 0.5-rc2 it should work OK. I have a version of it that i am currently testing out. I am trying to get holding the button down to work properly.

if you can do me a favor and run eventghost from a command line and add the -debug switch try and use the plugin. and when it crashes kill any eventghost process that is still kicking about.

and then attach the log file. when you bring up the file dialog when you are attaching the file in the bar at the top type in %appdata$\EventGhost\Log.txt

this will tell me what bit is having an issue
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2516
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XBox Controllers Plugin

Postby CrazyTimes » Thu May 18, 2017 2:16 am

kgschlosser wrote:...if you upgrade to 0.5-rc2
I didn't realize I was so behind the times. I'll try upgrading.

Attached is the log file showing up to the point where it freezes.

Thanks for your help.


[EDIT]
Upgrading did the trick.

I have noticed however the guide button doesn't trip any event. Every other button seems to work fine.

Great work so far. Seems like a very nice improvement over the previous plugin. Especially the button combos which is what brought me into this thread initially.
Attachments
Log.txt
(5.31 KiB) Downloaded 27 times
CrazyTimes
 
Posts: 10
Joined: Sat Mar 12, 2016 3:51 pm

Re: XBox Controllers Plugin

Postby kgschlosser » Thu May 18, 2017 3:15 am

yeah I know I added the guide button to the newest version that i have yet to release


if you want to I could use the help testing the thing as i do not own one of these controllers. I do have another person testing as well. but he is in Germany so when I am avail. usually in the evening he is not available then. if you are interested in helping i need to know if you have an account on GitHub and if you do. please PM me the e-mail address you used to register. I will add you to a chat so we can do more of a real time test
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2516
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XBox Controllers Plugin

Postby kgschlosser » Thu May 18, 2017 3:20 am

and also thank you for the log file. the bit that is causing it to hang is because there is a new added feature to EG 0.5 that allows me to easily test the windows version. and because there are 3 different dll's one for windowx xp up to windows 7, one that you get with the directx sdk and the 3rd is with windows 8 and windows 10. I included the one form the sdk with the plugin as that will run on everything up to and including windows 7. and since the other ships with windows 8, 10 all i do is check to see if the windows version is >= windows 8. and i do not want to have to go about checking it some other way. so this plugin will stay as only working for EG 0.5 and above
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2516
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XBox Controllers Plugin

Postby kgschlosser » Thu May 18, 2017 3:29 am

also what i am doing to the plugin is I am trying to increase the response time. so for instance if you have 4 controllers. it will check one at a time. sequentially. I am changing that to be concurrent. the reason for this is because i am going to make a loop so as long as it's receiving button presses the polling rate will not be used. once you stop then the polling rate kicks in.

and there are going to be additional events added. right now it doesn't do button combinations properly. the new one does. and i am also going to add an option to show repeat events. so for instance if you hold the button. it will show a pressed event and then it will spit out an event at your polling speed that has Repeat on the end and when you release the button the Repeat will stop and a Released event will occur. but at the same time the Pressed event is going to be an enduring event. so things like the Auto Repeat will work properly.


I believe I got the battery level to report properly. and the Force Feedback to function as well.

I added the guide button and I also added an unknown controller type.

I am almost done coding up the threading bits for the key presses. if you are around and want to do some testing lemme know
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2516
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XBox Controllers Plugin

Postby CrazyTimes » Fri May 19, 2017 8:32 pm

I can try to do some testing if you need it. My availability may be a little sporadic, but I am east coast atm so the timing would probably work out.

You've got Mail™...
CrazyTimes
 
Posts: 10
Joined: Sat Mar 12, 2016 3:51 pm

Re: XBox Controllers Plugin

Postby kgschlosser » Mon Jun 05, 2017 9:50 am

new version is on the first post
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2516
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XBox Controllers Plugin

Postby Diz » Mon Jun 05, 2017 5:20 pm

the plugin said my pad needed calibrating and to tap b... after a few taps this is the error:

18:16:35 Calibrating Controller 1
18:16:35 Tap the B button as fast as possible until you see a calibrated message
18:16:35 Winamp.Status.Changed.Off
18:16:35 Process.Created.devcon
18:16:35 Process.Created.cmd
18:16:35 Process.Destroyed.devcon
18:16:35 Process.Destroyed.cmd
18:16:35 XBoxControllers.Controller1.Connected
18:16:35 Main.OnInit
18:16:57 Controller 1 is calibrated, Speed is -12481.96
18:16:57 XBoxControllers.Controller1.BatteryLevel.Medium 'Unknown'
18:16:57 Exception in thread Thread-6:
18:16:57 Traceback (most recent call last):
18:16:57 File "threading.pyc", line 801, in __bootstrap_inner
18:16:57 File "threading.pyc", line 1073, in run
18:16:57 TypeError: _trigger_event() takes at most 3 arguments (7 given)
18:16:57


then the same error is repeated every time you press a button on the pad.
Diz
Experienced User
 
Posts: 121
Joined: Tue Jan 10, 2017 4:49 pm

Re: XBox Controllers Plugin

Postby kgschlosser » Mon Jun 05, 2017 9:50 pm

Yeah I know sorry I was going to delete it but forgot. Give me a few days I have to get this website stuff fixed first
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2516
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XBox Controllers Plugin

Postby Diz » Tue Jun 06, 2017 2:22 am

oh ok... damn... i knew i shouldnt have overwritten the old version before testing the new! as soon as i did it i was like oooops not a good idea! :lol:
Diz
Experienced User
 
Posts: 121
Joined: Tue Jan 10, 2017 4:49 pm

Re: XBox Controllers Plugin

Postby kgschlosser » Tue Jun 06, 2017 6:16 am

i'll poke about it tonight and see if i can get it going again
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2516
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Next

Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 2 guests