Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Deadzone Functionality #16

Merged
merged 4 commits into from
Jul 5, 2020
Merged

Added Deadzone Functionality #16

merged 4 commits into from
Jul 5, 2020

Conversation

skajacore
Copy link
Contributor

@skajacore skajacore commented May 20, 2020

Deadzone and adjustment button combination LT + RT + (LS or RS) + DPAD
UP/DN
has been added per controller. Current deadzone is displayed in the
context menu. The deadzone is implemented by mapping the remaining range
of the axis back to the range of 0 to SHRT_MAX. Left and Right analog
sticks can be adjusted individually and is determined by which analog
stick
is pressed down during the deadzone adjustment button combination.

Fixes #2, Fixes #12

TODO: It would be nice if the deadzone would be remembered by hardware
serial number and stored in the registry or elsewhere.

skajacore added 3 commits May 19, 2020 22:59
Deadzone and adjustment button combination LT + RT + (LS or RS) + DPAD
UP/DN
has been added per controller. Current deadzone is displayed in the
context menu. The deadzone is implemented by mapping the remaining range
of the axis back to the range of 0 to SHRT_MAX. Left and Right analog
sticks can be adjusted individually and is determined by which analog
stick
is pressed down during the deadzone adjustment button combination.

TODO: It would be nice if the deadzone would be remembered by hardware
serial number and stored in the registry or elsewhere.
@skajacore
Copy link
Contributor Author

skajacore commented May 20, 2020

image

@xalender
Copy link
Contributor

Excellent!, quick question, does this provide deadzone for the triggers as well?, one of my controllers has a right trigger that needs some deadzone to work well, would be great to modify that too.

@skajacore
Copy link
Contributor Author

I had considered it, but mine were right at 0 with no jitter and I wasn't sure if it would really need to be addressed. This would be pretty easy to add in now though. I'll work it up in the branch to add to this pull request.

Similarly to the analog stick deadzone adjustment, the trigger deadzone
is adjusted by a unique button combination (LT/RT)+LS+RT+D-Pad Up/Dn.
The current values are displayed in the context menu. I implemented this
using the same 2-D (XY) deadZoneCalc() function for the analog sticks
with one of the dimensions ignored by passing it a NULL *y_outand 0 for
the input y value.
@skajacore
Copy link
Contributor Author

image

Got the trigger deadzone working! Moved the new context menu items around to make them grouped more logically also.

@xalender
Copy link
Contributor

So fast!, great! now the project is awesome, finally i can stop using XOutput and start using a specialized "driver+program". I hope emoose merges those changes and compiles the new version soon as i can't compile it myself (don't have visual studio or fast internet to download it).

I don't know too much how github works but If there's any way for you to post a compiled version while we wait for emoose to actually compile and upload it would be awesome!

@skajacore
Copy link
Contributor Author

skajacore commented May 24, 2020

Here are the new binaries, you can drop the appropriate one (x86/x64) in your existing install location next to libusb-1.0.dll. Let me know how it works for you and if you find any issues with it!

v1.3.2-PR16-deadzone-binaries.zip

@xalender
Copy link
Contributor

Tested and it worked like a charm! Thank you for your work. Nothing to complain about the deadzone functionality, everything works just fine. As you said it would be good if the deadzones could be remembered (passed as parameters to Xb2XInput maybe?) but apart from that both my controllers are connected and working..

@emoose
Copy link
Owner

emoose commented Jul 5, 2020

Great stuff! Huge apologies for the delay in responding, been away from home/my controllers to test with... gonna take a look at this & #15 now and hopefully get them merged.

Also a while back I did some work on storing settings into an ini file next to XB2X's exe too, after merging these I'll try digging that up and see about adding deadzone stuff into it.

E: Both are now merged, many thanks! I'm gonna look into adding that ini stuff now and hopefully put out a new release today/tomorrow with these included, thanks again!

@emoose emoose merged commit c701c72 into emoose:master Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is this project still in active development? Add way to define deadzones / calibrate the analog sticks
3 participants