Commit | Line | Data |
---|---|---|
3e4790a8 LH |
1 | package org.usfirst.frc.team3501.robot.autons; |
2 | ||
5b3b1652 | 3 | import org.usfirst.frc.team3501.bases.Command; |
3e4790a8 | 4 | |
b2640783 | 5 | public class DrivePastStep extends Command { |
3e4790a8 LH |
6 | |
7 | private double speed; | |
8 | ||
9 | public DrivePastStep() { | |
10 | super("DrivePastStep"); | |
11 | requires(drivetrain); | |
12 | ||
b2640783 LH |
13 | setTimeout(autonData.getTime("drive_past_step")); |
14 | speed = autonData.getSpeed("drive_past_step"); | |
3e4790a8 LH |
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 | } |