Fixed a null pointer exception in the mecanum drive sample program (Fixes artf3974)

Change-Id: I9518cd49ca815b9e1dc3ab63b7a4ee7034e5b444
This commit is contained in:
Brad Miller
2015-01-05 17:32:19 -05:00
parent 359a155915
commit 87e1df068c

View File

@@ -25,10 +25,10 @@ public class Robot extends SampleRobot {
final int joystickChannel = 0;
public Robot() {
robotDrive.setExpiration(0.1);
robotDrive = new RobotDrive(frontLeftChannel, rearLeftChannel, frontRightChannel, rearRightChannel);
robotDrive.setInvertedMotor(MotorType.kFrontLeft, true); // invert the left side motors
robotDrive.setInvertedMotor(MotorType.kRearLeft, true); // you may need to change or remove this to match your robot
robotDrive.setExpiration(0.1);
stick = new Joystick(joystickChannel);
}