1 package org
.usfirst
.frc
.team3501
.robot
.commands
.driving
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 import edu
.wpi
.first
.wpilibj
.command
.Command
;
8 * This command makes the robot drive a specified distance using encoders on the
9 * robot and using a feedback loop
12 * distance the robot will move in inches
14 public class DriveDistance
extends Command
{
16 public DriveDistance(double distance
) {
17 requires(Robot
.getDriveTrain());
20 // Called just before this Command runs the first time
22 protected void initialize() {
25 // Called repeatedly when this Command is scheduled to run
27 protected void execute() {
30 // Make this return true when this Command no longer needs to run execute()
32 protected boolean isFinished() {
36 // Called once after isFinished returns true
38 protected void end() {
41 // Called when another command which requires one or more of the same
42 // subsystems is scheduled to run
44 protected void interrupted() {