7d2e490a00eda1b196cfdc8fdf871285e7556c00
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / intakearm / RunIntake.java
1 package org.usfirst.frc.team3501.robot.commands.intakearm;
2
3 import org.usfirst.frc.team3501.robot.Constants.IntakeArm;
4 import org.usfirst.frc.team3501.robot.Robot;
5
6 import edu.wpi.first.wpilibj.command.Command;
7
8 public class RunIntake extends Command {
9 int direction;
10
11 public RunIntake(int direction) {
12 requires(Robot.intakeArm);
13 this.direction = direction;
14 }
15
16 @Override
17 protected void initialize() {
18 if (direction == IntakeArm.IN)
19 Robot.intakeArm.intakeBall();
20 else if (direction == IntakeArm.OUT)
21 Robot.intakeArm.outputBall();
22 else
23 Robot.intakeArm.stopRollers();
24 }
25
26 @Override
27 protected void execute() {
28 }
29
30 @Override
31 protected boolean isFinished() {
32 return true;
33 }
34
35 @Override
36 protected void end() {
37 }
38
39 @Override
40 protected void interrupted() {
41 }
42
43 }