Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

See3Cam_24CUG Quirks #1302

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@ public enum CameraQuirk {
* Camera is innomaker USB OV9281 which also has incorrect v4l exposure times Real range is more
* like 0-500
*/
ArduOV9782,
gerth2 marked this conversation as resolved.
Show resolved Hide resolved
/** Camera has odd exposure range, and supports gain control */
See3Cam_24CUG,
InnoOV9281Controls,
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
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
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ protected GenericUSBCameraSettables createSettables(
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);
Expand Down
Loading