Commit | Line | Data |
---|---|---|
e911bc8e AD |
1 | package org.usfirst.frc.team3501.robot.commands.intake; |
2 | ||
3 | import org.usfirst.frc.team3501.robot.subsystems.Intake; | |
4 | ||
5 | import edu.wpi.first.wpilibj.command.Command; | |
6 | ||
7 | /*** | |
8 | * | |
9 | * Runs the intake continuously. | |
10 | * | |
11 | * @author Meeta | |
12 | * | |
13 | */ | |
14 | public class RunIntakeContinuous extends Command { | |
15 | // create setter method for speed, use setSpeed method to do end() by setting | |
16 | // speed to 0 | |
17 | ||
18 | public RunIntakeContinuous() { | |
19 | ||
20 | } | |
21 | ||
22 | @Override | |
23 | protected boolean isFinished() { | |
24 | // TODO Auto-generated method stub | |
25 | return true; | |
26 | } | |
27 | ||
28 | // Called just before this Command runs the first time | |
29 | @Override | |
30 | protected void initialize() { | |
31 | ||
32 | } | |
33 | ||
34 | // Called repeatedly when this Command is scheduled to run | |
35 | @Override | |
36 | protected void execute() { | |
37 | ||
38 | } | |
39 | ||
40 | // Called once after isFinished returns true | |
41 | @Override | |
42 | protected void end() { | |
43 | Intake.intake.setSpeed(0); | |
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() { | |
50 | end(); | |
51 | } | |
52 | ||
53 | } |