Hacky fix for two cameras

This commit is contained in:
Omer
2019-09-24 02:16:36 +03:00
parent 50fb60b3a2
commit 1def77f36d

View File

@@ -64,6 +64,10 @@ public class Camera {
this.pipelines = pipelines;
// set up video modes according to minimums
while(!UsbCam.isConnected())
{
System.out.println("notConnected");//TODO add a time sleep, can wait only so long before giving up
}
availableVideoModes = Arrays.stream(UsbCam.enumerateVideoModes()).filter(v -> v.fps >= MINIMUM_FPS && v.width >= MINIMUM_WIDTH && v.height >= MINIMUM_HEIGHT).toArray(VideoMode[]::new);
if (videoModeIndex <= availableVideoModes.length - 1) {
setCamVideoMode(videoModeIndex, false);