Quote:
Originally Posted by LFRobotics
Thanks soooo much. It all worked except for the
Code:
private Button button = new JoystickButton(xcon2, 1);
Netbeans gets all mad and says
|
What I would do in your case is scrap the use of the XBoxController class and use the provided Joystick class with
these button/joystick mappings.
So for the A button it would be:
Code:
Joystick joystick = new Joystick(1);
private Button button = new JoystickButton(joystick, 0);
And to access the left and right sticks for tank drive it would be:
Code:
oi.joystick.getRawAxis(7); //Left stick
oi.joystick.getRawAxis(5); //Rightstick
The best way to do this would be to create a class that extends the Joystick class then:
-create getter methods for each of the buttons and axis
-create static constants that hold the mapped button numbers and axis
If you'd like more information on how to do this I can assist you there too.