Hello! I was looking through the HID documentation today and I found the different types of HID types. I looked for an answer to whether or not they are usable, and I found that they are not by default, but could be useable if integrated into a “wrapper”. I don’t really understand what a “wrapper” is, or how one could be made, but if anyone can help me out, I would gladly take it, as I think it would be a fun summer project and potentially a fun marketing gimmick. Thanks!
I’m a bit confused as to what you’re trying to do.
A wrapper is a term for when you extend or encapsulate a class (“wrap”) so that you can add functionality.
What do you mean that the HID classes are not usable?
Well I see nowhere that there are future references to specific functionality. (Also, thank you for explaining what a wrapper is)
What is it that you are trying to do? And are you referring to the GenericHID
class? (Just so we’re on the same page)
Yes I am looking at GenericHID, what I’m wanting to do is determine if it is possible to use the other controller types listed, such as a guitar or a dance pad, and if so, what set-up would be necessary? I mainly want to do this for fun and because it is a creative alternate way to demo robots.
Anything that connects to a computer as a game controller/joystick can be accessed through the GenericHID class and/or it’s helper classes Joystick and XboxController; no wrappers needed.
Ok, so if you wanted to use buttons from a plug-in, you would just have to find which buttons are which in drive station?
Yep! I usually use “set up usb game controllers” on windows since it shows button numbers.
You can also use the driver station’s USB tab, but it does not show buttons.
Edit: It is late, and I totally typed incorrectly. @Aidan-Mundy that is what I meant, but obviously not what I wrote. Thank you for the correction.
It does, but it doesn’t show the numbers. Just remember that axes start from 0, and buttons start from 1. Buttons are numbered top-to-bottom then left-to-right. Also, some axes (like on a PS5 controller’s triggers) have a button that activates once they reach a specific threshold.
Yes. As implied ps5 controllers are supported (with Ds4Win). We use one and love it. The Ps4 class works with them except, it does not capture the trackpad button.
You also don’t need DS4Win. PS5 controllers are PNP compatible when used over USB, so they install their drivers and show up as like “Generic USB controller” and work just fine.
That I did not know. Cool. We will definitely look into that.
Thanks guys!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.