| 1 | package org.usfirst.frc.team3501.robot.commands; |
| 2 | |
| 3 | import org.usfirst.frc.team3501.robot.Robot; |
| 4 | |
| 5 | import edu.wpi.first.wpilibj.command.Command; |
| 6 | |
| 7 | /*** |
| 8 | * This command will continually roll the rollers of the intake arm in the |
| 9 | * inwards direction and stop the rollers once the command is canceled. |
| 10 | * |
| 11 | * pre-condition: This command must be called by a button with the method |
| 12 | * .whileHeld() in OI |
| 13 | * |
| 14 | * @author Lauren and Niyati |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | public class BallRollerIntakeContinuous extends Command { |
| 19 | |
| 20 | public BallRollerIntakeContinuous() { |
| 21 | requires(Robot.intakeArm); |
| 22 | } |
| 23 | |
| 24 | @Override |
| 25 | protected void initialize() { |
| 26 | Robot.intakeArm.intakeBall(); |
| 27 | } |
| 28 | |
| 29 | @Override |
| 30 | protected void execute() { |
| 31 | |
| 32 | } |
| 33 | |
| 34 | @Override |
| 35 | protected boolean isFinished() { |
| 36 | return true; |
| 37 | } |
| 38 | |
| 39 | @Override |
| 40 | protected void end() { |
| 41 | Robot.intakeArm.stopRollers(); |
| 42 | } |
| 43 | |
| 44 | @Override |
| 45 | protected void interrupted() { |
| 46 | end(); |
| 47 | } |
| 48 | |
| 49 | } |