X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2FRobot.java;h=8151cde6533837bd15907b3d37a795564a262e6e;hp=d551429f97cbf8b261c2b039e023230de5cd1368;hb=150f450f2b4f9e6094d71007507a7b877e05328a;hpb=9ca89e45fa84b2ec93bc6adf60c7dde1e0a7defb diff --git a/src/org/usfirst/frc/team3501/robot/Robot.java b/src/org/usfirst/frc/team3501/robot/Robot.java index d551429..8151cde 100644 --- a/src/org/usfirst/frc/team3501/robot/Robot.java +++ b/src/org/usfirst/frc/team3501/robot/Robot.java @@ -2,6 +2,8 @@ package org.usfirst.frc.team3501.robot; import org.usfirst.frc.team3501.robot.commandgroups.AutonMiddleGear; import org.usfirst.frc.team3501.robot.commandgroups.AutonSideGear; +import org.usfirst.frc.team3501.robot.commands.driving.TimeDrive; +import org.usfirst.frc.team3501.robot.subsystems.Climber; import org.usfirst.frc.team3501.robot.subsystems.DriveTrain; import org.usfirst.frc.team3501.robot.subsystems.Intake; import org.usfirst.frc.team3501.robot.subsystems.Shooter; @@ -20,6 +22,7 @@ public class Robot extends IterativeRobot { private static Shooter shooter; private static OI oi; private static Intake intake; + private static Climber climber; Command autonCommand; SendableChooser autonChooser; @@ -30,6 +33,7 @@ public class Robot extends IterativeRobot { oi = OI.getOI(); shooter = Shooter.getShooter(); intake = Intake.getIntake(); + climber = Climber.getClimber(); autonChooser = new SendableChooser(); autonChooser.addDefault("Middle Gear", new AutonMiddleGear()); @@ -46,8 +50,6 @@ public class Robot extends IterativeRobot { CameraServer server = CameraServer.getInstance(); UsbCamera climberCam = server.startAutomaticCapture("climbercam", 0); UsbCamera intakeCam = server.startAutomaticCapture("intakecam", 1); - - driveTrain.setCANTalonsBrakeMode(driveTrain.DRIVE_COAST_MODE); } public static DriveTrain getDriveTrain() { @@ -66,14 +68,17 @@ public class Robot extends IterativeRobot { return Intake.getIntake(); } + public static Climber getClimber() { + return Climber.getClimber(); + } + @Override public void autonomousInit() { - // driveTrain.setLowGear(); - driveTrain.setCANTalonsBrakeMode(driveTrain.DRIVE_COAST_MODE); + driveTrain.setLowGear(); // autonCommand = (Command) autonChooser.getSelected(); - // autonCommand = new TimeDrive(1.5, 0.6); - // Scheduler.getInstance().add(autonCommand); + autonCommand = new TimeDrive(2, 0.6); + Scheduler.getInstance().add(autonCommand); } @Override @@ -83,8 +88,7 @@ public class Robot extends IterativeRobot { @Override public void teleopInit() { - // driveTrain.setHighGear(); - driveTrain.setCANTalonsBrakeMode(driveTrain.DRIVE_COAST_MODE); + driveTrain.setHighGear(); } @Override