-
Notifications
You must be signed in to change notification settings - Fork 0
Per axis updates in the LogitechExtremeJoystick #264
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
Conversation
|
Does isolating polling to a specific axis fix the problem? Are the invalid axis updates not going to be processed like every other axis update? Seems like behaviour will be unchanged |
Actually now that I think of it no... hahaha. will update this |
b85361f to
4abeaba
Compare
|
Alright @ConnorWhalen I think I fixed it; does this make sense? On top of what was already changed I added the following logic: Now the initial events won't be seen by the joystick controller, and when events do happen, the |
|
The logic is sound. I'll review the code then we can test it on thursday |
4abeaba to
c9633aa
Compare
|
Rabble Rabble Rabble! Just tested this. The change prevents When the joystick reattaches we create a new LogitechExtremeJoystick object, meaning we lose the last values after a disconnect.. all the values go to zero. ie) if you set the slider to -1 then unplug, reconnect, and move the another axis, then only that axis value updates and it reports the slider value as 0. At the same time it's still a lot safer than if the values go to -1. Additionally if we keep the old values we still don't know if the joystick was moved while it was unplugged. ie) Set the slider to -1. unplug, set the slider to 0. reconnect. move a different axis. slider would still be incorrect reporting -1 ... So moral of the story is that joydev is lame and we should rewrite the kernal /s |
ConnorWhalen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is as good as it's going to get. I'm good with pushing this
|
Since there's no way to know the re-connected joystick's initial state setting every axis to zero is the safest option |
c9633aa to
c4d95ae
Compare
|
There was a small bug on thursday, Axis RZ for yaw was set to be Axis RX. .. my bad |
c4d95ae to
766190a
Compare
1f03d0d to
c4d95ae
Compare
c4d95ae to
b877d03
Compare
The
LogitechExtremeJoysticknow stores the last polled values of heave sway surge and yaw. If an axis event happens it will not cause the Joystick to emit the invalid values by polling data that has not yet been prepared by the joystick. Fixes #263EDIT looking at this more closely I was able to remove the
createAxesmethod in the Joystick source completely. We can get all the data we need from events. Same thing can be done for the buttons; just have to verify what all the component id's are for them.