From: Rayan Hirech Date: Sat, 4 Feb 2017 23:16:18 +0000 (-0800) Subject: Attempt to toggle cameras X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=18f2b59b24e37dd703441c885fb8e6d980541c3d Attempt to toggle cameras --- diff --git a/src/org/usfirst/frc/team3501/robot/CameraFeeds.java b/src/org/usfirst/frc/team3501/robot/CameraFeeds.java index 855d32a..6872428 100755 --- a/src/org/usfirst/frc/team3501/robot/CameraFeeds.java +++ b/src/org/usfirst/frc/team3501/robot/CameraFeeds.java @@ -11,7 +11,7 @@ public class CameraFeeds { // private final int intakeCam; // private final int climberCam; private Image frame; - private int curCam; + private boolean curCam = true; private CameraServer server; private static UsbCamera intakeCam; private static AxisCamera climberCam; @@ -71,6 +71,15 @@ public class CameraFeeds { * for camera */ public void changeCam(/* int newId */) { + if (curCam = true) { + public void removeCamera(/*Axis Camera name*/); + public void addCamera(VideoSource intakeCam); + curCam = false; + } else if (curCam = false) { + public void removeCamera(/*Usb Camera name*/); + public void addCamera(VideoSource climberCam); + curCam = false; + } // NIVision.IMAQdxStopAcquisition(curCam); // NIVision.IMAQdxConfigureGrab(newId); // NIVision.IMAQdxStartAcquisition(newId);