42ed83fc3f38b5a0c0970f52aa1103fe6c0af63a
[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;
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 == Constants.IntakeArm.IN)
19 Robot.intakeArm.intakeBall();
20 else
21 Robot.intakeArm.outputBall();
22 }
23
24 @Override
25 protected void execute() {
26 }
27
28 @Override
29 protected boolean isFinished() {
30 return true;
31 }
32
33 @Override
34 protected void end() {
35 }
36
37 @Override
38 protected void interrupted() {
39 }
40
41 }