a7ba2297fc74a4493b761063d54f79a8c2245bb5
1 package org
.usfirst
.frc
.team3501
.robot
.commands
.intake
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
4 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.Intake
;
6 import edu
.wpi
.first
.wpilibj
.command
.Command
;
10 * Runs the intake continuously when button is pressed, and when button is not
11 * pressed does not run.
16 public class RunIntakeContinuous
extends Command
{
17 // create setter method for speed, use setSpeed method to do end() by setting
20 public RunIntakeContinuous() {
21 requires(Robot
.getIntake());
25 protected boolean isFinished() {
26 // TODO Auto-generated method stub
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().setSpeed(Robot
.getIntake().INTAKE_SPEED
);
42 // Called once after isFinished returns true
44 protected void end() {
45 Intake
.intake
.setSpeed(0);
48 // Called when another command which requires one or more of the same
49 // subsystems is scheduled to run
51 protected void interrupted() {