add javadoc style comments to ExpellBall and IntakeBall commands
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / ExpelBall.java
CommitLineData
898ac295
LM
1package org.usfirst.frc.team3501.robot.commands;
2
f19a94ad
LM
3import org.usfirst.frc.team3501.robot.Robot;
4
898ac295
LM
5import edu.wpi.first.wpilibj.command.Command;
6
d034d78f
LM
7/***
8 * This command will expel a boulder from the robot, if it is even present to
9 * begin with.
10 *
11 * pre-condition: A boulder is present inside the robot.
12 *
13 * post-condition: A boulder is expelled from inside the robot to the field
14 * outside of the robot.
15 *
16 * @author Lauren and Niyati
17 *
18 */
19
898ac295
LM
20public class ExpelBall extends Command {
21
22 public ExpelBall() {
df77579b 23 requires(Robot.intakeArm);
898ac295
LM
24 }
25
26 @Override
27 protected void initialize() {
f19a94ad
LM
28 if (Robot.photogate.isBallPresent())
29 Robot.intakeArm.outputBall();
898ac295
LM
30 }
31
32 @Override
33 protected void execute() {
898ac295
LM
34 }
35
36 @Override
37 protected boolean isFinished() {
f19a94ad 38 return !Robot.photogate.isBallPresent();
898ac295
LM
39 }
40
41 @Override
42 protected void end() {
1828f5f6 43 Robot.intakeArm.stopRollers();
898ac295
LM
44 }
45
46 @Override
47 protected void interrupted() {
48
49 }
50
51}