Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
XBox Controllers Plugin
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
ok so here goes this has the mouse added to it and the other errors fixed as well. Hopefully
there are 2 new actions for enabling and disabling the mouse
i did them as actions that way if there is a specific event that takes place where you would want to the controller to be able to switch from mouse to non mouse you can
there are 2 new actions for enabling and disabling the mouse
i did them as actions that way if there is a specific event that takes place where you would want to the controller to be able to switch from mouse to non mouse you can
Re: XBox Controllers Plugin
ummm... something went wrong!
03:12:14 Exception in thread eg.CorePluginModule.XBoxControllers.Controller1:
03:12:14 Traceback (most recent call last):
03:12:14 File "threading.pyc", line 801, in __bootstrap_inner
03:12:14 File "threading.pyc", line 754, in run
03:12:14 File "D:\Automation\EventGhost\plugins\XBoxControllers\__init__.py", line 1147, in update
03:12:14 BATTERY_TYPES[bat_type],
03:12:14 KeyError: -1
03:12:14
03:12:14 Exception in thread eg.CorePluginModule.XBoxControllers.Controller1:
03:12:14 Traceback (most recent call last):
03:12:14 File "threading.pyc", line 801, in __bootstrap_inner
03:12:14 File "threading.pyc", line 754, in run
03:12:14 File "D:\Automation\EventGhost\plugins\XBoxControllers\__init__.py", line 1147, in update
03:12:14 BATTERY_TYPES[bat_type],
03:12:14 KeyError: -1
03:12:14
Re: XBox Controllers Plugin
after some poking around i know whats happening here... but i dont know why its happening! the older versions picked up my battery type as 255 decimal which equates to 'unknown'. this new version picks up my battery type as -1 decimal which isnt checked for! so i added an equate in the battery types for -1 and all is well!
using the same xinput dll how can the battery type give two different results?
unfortunately the mouse mode thingy wont work for me. when i enable it no errors are given and it says its enabled but the analog stick just behaves as normal and then when i disable mouse mode then the errors hit:
04:10:00 XBox Controllers: Disable Mouse Control: Controller 1
04:10:00 Error in Action: "XBox Controllers: Disable Mouse Control: Controller 1"
04:10:00 Traceback (most recent call last) (0.5.0-rc2):
04:10:00 File "D:\Automation\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
04:10:00 return self(*args)
04:10:00 TypeError: __call__() takes exactly 2 arguments (1 given)
using the same xinput dll how can the battery type give two different results?
unfortunately the mouse mode thingy wont work for me. when i enable it no errors are given and it says its enabled but the analog stick just behaves as normal and then when i disable mouse mode then the errors hit:
04:10:00 XBox Controllers: Disable Mouse Control: Controller 1
04:10:00 Error in Action: "XBox Controllers: Disable Mouse Control: Controller 1"
04:10:00 Traceback (most recent call last) (0.5.0-rc2):
04:10:00 File "D:\Automation\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
04:10:00 return self(*args)
04:10:00 TypeError: __call__() takes exactly 2 arguments (1 given)
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
ok i fixed that traceback issue. not sure why its doing that all of a sudden for the battery. but I now have it checking to make sure the -1 won't throw the error again
I also fixed the enable not working. not sure why the disable isn't but I want you to try it again. i also changed the enable mouse action to have defaulted values this way if someone doesn't run configure on it it will not error. I am also changed the disable so you will not have to select a controller it will simply disable which ever controller is running it. because i have it set up so that only one controller can control it at a time.
I also fixed the enable not working. not sure why the disable isn't but I want you to try it again. i also changed the enable mouse action to have defaulted values this way if someone doesn't run configure on it it will not error. I am also changed the disable so you will not have to select a controller it will simply disable which ever controller is running it. because i have it set up so that only one controller can control it at a time.
Re: XBox Controllers Plugin
ok... wow! ummm... the mouse thing kinda works but its upsidedown and back to front and is rediculously fast and uncontrollable! the disable action still throws the same error. also the button repeats are very fast and do not slow down when held like before
Re: XBox Controllers Plugin
and now it doesnt even tell me about my battery level or anything
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
ok the mouse thing is positional. what that means is if you center the stick it will move the mouse to the center of the screen. if you move the stick 1/2 way to the left it will move the mouse to the left helf the distance from the center of the screen.
if you then let go of the controller and let it snap back to the center it will move the mouse back to the center. it's going to be fast.. it doesn't slide the mouse. it simply moves it.
so this is how it's laid out. the numbers are x, y coordinates for position of the joystick the 3 rows are are as an example and the joystick outputs everything in between as well
the numbers returned from the joystick are as follows
and if you had a 1080P screen they would be this
so on the controller 0, 0 is 960, 540 on the monitor.
so if you move the joy half way to the left which would be -17768, 0 which would be 480, 540 on the screen if you hold the joystick in that position the mouse will not move
if you let go of the joy the mouse will go back to the middle of the screen. so the position of the stick will map to the exact same spot on the screen.
the button repeats should be fast. it is as fast as it would be if you were tapping the button as fast as you could. it is not supposed to slow down it is spitting out a repeat event at 1/2 the speed of the polling and I have found that the polling is typically between 80 milliseconds and 60 milliseconds. if you would count the number of repeat events that take place in one second i will be able to tell how fast it's going. you will need to turn on the time stamp for the logging.
if you then let go of the controller and let it snap back to the center it will move the mouse back to the center. it's going to be fast.. it doesn't slide the mouse. it simply moves it.
so this is how it's laid out. the numbers are x, y coordinates for position of the joystick the 3 rows are are as an example and the joystick outputs everything in between as well
Code: Select all
left top center top right top
left center center right center
left bottom center bottom right bottom
the numbers returned from the joystick are as follows
Code: Select all
-35537, 35537 0, 35537 35537, 35537
-35537, 0 0, 0 35537, 0
-35537, -35537 0, -35537 35537, -35537
and if you had a 1080P screen they would be this
Code: Select all
0, 0 960, 0 1920, 0
0, 540 960, 540 1920, 540
0, 1080 960 , 1080 1920, 1080
so if you move the joy half way to the left which would be -17768, 0 which would be 480, 540 on the screen if you hold the joystick in that position the mouse will not move
if you let go of the joy the mouse will go back to the middle of the screen. so the position of the stick will map to the exact same spot on the screen.
the button repeats should be fast. it is as fast as it would be if you were tapping the button as fast as you could. it is not supposed to slow down it is spitting out a repeat event at 1/2 the speed of the polling and I have found that the polling is typically between 80 milliseconds and 60 milliseconds. if you would count the number of repeat events that take place in one second i will be able to tell how fast it's going. you will need to turn on the time stamp for the logging.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
and if you did not delete the actions and remove the plugin and then install the plugin you will have to delete the disable mouse action and re add it.
Re: XBox Controllers Plugin
i did reinstall for the actions in the first place. and the mouse thing just isnt working as you intended! lol
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
this is why it's being tested. I need to know step for step what it's going and what it's not doing. move it only one direction and explain what it is doing
Re: XBox Controllers Plugin
ok first off up and down are definitely inverted!
secondly it NEVER returns to the centre of the screen!
and third there is no movement from the pointer until you reach like two thirds distance movement on the stick! so you can only move to the outer few inches on any edge of the screen
and the disable action still throws the error
secondly it NEVER returns to the centre of the screen!
and third there is no movement from the pointer until you reach like two thirds distance movement on the stick! so you can only move to the outer few inches on any edge of the screen
and the disable action still throws the error
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
ok i will check it out. and what is the error the disable action is throwing?
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
never mind about the disable action. I found the problem.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
ok here is another version. this is going to have a checkbox to either use absolute positioning for the mouse or not. and the disable mouse should be fixed
Re: XBox Controllers Plugin
disable mouse is fixed
absolute positioning mode is exactly the same as before
the new mode only goes up and right no matter what direction i push!
absolute positioning mode is exactly the same as before
the new mode only goes up and right no matter what direction i push!
