Change buttons pressed to use OI initialized buttons
authorEvanYap <evanyap.14@gmail.com>
Fri, 22 Jan 2016 03:49:06 +0000 (19:49 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Sat, 23 Jan 2016 03:37:35 +0000 (19:37 -0800)
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java

index 1d7fdb3cdfd62d678ab981125f2e5e638491d6b0..5727cc286cb6f1513b9c3c867af4f0468c1cb9b9 100755 (executable)
@@ -27,17 +27,15 @@ public class Shooter extends Subsystem {
 \r
   public void shooterButtonsPressed() {\r
 \r
-    if (Robot.oi.rightJoystick\r
-        .getRawButton(Constants.OI.INCREMENT_SHOOTER_PORT)) {\r
+    if (Robot.oi.incrementSpeed.get()) {\r
       changeSpeed(0.1);\r
     }\r
 \r
-    if (Robot.oi.rightJoystick\r
-        .getRawButton(Constants.OI.DECREMENT_SHOOTER_PORT)) {\r
+    if (Robot.oi.decrementSpeed.get()) {\r
       changeSpeed(-0.1);\r
     }\r
 \r
-    if (Robot.oi.rightJoystick.getRawButton(Constants.OI.TRIGGER_PORT)) {\r
+    if (Robot.oi.trigger.get()) {\r
       if (this.getState() == State.STOPPED)\r
         this.setSpeed(0.5);\r
     } else {\r
@@ -46,7 +44,7 @@ public class Shooter extends Subsystem {
       }\r
     }\r
 \r
-    if (Robot.oi.rightJoystick.getRawButton(Constants.OI.PRINT_PORT)) {\r
+    if (Robot.oi.outputCurrentShooterSpeed.get()) {\r
       System.out.println("Current Shooter Speed: " + getCurrentSpeed());\r
     }\r
   }\r