1 package org
.usfirst
.frc
.team3501
.robot
.commands
.driving
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 import edu
.wpi
.first
.wpilibj
.Timer
;
6 import edu
.wpi
.first
.wpilibj
.command
.Command
;
11 public class TimeDrive
extends Command
{
13 double motorVal
, time
;
15 public TimeDrive(final double time
, final double motorVal
) {
16 requires(Robot
.getDriveTrain());
20 this.motorVal
= motorVal
;
24 protected void initialize() {
26 Robot
.getDriveTrain().setMotorValues(motorVal
, motorVal
);
30 protected void execute() {
34 protected boolean isFinished() {
35 return timer
.get() >= time
;
39 protected void end() {
40 Robot
.getDriveTrain().stop();
44 protected void interrupted() {