package org.usfirst.frc.team3501.robot.commands.shooter;
import org.usfirst.frc.team3501.robot.Robot;
+import org.usfirst.frc.team3501.robot.subsystems.Shooter;
-import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.command.Command;
/**
*/
public class ReverseIndexWheel extends Command {
- Timer timer;
private double time;
private double motorVal;
+ private Shooter shooter = Robot.getShooter();
/**
* See JavaDoc comment in class for details
public ReverseIndexWheel(double time, double motorVal) {
requires(Robot.getDriveTrain());
- timer = new Timer();
this.time = time;
this.motorVal = motorVal;
}
@Override
protected void initialize() {
- timer.start();
}
@Override
protected void execute() {
- Robot.getShooter().setIndexWheelMotorVal(-motorVal);
+ shooter.runIndexWheelReverse();
}
@Override
protected boolean isFinished() {
- return timer.get() >= time;
+ return timeSinceInitialized() >= time;
}
@Override