private static String usbCamName;
private static String axisCamName;
private static CameraFeeds cameraFeeds = null;
-
@SuppressWarnings("deprecation")
public CameraFeeds(/* Joystick Button */) {
- // Get camera id by supplying camera name example 'cam0', found on roborio web
+ // Get camera id by supplying camera name example 'cam0', found on roborio
+ // web
// interface
/*
* intakeCam =
// axisCamera = cameraServer2.addAxisCamera("axisCamera", "10.35.1.11");
// cameraFeeds = new CameraFeeds();
}
-
+
public static CameraFeeds getCameraFeeds() {
- if (cameraFeeds == null) {
- cameraFeeds = new CameraFeeds();
- }
- return cameraFeeds;
-
-
+ if (cameraFeeds == null) {
+ cameraFeeds = new CameraFeeds();
+ }
+ return cameraFeeds;
+
}
public void init() {
- changeCam(intakeCam);
+ changeCam(climberCam);
}
public void toggleCamera() {
if (curCam.equals(intakeCam)) {
changeCam(climberCam);
curCam = climberCam;
+ System.out.println("Switching to climber camera.");
+ return;
}
if (curCam.equals(climberCam)) {
changeCam(intakeCam);
curCam = intakeCam;
+ System.out.println("Switching to intake camera.");
+ return;
}
}
*
* Change the camera to get image from to a different one
*
- * newId
- * for camera
+ * newId for camera
*/
public void changeCam(VideoSource cam) {
server.removeCamera(axisCamName);