Commit | Line | Data |
---|---|---|
3e4790a8 LH |
1 | package org.usfirst.frc.team3501.robot.autons; |
2 | ||
3 | import org.usfirst.frc.team3501.robot.RobotMap; | |
4 | import org.usfirst.frc.team3501.robot.commands.CommandBase; | |
5 | ||
6 | public class DriveOverStep extends CommandBase { | |
7 | ||
8 | private double speed; | |
9 | ||
10 | public DriveOverStep() { | |
11 | super("DriveOverStep"); | |
12 | requires(drivetrain); | |
13 | ||
14 | setTimeout(RobotMap.OVER_STEP_TIME); | |
15 | this.speed = RobotMap.OVER_STEP_SPEED; | |
16 | } | |
17 | ||
18 | protected void execute() { | |
19 | drivetrain.goForward(speed); | |
20 | } | |
21 | ||
22 | protected boolean isFinished() { | |
23 | return isTimedOut(); | |
24 | } | |
25 | ||
26 | protected void end() { | |
27 | drivetrain.stop(); | |
28 | } | |
29 | } |