add javadoc style comments to ExpellBall and IntakeBall commands
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / ExpelBall.java
... / ...
CommitLineData
1package org.usfirst.frc.team3501.robot.commands;
2
3import org.usfirst.frc.team3501.robot.Robot;
4
5import edu.wpi.first.wpilibj.command.Command;
6
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
20public class ExpelBall extends Command {
21
22 public ExpelBall() {
23 requires(Robot.intakeArm);
24 }
25
26 @Override
27 protected void initialize() {
28 if (Robot.photogate.isBallPresent())
29 Robot.intakeArm.outputBall();
30 }
31
32 @Override
33 protected void execute() {
34 }
35
36 @Override
37 protected boolean isFinished() {
38 return !Robot.photogate.isBallPresent();
39 }
40
41 @Override
42 protected void end() {
43 Robot.intakeArm.stopRollers();
44 }
45
46 @Override
47 protected void interrupted() {
48
49 }
50
51}