X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fsubsystems%2FDriveTrain.java;fp=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fsubsystems%2FDriveTrain.java;h=bad303aebe622f0db77aa8a41d45e79b92c68325;hp=5422e973078ba2d99b0d9556732de89a0d8d4b31;hb=f56e6ebf87134eccc3b8bb0e1d2529bd6cb061dd;hpb=b70398a7d5ac5f4ce64156d84227ccb4828c0615 diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java index 5422e97..bad303a 100644 --- a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java @@ -29,6 +29,9 @@ public class DriveTrain extends Subsystem { public static final double TIME_TO_CLIMB_FOR = 0; public static final double CLIMBER_SPEED = 0; + public static final boolean DRIVE_BRAKE_MODE = true; + public static final boolean DRIVE_COAST_MODE = false; + private static DriveTrain driveTrain; private final CANTalon frontLeft, frontRight, rearLeft, rearRight; @@ -185,7 +188,6 @@ public class DriveTrain extends Subsystem { * Changes the gear to a DoubleSolenoid.Value */ private void changeGear(DoubleSolenoid.Value gear) { - System.out.println(gear); leftGearPiston.set(gear); rightGearPiston.set(gear); } @@ -194,4 +196,12 @@ public class DriveTrain extends Subsystem { protected void initDefaultCommand() { setDefaultCommand(new JoystickDrive()); } + + public void setCANTalonsBrakeMode(boolean mode) { + frontLeft.enableBrakeMode(mode); + rearLeft.enableBrakeMode(mode); + + frontRight.enableBrakeMode(mode); + rearRight.enableBrakeMode(mode); + } }