actually make and initialize fields
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / driving / TurnForTime.java
CommitLineData
6bb7f8ac 1package org.usfirst.frc.team3501.robot.commands.driving;
be737780 2
5ac4d78e
ME
3import org.usfirst.frc.team3501.robot.Constants.Direction;
4
de0fd5e3 5import edu.wpi.first.wpilibj.Timer;
be737780
ME
6import edu.wpi.first.wpilibj.command.Command;
7
be737780 8public class TurnForTime extends Command {
6389c060
ME
9 Direction direction;
10 double seconds;
11 Timer timer;
be737780 12
5ac4d78e 13 public TurnForTime(double seconds, Direction direction) {
6389c060
ME
14 this.seconds = seconds;
15 this.direction = direction;
5ac4d78e
ME
16 }
17
18 @Override
19 protected void initialize() {
6389c060
ME
20 timer = new Timer();
21 timer.start();
5ac4d78e
ME
22 }
23
24 @Override
25 protected void execute() {
26 /*
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
30 */
31 }
32
33 @Override
34 protected boolean isFinished() {
35 /*
36 * when time is up return true
37 */
38 return false;
39 }
40
41 @Override
42 protected void end() {
43 }
44
45 @Override
46 protected void interrupted() {
47 }
be737780 48}