From: Rohan Rodrigues Date: Fri, 3 Mar 2017 00:55:26 +0000 (-0800) Subject: Add code for alternating the camera feed X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=ee1a80061659d7845cf8e2654cbc2a744b967d2d Add code for alternating the camera feed --- diff --git a/src/org/usfirst/frc/team3501/robot/OI.java b/src/org/usfirst/frc/team3501/robot/OI.java index c608b86..243e330 100644 --- a/src/org/usfirst/frc/team3501/robot/OI.java +++ b/src/org/usfirst/frc/team3501/robot/OI.java @@ -32,6 +32,8 @@ public class OI { public static Button increaseShooterSpeed; public static Button decreaseShooterSpeed; + private static Button changeCam; + public OI() { leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT); rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT); @@ -70,6 +72,10 @@ public class OI { decreaseShooterSpeed = new JoystickButton(leftJoystick, Constants.OI.DECREASE_SHOOTER_SPEED_PORT); decreaseShooterSpeed.whenPressed(new DecreaseShootingSpeed()); + + changeCam = new JoystickButton(rightJoystick, + Constants.OI.CHANGE_CAMERA_VIEW); + changeCam.toggleWhenPressed(new ChangeCameraView()); } public static OI getOI() {