mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-02 02:51:40 +00:00
Add StickyFPS quirk for Arducam OV2311 (#994)
Disable setting first video mode on boot. Resolution is actually set immediately after
This commit is contained in:
@@ -30,4 +30,6 @@ public enum CameraQuirk {
|
||||
CompletelyBroken,
|
||||
/** Has adjustable focus and autofocus switch */
|
||||
AdjustableFocus,
|
||||
/** Changing FPS repeatedly with small delay does not work correctly */
|
||||
StickyFPS,
|
||||
}
|
||||
|
||||
@@ -44,7 +44,8 @@ public class QuirkyCamera {
|
||||
new QuirkyCamera(
|
||||
-1, -1, "mmal service 16.1", CameraQuirk.PiCam), // PiCam (via V4L2, not zerocopy)
|
||||
new QuirkyCamera(-1, -1, "unicam", CameraQuirk.PiCam), // PiCam (via V4L2, not zerocopy)
|
||||
new QuirkyCamera(0x85B, 0x46D, CameraQuirk.AdjustableFocus) // Logitech C925-e
|
||||
new QuirkyCamera(0x85B, 0x46D, CameraQuirk.AdjustableFocus), // Logitech C925-e
|
||||
new QuirkyCamera(0x6366, 0x0c45, CameraQuirk.StickyFPS) // Arducam OV2311
|
||||
);
|
||||
|
||||
public static final QuirkyCamera DefaultCamera = new QuirkyCamera(0, 0, "");
|
||||
|
||||
@@ -102,7 +102,8 @@ public class USBCameraSource extends VisionSource {
|
||||
protected USBCameraSettables(CameraConfiguration configuration) {
|
||||
super(configuration);
|
||||
getAllVideoModes();
|
||||
setVideoMode(videoModes.get(0));
|
||||
if (!cameraQuirks.hasQuirk(CameraQuirk.StickyFPS))
|
||||
setVideoMode(videoModes.get(0)); // fixes double FPS set
|
||||
}
|
||||
|
||||
public void setAutoExposure(boolean cameraAutoExposure) {
|
||||
|
||||
Reference in New Issue
Block a user