To answer your question, I would take a look at the code in the OI class. getrightJoystick() and getleftJoystick() may not be returning what you're expecting.
One suggestion to make your code a little easier to read/use (this isn't goign to solve your problem)...
By changing what the tankDrive method does slightly you can clean up your "DriveCommand" code significantly, without changing how things work.
Code:
//DriveTrain subsystem:
public void tankDrive(double leftJoystickValue, double rightJoystickValue){
robotDrive.tankDrive(
Robot.drivetrain.adjustSpeed(Robot.drivetrain.deadZone(leftJoystickValue)),
Robot.drivetrain.adjustSpeed(Robot.drivetrain.deadZone(rightJoystickValue)));
}
public double deadZone (double val) {
return val > 0.25 || val < -0.25? val: 0;
}
public double adjustSpeed (double val){
return Robot.oi.leftJoystick.getRawButton(1)? val*.75: (Robot.oi.rightJoystick.getRawButton(1)? val*.75: val);
}
//DriveCommand:
protected void execute() {
Robot.drivetrain.tankDrive(
Robot.oi.getleftJoystick().getY(),
Robot.oi.getrightJoystick().getY());
}
Maybe it's just my preference, but I prefer logic to be performed by the subsystem. That way if multiple commands call the exposed methods, they always perform in a consistent manner, and it reduces code duplication at the Command level.