Quote:
Originally Posted by Racer26
First 3. RobotDrive instantiates the motors on its own but does not instantiate the Joysticks. (though stop to think of it, I'm not sure what it instantiates them as... Talon, Jaguar, and Victor all extend the MotorController class...)
|
For total clarity, that means you need to declare these:
RobotDrive chassis = new RobotDrive(1, 2);
private final Joystick leftStick = new Joystick(1);
private final Joystick rightStick = new Joystick(2);
And then call this:
chassis.TankDrive(leftStick, rightStick);
If you then have a side spinning in the wrong direction, swap the MOTOR wiring on the Talon OUTPUT. (Don't swap the input wiring, as you'll fry the talon.)