X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fintake%2FRunIntake.java;h=3b619ceb5a9a9f6ae006e679becc7e5188338db3;hb=0fab24e5f098cb2bfcc22103d1056109b33de84f;hp=5452073515b0fb7d719b1d2df15200d682595dcf;hpb=69322d05aeb3c1736921a7f2fc0bc4fd7bcab0c5;p=3501%2F2017steamworks diff --git a/src/org/usfirst/frc/team3501/robot/commands/intake/RunIntake.java b/src/org/usfirst/frc/team3501/robot/commands/intake/RunIntake.java index 5452073..3b619ce 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/intake/RunIntake.java +++ b/src/org/usfirst/frc/team3501/robot/commands/intake/RunIntake.java @@ -15,6 +15,10 @@ public class RunIntake extends Command { private double timeToMove; public Timer timer; + /** + * + * @param timeToMove + */ public RunIntake(double timeToMove) { requires(Robot.getIntake()); timer = new Timer(); @@ -35,12 +39,14 @@ public class RunIntake extends Command { // Called repeatedly when this Command is scheduled to run @Override protected void execute() { - Robot.getIntake().setSpeed(Robot.getIntake().INTAKE_SPEED); + Robot.getIntake().runIntake(); } // Called once after isFinished returns true @Override protected void end() { + timer.stop(); + Robot.getIntake().stopIntake(); } // Called when another command which requires one or more of the same