mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-27 02:01:40 +00:00
See3Cam_24CUG Quirks (#1302)
Co-authored-by: Matt <matthew.morley.ca@gmail.com> Co-authored-by: Chris Gerth <chrisgerth010592@gmail.com>
This commit is contained in:
@@ -45,8 +45,11 @@ public enum CameraQuirk {
|
||||
ArduOV2311Controls,
|
||||
ArduOV9782Controls,
|
||||
/**
|
||||
* Camera is innomaker USB OV9281 which also has incorrect v4l exposure times Real range is more
|
||||
* like 0-500
|
||||
* Camera is one brand of USB OV9281 which also has incorrect v4l exposure times Real range is
|
||||
* more like 0-500
|
||||
*/
|
||||
InnoOV9281Controls,
|
||||
ArduOV9782,
|
||||
/** Camera has odd exposure range, and supports gain control */
|
||||
See3Cam_24CUG,
|
||||
}
|
||||
|
||||
@@ -28,6 +28,9 @@ import java.util.Objects;
|
||||
public class QuirkyCamera {
|
||||
private static final List<QuirkyCamera> quirkyCameras =
|
||||
List.of(
|
||||
// SeeCam, which has an odd exposure range
|
||||
new QuirkyCamera(
|
||||
0x2560, 0xc128, "See3Cam_24CUG", CameraQuirk.Gain, CameraQuirk.See3Cam_24CUG),
|
||||
// Chris's older generic "Logitec HD Webcam"
|
||||
new QuirkyCamera(0x9331, 0x5A3, CameraQuirk.CompletelyBroken),
|
||||
// Logitec C270
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) Photon Vision.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.photonvision.vision.camera.USBCameras;
|
||||
|
||||
import edu.wpi.first.cscore.UsbCamera;
|
||||
import org.photonvision.common.configuration.CameraConfiguration;
|
||||
|
||||
/*
|
||||
* This class holds the camera quirks for the See3Cam 24UGS.
|
||||
*/
|
||||
public class See3Cam24CUGSettables extends GenericUSBCameraSettables {
|
||||
public See3Cam24CUGSettables(CameraConfiguration configuration, UsbCamera camera) {
|
||||
super(configuration, camera);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUpExposureProperties() {
|
||||
super.setUpExposureProperties();
|
||||
|
||||
// Property limits are incorrect
|
||||
this.minExposure = 0;
|
||||
this.maxExposure = 600;
|
||||
}
|
||||
}
|
||||
@@ -139,6 +139,8 @@ public class USBCameraSource extends VisionSource {
|
||||
settables = new ArduOV9782CameraSettables(config, camera);
|
||||
} else if (quirks.hasQuirk(CameraQuirk.InnoOV9281Controls)) {
|
||||
settables = new InnoOV9281CameraSettables(config, camera);
|
||||
} else if (quirks.hasQuirk(CameraQuirk.See3Cam_24CUG)) {
|
||||
settables = new See3Cam24CUGSettables(config, camera);
|
||||
} else {
|
||||
logger.debug("Using Generic USB Cam Settables");
|
||||
settables = new GenericUSBCameraSettables(config, camera);
|
||||
|
||||
Reference in New Issue
Block a user