View Single Post
  #2   Spotlight this post!  
Unread 02-23-2015, 12:34 PM
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Properly calling a Logitech Attack 3 Joystick Class

I don't understand why you suggest that writing a custom class is not the appropriate answer. If you want to support the Attack 3 in particular, I think the best way to do it is to extend the Joystick class as an Attack_3 class.

Since the named functions don't give you what you want, the second-best way to do it is probably to avoid them and instead use things like getRawAxis().

We did basically the custom class solution in LabVIEW for several different brands of game controllers this year. It lets us provide the axes and buttons as named components of a cluster, which helps keep the programmer and the driver speaking the same language. Instead of having to remember which array element's number is the left stick's Y axis, we just unbundle LeftX. Similarly, we can refer to the A, X, Start, etc. buttons by name.
Reply With Quote