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

Joystick Issues #799

Conversation

ericjohnson97
Copy link
Contributor

These are modifications I need to make to use my xbox one S controller and keep it from crashing.

@@ -32,6 +32,7 @@ const JoystickMapVidPid: Map<string, JoystickModel> = new Map([
['054c:0ce6', JoystickModel.DualSense],
['054c:09cc', JoystickModel.DualShock4],
['045e:02e0', JoystickModel.XboxOneS_Bluetooth],
['045e:02fd', JoystickModel.XboxOneS_Bluetooth],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rafaellehmkuhl I have a xbox one s controller but it showed up different on my machine. (ubuntu 20.22)

Copy link
Member

Choose a reason for hiding this comment

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

From what I'm checking here we are actually using the "Xbox One Controller Bluetooth" PID as an "S" version here, which it isn't.

Could you keep your change and also change the XboxOneS_Bluetooth to XboxOne_Bluetooth?

I don't have this controller to confirm. If I remember correctly @patrickelectric is the one who has it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rafaellehmkuhl I checked the website and my controller being "Xbox One S Controller [Bluetooth]" is correct. I'll be interested to see what you all have.

Copy link
Member

Choose a reason for hiding this comment

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

Yup, I'm agreeing with you haha

I think one of us has an Xbox One controller, thought it was an S one, but was actually a regular One, and we added it incorrectly.

this.vehicle.setParameter({ id: sFunction, value: shiftActionValue!.value })
// use try catch to avoid undefined error

try {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rafaellehmkuhl without this try catch, the joystick module kept crashing on me.

Copy link
Member

Choose a reason for hiding this comment

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

What error is happening? I think it would be good if we treat it directly instead of putting this entire code on a try/catch. We can be sweeping problems under the rug here.

As we didn't have complaints about it till now, I would bet they have something to do with the vehicle type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This PR isn't ment to go in, but mostly to review the changes I needed to make to get my setup working, this way we can come up with more permanent fixes together. I'll have to get you the exact error I was getting later, but I believe the module was crashing on the setParameter call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rafaellehmkuhl This is the error I get some times with my controllers. I still have not figured out exactly what causes it.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

without the try catch the controller stops working all together

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After further debugging it looks like this error is only present when I use my F310 joystick which I have attempted to add support for on my local copy. Still not sure what I did wrong with my F310 implementation, but I created PRs for my features that are independent of my F310 support

@ericjohnson97
Copy link
Contributor Author

closing, as I think the remaining changes I that didn't go in with #828 are related to me doing something wrong with my Logitech f330 implementation that I will work on in a separate PR

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.

None yet

2 participants