7a0c6019380b8575c834a820c6352a02afc35d3d
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / driving / ToggleGear.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 toggles the speed at which the drive train runs at
9 *
10 * post-condition: if the drivetrain is running at high gear, it will be made to
11 * run at low gear, and vice versa
12 */
13 public class ToggleGear extends Command {
14
15 public ToggleGear() {
16 requires(Robot.getDriveTrain());
17 }
18
19 // Called just before this Command runs the first time
20 @Override
21 protected void initialize() {
22 }
23
24 // Called repeatedly when this Command is scheduled to run
25 @Override
26 protected void execute() {
27 }
28
29 // Make this return true when this Command no longer needs to run execute()
30 @Override
31 protected boolean isFinished() {
32 return false;
33 }
34
35 // Called once after isFinished returns true
36 @Override
37 protected void end() {
38 }
39
40 // Called when another command which requires one or more of the same
41 // subsystems is scheduled to run
42 @Override
43 protected void interrupted() {
44 }
45 }