X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fshooter%2FReverseIndexWheel.java;fp=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fshooter%2FReverseIndexWheel.java;h=2ed11b6a398e97d7cdf4e28e03479a9bb1a0e818;hp=544a81533158ec247845a4fb5c81869d1938fa38;hb=f625e57a09b295f7d40e4568a8e3a8cd125630aa;hpb=1782cbadb12ad13d30eab7597f656cbe17f48df2 diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/ReverseIndexWheel.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/ReverseIndexWheel.java index 544a815..2ed11b6 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/ReverseIndexWheel.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/ReverseIndexWheel.java @@ -1,6 +1,7 @@ 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.command.Command; @@ -12,8 +13,8 @@ import edu.wpi.first.wpilibj.command.Command; */ public class ReverseIndexWheel extends Command { + private Shooter shooter = Robot.getShooter(); private double time; - private double motorVal; /** * See JavaDoc comment in class for details @@ -24,20 +25,18 @@ public class ReverseIndexWheel extends Command { * in seconds, amount of time to run index wheel motor */ - public ReverseIndexWheel(double time, double motorVal) { + public ReverseIndexWheel(double time) { requires(Robot.getDriveTrain()); this.time = time; - this.motorVal = motorVal; } @Override protected void initialize() { - } @Override protected void execute() { - Robot.getShooter().setIndexWheelMotorVal(-motorVal); + shooter.reverseIndexWheel(); } @@ -48,7 +47,7 @@ public class ReverseIndexWheel extends Command { @Override protected void end() { - Robot.getShooter().stopIndexWheel(); + shooter.stopIndexWheel(); }