8af1bcbfc3f9e21d9756dc808916539473aedcdf
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / driving / DriveDistance.java
1 package org.usfirst.frc.team3501.robot.commands.driving;
2
3 import org.usfirst.frc.team3501.robot.Robot;
4
5 import edu.wpi.first.wpilibj.command.Command;
6
7 /**
8 * This command makes the robot drive a specified distance using encoders on the
9 * robot and using a feedback loop
10 *
11 * parameters:
12 * distance the robot will move in inches
13 * motorVal: the motor input to set the motors to
14 */
15 public class DriveDistance extends Command {
16
17 public DriveDistance(double distance, double motorVal) {
18 requires(Robot.getDriveTrain());
19 }
20
21 // Called just before this Command runs the first time
22 @Override
23 protected void initialize() {
24 }
25
26 // Called repeatedly when this Command is scheduled to run
27 @Override
28 protected void execute() {
29 }
30
31 // Make this return true when this Command no longer needs to run execute()
32 @Override
33 protected boolean isFinished() {
34 return false;
35 }
36
37 // Called once after isFinished returns true
38 @Override
39 protected void end() {
40 }
41
42 // Called when another command which requires one or more of the same
43 // subsystems is scheduled to run
44 @Override
45 protected void interrupted() {
46 }
47 }