From: Arunima DIvya Date: Wed, 25 Jan 2017 04:38:00 +0000 (-0800) Subject: change execute method, fill in end method X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=0fab24e5f098cb2bfcc22103d1056109b33de84f change execute method, fill in end method --- 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