continue to flesh out initial codebase
[3501/3501-spark-go] / src / org / usfirst / frc / team3501 / robot / autons / DriveOverStep.java
diff --git a/src/org/usfirst/frc/team3501/robot/autons/DriveOverStep.java b/src/org/usfirst/frc/team3501/robot/autons/DriveOverStep.java
new file mode 100644 (file)
index 0000000..2298661
--- /dev/null
@@ -0,0 +1,29 @@
+package org.usfirst.frc.team3501.robot.autons;
+
+import org.usfirst.frc.team3501.robot.RobotMap;
+import org.usfirst.frc.team3501.robot.commands.CommandBase;
+
+public class DriveOverStep extends CommandBase {
+
+    private double speed;
+
+    public DriveOverStep() {
+        super("DriveOverStep");
+        requires(drivetrain);
+
+        setTimeout(RobotMap.OVER_STEP_TIME);
+        this.speed = RobotMap.OVER_STEP_SPEED;
+    }
+
+    protected void execute() {
+        drivetrain.goForward(speed);
+    }
+
+    protected boolean isFinished() {
+        return isTimedOut();
+    }
+
+    protected void end() {
+        drivetrain.stop();
+    }
+}