Add piston getters in Shooter
authorRohan Rodrigues <rohanrodrigues19@gmail.com>
Fri, 3 Mar 2017 00:39:43 +0000 (16:39 -0800)
committerRohan Rodrigues <rohanrodrigues19@gmail.com>
Thu, 9 Mar 2017 00:56:59 +0000 (16:56 -0800)
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java

index 820bc6a85c25f2429f5cf9c90153d48475914190..445584a483dd28273cae08d3719e79e2be4e8d92 100644 (file)
@@ -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);
+  }
 }