diff --git a/photon-core/src/main/java/org/photonvision/vision/camera/USBCameras/GenericUSBCameraSettables.java b/photon-core/src/main/java/org/photonvision/vision/camera/USBCameras/GenericUSBCameraSettables.java index e601586fb3..8d272d15e2 100644 --- a/photon-core/src/main/java/org/photonvision/vision/camera/USBCameras/GenericUSBCameraSettables.java +++ b/photon-core/src/main/java/org/photonvision/vision/camera/USBCameras/GenericUSBCameraSettables.java @@ -240,7 +240,8 @@ public void setGain(int gain) { @Override public VideoMode getCurrentVideoMode() { - return camera.isConnected() ? camera.getVideoMode() : null; + return camera + .getVideoMode(); // This returns the current video mode even if the camera is disconnected } @Override @@ -250,7 +251,7 @@ public void setVideoModeInternal(VideoMode videoMode) { logger.error("Got a null video mode! Doing nothing..."); return; } - camera.setVideoMode(videoMode); + if (camera.setVideoMode(videoMode)) logger.debug("Failed to set video mode!"); } catch (Exception e) { logger.error("Failed to set video mode!", e); }