X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2FCameraFeeds.java;h=07cf52e6a4e445150b7eb2d59c6637f475dd2b3c;hb=55391ba3a0860e7f96cb27d9325ad36939beca32;hp=2c621f05ba4baf49d481a93df42fa999376d8006;hpb=fb2aaf9cf663e8fdc0fab4a755a2cf5fcf0054bf;p=3501%2F2017steamworks diff --git a/src/org/usfirst/frc/team3501/robot/CameraFeeds.java b/src/org/usfirst/frc/team3501/robot/CameraFeeds.java index 2c621f0..07cf52e 100755 --- a/src/org/usfirst/frc/team3501/robot/CameraFeeds.java +++ b/src/org/usfirst/frc/team3501/robot/CameraFeeds.java @@ -18,27 +18,28 @@ public class CameraFeeds { @SuppressWarnings("deprecation") private CameraFeeds(/* Joystick Button */) { - usbCamName = intakeCam.getName(); - axisCamName = climberCam.getName(); + System.out.println("Enter CameraFeeds constructor"); server = CameraServer.getInstance(); - climberCam = server.addAxisCamera(axisCamName, "10.35.1.11"); + climberCam = server.addAxisCamera("AxisCamera", "10.35.1.11"); intakeCam = server.startAutomaticCapture(); - curCam = intakeCam; - curCam = climberCam; usbCamName = intakeCam.getName(); axisCamName = climberCam.getName(); + curCam = climberCam; + changeCam(curCam); + System.out.println("Leaving CameraFeeds constructor"); } public static CameraFeeds getCameraFeeds() { + System.out.println("Enter CameraFeeds.getCameraFeeds"); if (cameraFeeds == null) { cameraFeeds = new CameraFeeds(); } + System.out.println("Leaving CameraFeeds.getCameraFeeds"); return cameraFeeds; - } public void init() { - changeCam(climberCam); + System.out.println("Initializing..."); } public void toggleCamera() { @@ -52,7 +53,6 @@ public class CameraFeeds { curCam = intakeCam; System.out.println("Switching to intake camera."); } - changeCam(curCam); } /** @@ -62,7 +62,7 @@ public class CameraFeeds { * newId for camera */ public void changeCam(VideoSource cam) { - server.removeCamera(curCam.getName()); - server.addCamera(cam); + System.out.println("Changing cameras..."); + server.getVideo(cam); } }