From 0fab24e5f098cb2bfcc22103d1056109b33de84f Mon Sep 17 00:00:00 2001 From: Arunima DIvya Date: Tue, 24 Jan 2017 20:38:00 -0800 Subject: [PATCH] change execute method, fill in end method --- .../frc/team3501/robot/commands/intake/RunIntake.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.30.2