Create constant intake speed variable
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / intake / RunContinuous.java
CommitLineData
763ccd44
M
1package org.usfirst.frc.team3501.robot.commands.intake;
2
dab6e7d6
AD
3import org.usfirst.frc.team3501.robot.subsystems.Intake;
4
763ccd44
M
5import edu.wpi.first.wpilibj.command.Command;
6
7/***
8 *
9 * Runs the intake continuously.
10 *
11 * @author Meeta
12 *
13 */
14public class RunContinuous extends Command {
dab6e7d6
AD
15 // create setter method for speed, use setSpeed method to do end() by setting
16 // speed to 0
763ccd44
M
17
18 public RunContinuous() {
19
20 }
21
22 @Override
23 protected boolean isFinished() {
24 // TODO Auto-generated method stub
dab6e7d6 25 return true;
763ccd44
M
26 }
27
28 // Called just before this Command runs the first time
29 @Override
30 protected void initialize() {
dab6e7d6 31
763ccd44
M
32 }
33
34 // Called repeatedly when this Command is scheduled to run
35 @Override
36 protected void execute() {
dab6e7d6 37
763ccd44
M
38 }
39
40 // Called once after isFinished returns true
41 @Override
42 protected void end() {
dab6e7d6 43 Intake.intake.setSpeed(0);
763ccd44
M
44 }
45
46 // Called when another command which requires one or more of the same
47 // subsystems is scheduled to run
48 @Override
49 protected void interrupted() {
dab6e7d6 50 end();
763ccd44
M
51 }
52
53}