actually make and initialize fields
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / driving / TurnForTime.java
1 package org.usfirst.frc.team3501.robot.commands.driving;
2
3 import org.usfirst.frc.team3501.robot.Constants.Direction;
4
5 import edu.wpi.first.wpilibj.Timer;
6 import edu.wpi.first.wpilibj.command.Command;
7
8 public class TurnForTime extends Command {
9 Direction direction;
10 double seconds;
11 Timer timer;
12
13 public TurnForTime(double seconds, Direction direction) {
14 this.seconds = seconds;
15 this.direction = direction;
16 }
17
18 @Override
19 protected void initialize() {
20 timer = new Timer();
21 timer.start();
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 }
48 }