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

Update ControllerManager.py #48

Closed
wants to merge 6 commits into from
Closed

Update ControllerManager.py #48

wants to merge 6 commits into from

Conversation

CptAwsm
Copy link

@CptAwsm CptAwsm commented Dec 13, 2024

Added Controller fix using inputs lib

try:
events = get_gamepad()
for event in events:
if event.ev_type in ['Key', 'Absolute']:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd assume the Absolute ev_type is for axis and linear actuators? its a bit weird to use those as PTT, but I guess you kinda have to? To they have a press "amount" property? maybe we should set a threshold for minimum press like 0.6 for press and 0.4 for release to avoid hysteresis?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a controller, absolute ev_type probably isn't too useful, but there are probably edge cases for HOTAS users, and maybe controller users that an axis is used for PTT. A threshold would be a great idea :)

@RatherRude
Copy link
Owner

Gave this a try!
I tried it with a cheap, off-brand game controller which was recognized, all buttons and all axis are recognized and displayed. I don't have an original xbox controller (xbox one?), but I would expect it to behave like that.. So it looks cool, although I wonder how many who actually want to bind an axis as a PTT. And it simply doesn't recognize neither my HOTAS nor my PS4 controller(!)
I then went back to our current main, it recognizes all devices (HOTAS,PS4,off-brand), it also reacts to all of them except the generic game controller.
Does this mean that COVAS:NEXT doesn't properly react to XBOX game controllers?

@CptAwsm
Copy link
Author

CptAwsm commented Dec 18, 2024

Very odd. Ok, I have a Hotas due to arrive in a few days, and a PS4 controller. I'll do some more testing and figure out a solution.

I expected a HOTAS to not work, but assumed all controllers, including hotas weren't working yet. Shouldn't be a big deal to get it all working (I hope) :)

@RatherRude
Copy link
Owner

We will close this for now. If you want to continue on this, please let us know and we reopen this PR!

@RatherRude RatherRude closed this Jan 28, 2025
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.

3 participants