From: Arunima DIvya Date: Wed, 25 Jan 2017 04:39:19 +0000 (-0800) Subject: change isFinished method, add end statement to end method X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=f407a6561370e49c73da72e8185115d4783ca2b6 change isFinished method, add end statement to end method --- diff --git a/src/org/usfirst/frc/team3501/robot/commands/intake/RunIntakeContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/intake/RunIntakeContinuous.java index a7ba229..efcd4d7 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/intake/RunIntakeContinuous.java +++ b/src/org/usfirst/frc/team3501/robot/commands/intake/RunIntakeContinuous.java @@ -1,7 +1,6 @@ package org.usfirst.frc.team3501.robot.commands.intake; import org.usfirst.frc.team3501.robot.Robot; -import org.usfirst.frc.team3501.robot.subsystems.Intake; import edu.wpi.first.wpilibj.command.Command; @@ -10,6 +9,8 @@ import edu.wpi.first.wpilibj.command.Command; * Runs the intake continuously when button is pressed, and when button is not * pressed does not run. * + * Intended to be run inside a .whileHeld() call on a button in OI + * * @author Meeta * */ @@ -23,26 +24,25 @@ public class RunIntakeContinuous extends Command { @Override protected boolean isFinished() { - // TODO Auto-generated method stub - return true; + return false; } // Called just before this Command runs the first time @Override protected void initialize() { - + Robot.getIntake().runIntake(); } // 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); + Robot.getIntake().stopIntake(); } // Called when another command which requires one or more of the same