-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Joy message wasn't getting the extra axis from knuckle controller #11
Comments
good point, I originally just chose to double it so as to not overflow, but
libsurvive's survive-buttons.c
https://github.com/cntools/libsurvive/blob/037189ebbcdb2a0bedd6fe6a8d1ad3910ac6caad/survive-buttons.c#L115
seems to loop over 16 axes instead of the max count of 8 in their api. Not
sure if the fix should be in the survive api or this ros2 package. What do
you think?
…On Tue, Apr 23, 2024 at 1:41 PM Andrew Symington ***@***.***> wrote:
Is doubling the capacity needed because there are two controllers
appearing as one device, or was that just chosen randomly to add capacity
so as not to overflow?
—
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJLGXWA6JYDETYDQBJKPSVDY6XYAXAVCNFSM6AAAAABGOR66GOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZRGQ2TCNZXHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I think we should match whatever they do. I think it must have been my error when converting from their ROS1 to a ROS2 node. Are you happy to update the loop to span 16 elements? |
Sure thing. Since SURVIVE_MAX_AXIS_COUNT is already 8, doubling it would be 16 and that is what my hacky fix was. Or do your prefer to hard code a '16' for the loop count? |
It's not a big deal. To me the doubling gives the sense that up to two logical devices are supported, whereas it seems more like that there are just more values that need to be packed. So, why not just #define a new max of 16 and use the descriptive variable name? I can do that if you're busy. Either way, thank you very much for finding and fixing this bug! |
Knuckle controllers have 11 axes as input, but the original max count was 8 so the pad force, stick-x and stick-y weren't mapped to the joy message. Submitted a simple fix for this by doubling the max count. #10
The text was updated successfully, but these errors were encountered: