X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fsubsystems%2FDriveTrain.java;fp=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fsubsystems%2FDriveTrain.java;h=807bb151ec2d3b239329c3f9aafeabd41ff438f8;hb=7236fc1132d23fd3664430c6e35e28ae6987073f;hp=1079d501a82fc4f52d281b0c8e96478a2a0653a9;hpb=d9475515518368b284e5c5fb4e2463c8c082f62d;p=3501%2Fstronghold-2016 diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java index 1079d501..807bb151 100644 --- a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java @@ -164,10 +164,10 @@ public class DriveTrain extends PIDSubsystem { /* * Method is a required method that the PID Subsystem uses to return the * calculated PID value to the driver - * + * * @param Gives the user the output from the PID algorithm that is calculated * internally - * + * * Body: Uses the output, does some filtering and drives the robot */ @Override @@ -190,7 +190,7 @@ public class DriveTrain extends PIDSubsystem { /* * Checks the drive mode - * + * * @return the current state of the robot in each state Average distance from * both sides of tank drive for Encoder Mode Angle from the gyro in GYRO_MODE */ @@ -207,8 +207,15 @@ public class DriveTrain extends PIDSubsystem { public void setMotorSpeeds(double left, double right) { double k = (isFlipped() ? -1 : 1); - cheese.cheesyDrive(-left * k, -right, - getGearPistonValue() == Constants.DriveTrain.HIGH_GEAR); + /* + * cheese.cheesyDrive(-left * k, -right, getGearPistonValue() == + * Constants.DriveTrain.HIGH_GEAR); + */ + + frontLeft.set(left); + rearLeft.set(left); + frontRight.set(right); + rearRight.set(right); } /** @@ -246,8 +253,8 @@ public class DriveTrain extends PIDSubsystem { */ public void switchGear() { Value currentValue = getGearPistonValue(); - Value setValue = (currentValue == Constants.DriveTrain.HIGH_GEAR) ? Constants.DriveTrain.LOW_GEAR - : Constants.DriveTrain.HIGH_GEAR; + Value setValue = (currentValue == Constants.DriveTrain.HIGH_GEAR) + ? Constants.DriveTrain.LOW_GEAR : Constants.DriveTrain.HIGH_GEAR; changeGear(setValue); }