Quote:
Originally Posted by onenerdyguy
I'm having difficulty getting a tank drive up and running on an Xbox controller. For some reason, it won't detect the right stick.
according to the driver station, our right stick Y axis is axis 5. My code is as follows:
self.leftstick = wpilib.Joystick(0,1)
self.rightstick = wpilib.Joystick(0,5)
The drive code is the very simple
self.myRobot.tankDrive(self.leftStick, self.rightStick)
The left stick works fine. Right stick doesn't even appear. Is there something I'm missing?
|
For us, the way the right stick worked was by doing self.joystick.getRawAxis(x) and self.joystick.getRawAxis(y) IN the teleop period. Our self.joystick was defined as self.joystick = wpilib.Joystick(0) IN the robotinit().
Replace the X and Y in the arguments with 5 or whatever number that shows up in your dashboard.