From: Shivani Ghanta Date: Fri, 3 Feb 2017 05:14:30 +0000 (-0800) Subject: Finish implementing ReverseIndexWheel X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=decaa301e5f2ce46ae6cc8c4b1b18ce6fa5d2ab8 Finish implementing ReverseIndexWheel --- 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 4c74515..544a815 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/ReverseIndexWheel.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/ReverseIndexWheel.java @@ -2,7 +2,6 @@ package org.usfirst.frc.team3501.robot.commands.shooter; import org.usfirst.frc.team3501.robot.Robot; -import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj.command.Command; /** @@ -13,7 +12,6 @@ import edu.wpi.first.wpilibj.command.Command; */ public class ReverseIndexWheel extends Command { - Timer timer; private double time; private double motorVal; @@ -28,14 +26,12 @@ public class ReverseIndexWheel extends Command { public ReverseIndexWheel(double time, double motorVal) { requires(Robot.getDriveTrain()); - timer = new Timer(); this.time = time; this.motorVal = motorVal; } @Override protected void initialize() { - timer.start(); } @@ -47,7 +43,7 @@ public class ReverseIndexWheel extends Command { @Override protected boolean isFinished() { - return timer.get() >= time; + return timeSinceInitialized() >= time; } @Override