From decaa301e5f2ce46ae6cc8c4b1b18ce6fa5d2ab8 Mon Sep 17 00:00:00 2001 From: Shivani Ghanta Date: Thu, 2 Feb 2017 21:14:30 -0800 Subject: [PATCH] Finish implementing ReverseIndexWheel --- .../team3501/robot/commands/shooter/ReverseIndexWheel.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 -- 2.30.2