1 package org
.usfirst
.frc
.team3501
.robot
.commands
.driving
;
3 import org
.usfirst
.frc
.team3501
.robot
.Constants
;
4 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.DriveTrain
;
7 import edu
.wpi
.first
.wpilibj
.DoubleSolenoid
.Value
;
8 import edu
.wpi
.first
.wpilibj
.command
.Command
;
13 public class ToggleGearManipulatorPiston
extends Command
{
14 private DriveTrain driveTrain
= Robot
.getDriveTrain();
16 public ToggleGearManipulatorPiston() {
20 protected void initialize() {
21 Value gearPistonValue
= driveTrain
.getGearManipulatorPistonValue();
22 if (gearPistonValue
== Constants
.DriveTrain
.REVERSE_PISTON_VALUE
) {
23 driveTrain
.extendGearManipulatorPiston();
25 driveTrain
.retractGearManipulatorPiston();
30 protected void execute() {
33 // Make this return true when this Command no longer needs to run execute()
35 protected boolean isFinished() {
39 // Called once after isFinished returns true
41 protected void end() {
44 // Called when another command which requires one or more of the same
45 // subsystems is scheduled to run
47 protected void interrupted() {