add hella auton
[3501/3501-spark-go] / src / org / usfirst / frc / team3501 / robot / autons / DriveOverStep.java
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 speed = RobotMap.OVER_STEP_SPEED;
16 }
17
18 // TODO: this is an ugly "solution"
19 public DriveOverStep(int coef) {
20 this();
21 this.speed *= coef;
22 }
23
24 protected void execute() {
25 drivetrain.goForward(speed);
26 }
27
28 protected boolean isFinished() {
29 return isTimedOut();
30 }
31
32 protected void end() {
33 drivetrain.stop();
34 }
35 }