From ee1a80061659d7845cf8e2654cbc2a744b967d2d Mon Sep 17 00:00:00 2001 From: Rohan Rodrigues Date: Thu, 2 Mar 2017 16:55:26 -0800 Subject: [PATCH] Add code for alternating the camera feed --- src/org/usfirst/frc/team3501/robot/OI.java | 6 ++++++ 1 file changed, 6 insertions(+) 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() { -- 2.30.2