View Single Post
  #13   Spotlight this post!  
Unread 16-01-2014, 00:08
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 947
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: Use of gamepads in replacement of buttonboards

Quote:
Originally Posted by tStano View Post
My team has used xbox controllers for as long as I've been on the team. As a previous poster noted, the deadzone is rather large. That hasn't been a big issue for us; just remember to account for it in code. The triggers do weird stuff, and we haven't been able to implement them. Otherwise, we just wrote a class called xBoxControllerMap which has a list of ints named for the buttons on the controller so we only had to figure out what does what once.

They are also, as we learned this preseason; attractive targets for theft; so if you work in a school or other public place; lock them up.
Here is our XBoxControllerMap class for Java. We use another custom class called DPadButton to turn the accessible directions of the d-pad into buttons that can trigger commands. The implementation should be relatively easy to get the gist of from a C++ point of view.

Last edited by BigJ : 16-01-2014 at 00:11.