Write execute method , wrote initialize method, and emptied end method
authorArunima DIvya <adivya822@student.fuhsd.org>
Tue, 24 Jan 2017 03:13:45 +0000 (19:13 -0800)
committerArunima DIvya <adivya822@student.fuhsd.org>
Thu, 26 Jan 2017 04:13:00 +0000 (20:13 -0800)
src/org/usfirst/frc/team3501/robot/commands/intake/RunIntake.java

index 82bb55001b9c45043fbb42d1d772378e32d4ba01..e4f9cd7358511f7160bc5455549a5a414bdd1b2a 100644 (file)
@@ -1,6 +1,6 @@
 package org.usfirst.frc.team3501.robot.commands.intake;
 
-import org.usfirst.frc.team3501.robot.subsystems.Intake;
+import org.usfirst.frc.team3501.robot.Robot;
 
 import edu.wpi.first.wpilibj.Timer;
 import edu.wpi.first.wpilibj.command.Command;
@@ -28,17 +28,18 @@ public class RunIntake extends Command {
   // Called just before this Command runs the first time
   @Override
   protected void initialize() {
+    timer.start();
   }
 
   // Called repeatedly when this Command is scheduled to run
   @Override
   protected void execute() {
+    Robot.getIntake().setSpeed(Robot.getIntake().INTAKE_SPEED);
   }
 
   // Called once after isFinished returns true
   @Override
   protected void end() {
-    Intake.intake.setSpeed(0);
   }
 
   // Called when another command which requires one or more of the same