544a81533158ec247845a4fb5c81869d1938fa38
1 package org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 import edu
.wpi
.first
.wpilibj
.command
.Command
;
8 * This command reverses the index wheel at a given speed for given time in
11 * @author shivanighanta
14 public class ReverseIndexWheel
extends Command
{
16 private double motorVal
;
19 * See JavaDoc comment in class for details
22 * value range from -1 to 1
24 * in seconds, amount of time to run index wheel motor
27 public ReverseIndexWheel(double time
, double motorVal
) {
28 requires(Robot
.getDriveTrain());
30 this.motorVal
= motorVal
;
34 protected void initialize() {
39 protected void execute() {
40 Robot
.getShooter().setIndexWheelMotorVal(-motorVal
);
45 protected boolean isFinished() {
46 return timeSinceInitialized() >= time
;
50 protected void end() {
51 Robot
.getShooter().stopIndexWheel();
56 protected void interrupted() {