From 5c6d9c86b4031c75dbd98d49a27996420cf2931b Mon Sep 17 00:00:00 2001 From: Andres Esteban Echeverria G Date: Mon, 6 Feb 2017 21:26:15 -0800 Subject: [PATCH] Troubleshooting --- src/org/usfirst/frc/team3501/robot/CameraFeeds.java | 2 ++ src/org/usfirst/frc/team3501/robot/Constants.java | 2 +- src/org/usfirst/frc/team3501/robot/OI.java | 10 +++------- src/org/usfirst/frc/team3501/robot/Robot.java | 4 ---- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/CameraFeeds.java b/src/org/usfirst/frc/team3501/robot/CameraFeeds.java index 15ea369..4e1d919 100755 --- a/src/org/usfirst/frc/team3501/robot/CameraFeeds.java +++ b/src/org/usfirst/frc/team3501/robot/CameraFeeds.java @@ -58,6 +58,7 @@ public class CameraFeeds { } public void toggleCamera() { + System.out.println("enter toggleCamer"); if (curCam.equals(intakeCam)) { changeCam(climberCam); curCam = climberCam; @@ -80,6 +81,7 @@ public class CameraFeeds { * newId for camera */ public void changeCam(VideoSource cam) { + System.out.println("change camera"); server.removeCamera(axisCamName); server.removeCamera(usbCamName); server.addCamera(cam); diff --git a/src/org/usfirst/frc/team3501/robot/Constants.java b/src/org/usfirst/frc/team3501/robot/Constants.java index a40334d..6c3a6ad 100644 --- a/src/org/usfirst/frc/team3501/robot/Constants.java +++ b/src/org/usfirst/frc/team3501/robot/Constants.java @@ -20,7 +20,7 @@ public class Constants { public final static int TOGGLE_GEAR_PORT = 0; - public static final int TOGGLE_CAMERA_FEEDS = 4; + public static final int TOGGLE_CAMERA_FEEDS = 1; } diff --git a/src/org/usfirst/frc/team3501/robot/OI.java b/src/org/usfirst/frc/team3501/robot/OI.java index 6a99c97..5082911 100644 --- a/src/org/usfirst/frc/team3501/robot/OI.java +++ b/src/org/usfirst/frc/team3501/robot/OI.java @@ -23,7 +23,7 @@ public class OI { public OI() { leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT); rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT); - toggleWinch = new JoystickButton(leftJoystick, + /*toggleWinch = new JoystickButton(leftJoystick, Constants.OI.TOGGLE_WINCH_PORT); toggleIndexWheel = new JoystickButton(leftJoystick, Constants.OI.TOGGLE_INDEXWHEEL_PORT); @@ -33,17 +33,13 @@ public class OI { toggleGear = new JoystickButton(leftJoystick, Constants.OI.TOGGLE_GEAR_PORT); toggleGear.whenPressed(new ToggleGear()); + */ toggleCameraFeeds = new JoystickButton(leftJoystick, Constants.OI.TOGGLE_CAMERA_FEEDS); toggleCameraFeeds.whenReleased(new ToggleCameraFeed()); - - toggleCameraFeeds = new JoystickButton(leftJoystick, - Constants.OI.TOGGLE_CAMERA_FEEDS); - - toggleCameraFeeds.whenReleased(new ToggleCameraFeed()); - + System.out.println("toggle ready"); } public static OI getOI() { diff --git a/src/org/usfirst/frc/team3501/robot/Robot.java b/src/org/usfirst/frc/team3501/robot/Robot.java index d4f5d94..b0e32a7 100644 --- a/src/org/usfirst/frc/team3501/robot/Robot.java +++ b/src/org/usfirst/frc/team3501/robot/Robot.java @@ -43,8 +43,6 @@ public class Robot extends IterativeRobot { // cameraFeeds = new CameraFeeds(); - cameraFeeds = new CameraFeeds(); - } public static DriveTrain getDriveTrain() { @@ -81,8 +79,6 @@ public class Robot extends IterativeRobot { cameraFeeds.init(); - cameraFeeds.init(); - } @Override -- 2.30.2