mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
Limit PS3Eye to 100FPS (#218)
This helps prevent running in to USB bandwidth issues with multiple PS3Eyes.
This commit is contained in:
@@ -21,5 +21,7 @@ public enum CameraQuirk {
|
||||
/** Camera settable for controllable image gain */
|
||||
Gain,
|
||||
/** For the Raspberry Pi Camera */
|
||||
PiCam
|
||||
PiCam,
|
||||
/** Cap at 100FPS for high-bandwidth cameras */
|
||||
FPSCap100
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class QuirkyCamera {
|
||||
|
||||
private static final List<QuirkyCamera> quirkyCameras =
|
||||
List.of(
|
||||
new QuirkyCamera(0x2000, 0x1415, CameraQuirk.Gain), // PS3Eye
|
||||
new QuirkyCamera(0x2000, 0x1415, CameraQuirk.Gain, CameraQuirk.FPSCap100), // PS3Eye
|
||||
new QuirkyCamera(-1, -1, "mmal service 16.1", CameraQuirk.PiCam) // PiCam (via V4L2)
|
||||
);
|
||||
|
||||
|
||||
@@ -194,6 +194,12 @@ public class USBCameraSource implements VisionSource {
|
||||
}
|
||||
}
|
||||
|
||||
if (cameraQuirks.hasQuirk(CameraQuirk.FPSCap100)) {
|
||||
if (videoMode.fps > 100) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
videoModesList.add(videoMode);
|
||||
|
||||
// We look for modes with the same height/width/pixelformat as this mode
|
||||
|
||||
Reference in New Issue
Block a user