From: Rohan Rodrigues Date: Fri, 3 Mar 2017 00:39:43 +0000 (-0800) Subject: Add piston getters in Shooter X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=962daa72b4d2ccabd19828bfaa9b149b3306255b Add piston getters in Shooter --- diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java index 820bc6a..445584a 100644 --- a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java @@ -177,4 +177,20 @@ public class Shooter extends Subsystem { } return false; } + + public Value getPistonValue() { + return piston.get(); + } + + public void setHighGear() { + changeGear(Constants.Shooter.HIGH_GEAR); + } + + public void setLowGear() { + changeGear(Constants.Shooter.LOW_GEAR); + } + + private void changeGear(DoubleSolenoid.Value gear) { + piston.set(gear); + } }