View Single Post
  #1   Spotlight this post!  
Unread 02-23-2015, 11:44 AM
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,044
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
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.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner

Last edited by Travis Hoffman : 02-23-2015 at 12:12 PM.
Reply With Quote