package org.usfirst.frc.team3501.robot.subsystems;
+import org.usfirst.frc.team3501.robot.CheesyDriveHelper;
import org.usfirst.frc.team3501.robot.Constants;
import org.usfirst.frc.team3501.robot.commands.driving.JoystickDrive;
private DoubleSolenoid leftGearPiston, rightGearPiston;
+ private CheesyDriveHelper cheese;
+
// Drivetrain specific constants that relate to the inches per pulse value for
// the encoders
Constants.DriveTrain.RIGHT_SHIFT_MODULE,
Constants.DriveTrain.RIGHT_SHIFT_FORWARD,
Constants.DriveTrain.RIGHT_SHIFT_REVERSE);
+
+ cheese = new CheesyDriveHelper(this);
}
@Override
public void joystickDrive(double left, double right) {
// Handle flipping of the "front" of the robot
double k = (isFlipped() ? -1 : 1);
-
- robotDrive.tankDrive(-left * k, -right * k);
+ cheese.cheesyDrive(-left * k, -right,
+ getGearPistonValue() == Constants.DriveTrain.HIGH_GEAR);
}
public void setMotorSpeeds(double left, double right) {
double k = (isFlipped() ? -1 : 1);
- robotDrive.tankDrive(-left * k, -right * k);
+ cheese.cheesyDrive(-left * k, -right,
+ getGearPistonValue() == Constants.DriveTrain.HIGH_GEAR);
}
/**