Add (BAD) shooter code. Very temporary.
authorHarel Dor <hareldor@gmail.com>
Tue, 23 Feb 2016 04:26:26 +0000 (20:26 -0800)
committerHarel Dor <hareldor@gmail.com>
Tue, 23 Feb 2016 04:33:38 +0000 (20:33 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/OI.java
src/org/usfirst/frc/team3501/robot/Robot.java

index 6ed069637770a2d3b0d8915eb5d5d2121b90e75f..657fc2854790160b9591389f0d624d745f35f1e5 100644 (file)
@@ -101,7 +101,7 @@ public class Constants {
   }
 
   public static class Shooter {
-    public static final int PORT = 0;
+    public static final int PORT = 4;
     public static final int PUNCH_FORWARD = 5;
     public static final int PUNCH_REVERSE = 1;
     public static final int ANGLE_ADJUSTER_PORT = 0;
index cb7e12d9b3120c094e24f39869be0d6deea94cf6..bde311bd3147356a90d92129557a340b7f134bc7 100644 (file)
@@ -42,8 +42,8 @@ public class OI {
     leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
     rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
 
-    toggleGear = new JoystickButton(rightJoystick,
-        Constants.OI.RIGHT_JOYSTICK_TRIGGER_PORT);
+    toggleGear = new JoystickButton(leftJoystick,
+        Constants.OI.LEFT_JOYSTICK_TRIGGER_PORT);
     toggleGear.toggleWhenPressed(new ChangeGear());
 
     // passPortcullis = new DigitalButton(
index 46ef8069f75bfbbca275ed78fdbeb649e241c610..d0516b8e040ec23fc93c84fd3fa3ca5817ea4e42 100644 (file)
@@ -126,6 +126,11 @@ public class Robot extends IterativeRobot {
   @Override
   public void teleopPeriodic() {
     Scheduler.getInstance().run();
+    if (OI.rightJoystick.getTrigger()) {
+      Robot.shooter.setSpeed(1);
+    } else {
+      Robot.shooter.setSpeed(0);
+    }
   }
 
 }