7a0c6019380b8575c834a820c6352a02afc35d3d
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 toggles the speed at which the drive train runs at
10 * post-condition: if the drivetrain is running at high gear, it will be made to
11 * run at low gear, and vice versa
13 public class ToggleGear
extends Command
{
16 requires(Robot
.getDriveTrain());
19 // Called just before this Command runs the first time
21 protected void initialize() {
24 // Called repeatedly when this Command is scheduled to run
26 protected void execute() {
29 // Make this return true when this Command no longer needs to run execute()
31 protected boolean isFinished() {
35 // Called once after isFinished returns true
37 protected void end() {
40 // Called when another command which requires one or more of the same
41 // subsystems is scheduled to run
43 protected void interrupted() {