View Single Post
  #6   Spotlight this post!  
Unread 11-05-2012, 13:03
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,113
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: F310 Controller Axis Mapping

Quote:
Originally Posted by Levansic View Post
There is a new release of the WPI libraries every year, and some times things change in subtle ways. We had one particular joystick with a rotation axis. The first year we used it, that axis mapped to axis 3, and the next year, it mapped to axis 6. We didn't know this changed, and couldn't figure out why things weren't working, until we made a diagnostic program.
The joystick functions just pass the axis data. They don't do any mapping of their own. Does your joystick have a switch to change between DirectInput and XInput modes that might have been moved between seasons? Does it require a special driver?

In LabVIEW, making the "diagnostic program" to show you how the controller is mapped is simple. Just find the existing Joystick Get function in the Teleop vi, right-click its axes output terminal, and choose "create -> indicator" from the menu. Do the same for the buttons output terminal. Then you can run the Robot Main vi and watch the Teleop front panel to see all the axes and buttons as you manipulate the controller. You will of course have to connect the Driver Station in order for it to pass the joystick data to the robot program, and you will have to enable the robot in order for Teleop to run.
Reply With Quote