big refactor of command/commandbase/commandgroup. also add auton read from file.
[3501/3501-spark-go] / src / org / usfirst / frc / team3501 / robot / autons / DrivePastStep.java
1 package org.usfirst.frc.team3501.robot.autons;
2
3 import org.usfirst.frc.team3501.robot.commands.Command;
4
5 public class DrivePastStep extends Command {
6
7 private double speed;
8
9 public DrivePastStep() {
10 super("DrivePastStep");
11 requires(drivetrain);
12
13 setTimeout(autonData.getTime("drive_past_step"));
14 speed = autonData.getSpeed("drive_past_step");
15 }
16
17 protected void execute() {
18 drivetrain.goForward(speed);
19 }
20
21 protected boolean isFinished() {
22 return isTimedOut();
23 }
24
25 protected void end() {
26 drivetrain.stop();
27 }
28 }