mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-21 01:01:41 +00:00
Fix JPEG Image error
This commit is contained in:
@@ -138,7 +138,10 @@ public class Camera {
|
||||
// update camera values
|
||||
camVals = new CameraValues(this);
|
||||
|
||||
if (prevVideoMode != null && !prevVideoMode.equals(newVideoMode)) { // if resolution changed
|
||||
boolean hasPrevVideoMode = prevVideoMode != null;
|
||||
boolean newVideoModeIsNew = hasPrevVideoMode && !prevVideoMode.equals(newVideoMode);
|
||||
|
||||
if (newVideoModeIsNew || !hasPrevVideoMode) {
|
||||
UsbCam.setVideoMode(newVideoMode.getActualPixelFormat(), newVideoMode.width, newVideoMode.height, newVideoMode.fps);
|
||||
if (updateCvSource) {
|
||||
updateCvSource();
|
||||
|
||||
Reference in New Issue
Block a user