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
I updated the plugin if you want to give it a try
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
I have been told it is working pretty good. But there may be a glitch in the automatic calibration of the polling speed. This I am going to need more information on. If you come across it. I will add additional debugging to cover that section of the code.
I am also going to do a rework of the FFB. I am going to make it so that you can put in a pattern and it will do that pattern for you
I am also going to do a rework of the FFB. I am going to make it so that you can put in a pattern and it will do that pattern for you
Re: XBox Controllers Plugin
ok great! that ones much better... no problems as yet... thanks 
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
you got the controller to calibrate properly?
Re: XBox Controllers Plugin
i did indeed, heres the output:
15:18:23 ---> Welcome to EventGhost <---
15:18:28 Calibrating Controller 1
15:18:28 Tap the B button as fast as possible until you see a calibrated message
15:18:36 Controller 1 is calibrated, Speed is 0.06
15:18:37 XBoxControllers.Controller1.B.Pressed
15:18:23 ---> Welcome to EventGhost <---
15:18:28 Calibrating Controller 1
15:18:28 Tap the B button as fast as possible until you see a calibrated message
15:18:36 Controller 1 is calibrated, Speed is 0.06
15:18:37 XBoxControllers.Controller1.B.Pressed
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
I am going to institute a method so that during this calibration you will be able to adjust it manually as well.
but basically this is bow this process works. every time a key is pressed and released a message gets made that this has been done. and that message has a number attached to it. and that number increments by 1 each time a new message is made. so when we poll the controller ideally we want to get every message. tho as you can see to do this your polling time is 0.06 seconds or 60 milliseconds. a 60 millisecond polling time is going to increase you EG processor usage. and if you have 4 controllers doing this at the same time it's going to jump up quite a bit. but the trade off is if you slow it down then you can miss buttons being pressed. I am not sure but you can test this out for me. is if you press the button slower will it produce a slower polling time?
but basically this is bow this process works. every time a key is pressed and released a message gets made that this has been done. and that message has a number attached to it. and that number increments by 1 each time a new message is made. so when we poll the controller ideally we want to get every message. tho as you can see to do this your polling time is 0.06 seconds or 60 milliseconds. a 60 millisecond polling time is going to increase you EG processor usage. and if you have 4 controllers doing this at the same time it's going to jump up quite a bit. but the trade off is if you slow it down then you can miss buttons being pressed. I am not sure but you can test this out for me. is if you press the button slower will it produce a slower polling time?
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
I am also going to rework the analog joys. I am going to offer the option to have the joy control the mouse. I am also going to give the option of which joy controls the movement. and if you want to use pushing the sticks down as the mouse clicks or using the triggers as the clicks.
there will be 2 ways of controlling the mouse. the first one is a progressive thing. meaning the more you push the stick in a specific direction the faster it will move in that direction. like the eraser control on an IBM ThinkPad. the second way is identical to screen position. I will grab the monitor resolution and re range that resolution to the resolution of the joy. so if you move the joy to a specific position it will move the mouse to the position on the screen it will work almost exactly identical to how a desktop mouse works. this will take some time to work into the code but it will be a really cool feature when done.
there will be 2 ways of controlling the mouse. the first one is a progressive thing. meaning the more you push the stick in a specific direction the faster it will move in that direction. like the eraser control on an IBM ThinkPad. the second way is identical to screen position. I will grab the monitor resolution and re range that resolution to the resolution of the joy. so if you move the joy to a specific position it will move the mouse to the position on the screen it will work almost exactly identical to how a desktop mouse works. this will take some time to work into the code but it will be a really cool feature when done.
Re: XBox Controllers Plugin
oh well actually the next time i calibrated it said 0.08. i will test it some more... and i like the sound of the mouse control ideas
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
go really slow with the button presses
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
I have just added events for the starting and stopping of the calibration. I did this so you can put up an osd on the screen and let you know that you have to do it so you don't just pick it up and start pressing buttons and wiondering why it's not working.. But it doesn't have to be only button B it can be any button pressed. it's just the pressing and releasing that i am checking for.
Re: XBox Controllers Plugin
got it up to 0.16 by going pretty slow. so its better to go slow huh? why the plugin tells you to go as fast as possible then? 
Re: XBox Controllers Plugin
ok i see the difference, its slowing down the repeat events when you hold a button. i wasnt actually sure what this calibration was for
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
the calibration is 2 fold. but because of what you just stated I am going to make it dynamic.
so the slower you press it the time slows down. so i can have it increase the poll time if it misses a packet and decrease the poll time if it's hitting them all the time. and if the controller sits dormant for say 10 times the polling interval it will decrease the polling time as well. this will help to reduce CPU load based on use. so for instance if you are rapidly pressing a button to page down a webpage for instance. it will check the remote faster. but if you are simply doing something like channel surfing and pressing the button once every 5 seconds or so it will slow down the polling time,
so the slower you press it the time slows down. so i can have it increase the poll time if it misses a packet and decrease the poll time if it's hitting them all the time. and if the controller sits dormant for say 10 times the polling interval it will decrease the polling time as well. this will help to reduce CPU load based on use. so for instance if you are rapidly pressing a button to page down a webpage for instance. it will check the remote faster. but if you are simply doing something like channel surfing and pressing the button once every 5 seconds or so it will slow down the polling time,
Re: XBox Controllers Plugin
oh ok cool... so the manual calibration wouldnt be needed if it was dynamic?
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: XBox Controllers Plugin
ok attached is a test to see if the dynamic calibration is possible.
if the remote appears not to work then press a button rapidly and see if that gives it some motivation to work
if the remote appears not to work then press a button rapidly and see if that gives it some motivation to work
