add comments to inform of task
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / intakearm / RunIntake.java
CommitLineData
571a0e2a
HD
1package org.usfirst.frc.team3501.robot.commands.intakearm;
2
7988f380 3import org.usfirst.frc.team3501.robot.Constants.IntakeArm;
571a0e2a
HD
4import org.usfirst.frc.team3501.robot.Robot;
5
6import edu.wpi.first.wpilibj.command.Command;
7
8public class RunIntake extends Command {
e1f7a742 9 int direction;
571a0e2a 10
e1f7a742 11 public RunIntake(int direction) {
571a0e2a 12 requires(Robot.intakeArm);
e1f7a742 13 this.direction = direction;
571a0e2a
HD
14 }
15
16 @Override
17 protected void initialize() {
7988f380 18 if (direction == IntakeArm.IN)
e1f7a742 19 Robot.intakeArm.intakeBall();
7988f380 20 else if (direction == IntakeArm.OUT)
e1f7a742 21 Robot.intakeArm.outputBall();
ba29a57a
HD
22 else
23 Robot.intakeArm.stopRollers();
571a0e2a
HD
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
a0794243 43 // while holding right trigger, intake intakes
44 // it intakes until it sees the ball with the photogate
45 // as soon as it sees the ball, it outtakes for 0.2 seconds.
46 // after this happens, the right trigger does nothing for 2 seconds
47
571a0e2a 48}