3188fe6a688e946c02a884a2ea603f3b17338566
1 package org
.usfirst
.frc
.team3501
.robot
.commands
.intake
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 import edu
.wpi
.first
.wpilibj
.command
.Command
;
9 * Runs the intake continuously when button is pressed, and when button is not
10 * pressed does not run.
12 * Intended to be run inside a .whileHeld() call on a button in OI
17 public class RunIntakeContinuous
extends Command
{
18 // create setter method for speed, use setSpeed method to do end() by setting
21 public RunIntakeContinuous() {
22 requires(Robot
.getIntake());
26 protected boolean isFinished() {
30 // Called just before this Command runs the first time
32 protected void initialize() {
36 // Called repeatedly when this Command is scheduled to run
38 protected void execute() {
39 Robot
.getIntake().runIntake();
42 // Called once after isFinished returns true
44 protected void end() {
45 Robot
.getIntake().stopIntake();
48 // Called when another command which requires one or more of the same
49 // subsystems is scheduled to run
51 protected void interrupted() {