import org.usfirst.frc.team3501.robot.Robot;
-import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.command.Command;
/**
*
* post-condition: Winch motor set to a specified speed for a specified time.
*
+ * @param motorVal
+ * value range is from -1 to 1
+ * @param time
+ * in seconds
* @author shivanighanta
*
*/
public class RunWinch extends Command {
- Timer timer;
private double time;
private double motorVal;
@Override
protected void initialize() {
- timer.start();
}
@Override
@Override
protected boolean isFinished() {
- return timer.get() >= time;
+ return timeSinceInitialized() >= time;
}
@Override