1 package org
.usfirst
.frc
.team3501
.robot
.commands
.intakearm
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 import edu
.wpi
.first
.wpilibj
.command
.Command
;
8 * This command will expel a boulder from the robot, if it is even present to
11 * pre-condition: Intake arm is at correct height and a boulder is present
14 * post-condition: A boulder is expelled from inside the robot to the field
15 * outside of the robot.
17 * @author Lauren and Niyati
21 public class ExpelBall
extends Command
{
22 private final int TIMEOUT_AMOUNT
= 5;
25 requires(Robot
.intakeArm
);
29 protected void initialize() {
30 this.setTimeout(TIMEOUT_AMOUNT
);
31 if (Robot
.shooter
.isBallInside())
32 Robot
.intakeArm
.outputBall();
36 protected void execute() {
40 protected boolean isFinished() {
41 return (this.isTimedOut() || !Robot
.shooter
.isBallInside());
45 protected void end() {
46 Robot
.intakeArm
.stopRollers();
50 protected void interrupted() {