| 1 | package org.usfirst.frc.team3501.robot.autons; |
| 2 | |
| 3 | import org.usfirst.frc.team3501.bases.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 | } |