aef24840ae97ca833bd41659770d87818095b85f
1 package org
.usfirst
.frc
.team3501
.robot
.commands
.driving
;
3 import org
.usfirst
.frc
.team3501
.robot
.Constants
.Direction
;
5 import edu
.wpi
.first
.wpilibj
.Timer
;
6 import edu
.wpi
.first
.wpilibj
.command
.Command
;
8 public class TurnForTime
extends Command
{
13 public TurnForTime(double seconds
, Direction direction
) {
14 this.seconds
= seconds
;
15 this.direction
= direction
;
19 protected void initialize() {
25 protected void execute() {
27 * if direction is right make the left motor run forward make the right
28 * motor run backward if direction is left make right motor run forward make
29 * the left motor run backward
34 protected boolean isFinished() {
36 * when time is up return true
42 protected void end() {
46 protected void interrupted() {