|
Setting up a Joystick class for Logitech Attack 3?
It seems the default definition for a Joystick class includes a twist axis, since the default joystick provided to rookies has such an axis. The first axis is X, the second Y, the third twist, and the fourth throttle.
Well, when we try to use our trusty Logitech Attack 3's, these do not possess a twist axis, so a formerly-functional GetThrottle() call returns nothing, since the default for throttle in the class is the 4th axis.
I was wondering why we were seeing "WARNING: Joystick Axis missing, check if all controllers are plugged in" showing up on the console, and now I think I understand why. I'd like to get rid of this warning.
I understand I can get the throttle value by calling GetZ() instead, but I wanted to know, short of writing a custom class, is there a way to instantiate a joystick class that correctly defines the axes and buttons for a Logitech Attack 3 such that GetThrottle will work?
__________________
Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
Last edited by Travis Hoffman : 02-23-2015 at 12:12 PM.
|