Skip to content

Commit

Permalink
add see3cam quirk and exposure range
Browse files Browse the repository at this point in the history
  • Loading branch information
Bankst committed Mar 25, 2024
1 parent 0106880 commit d29b87d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ public enum CameraQuirk {
ArduOV9281,
/** Dummy quirk to tell OV2311 from OV9281 */
ArduOV2311,
/** Camera has odd exposure range, and supports gain control */
See3Cam_24CUG
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
public class QuirkyCamera {
private static final List<QuirkyCamera> quirkyCameras =
List.of(
new QuirkyCamera(
0x2560, 0xc128,
"See3Cam_24CUG",
CameraQuirk.Gain, CameraQuirk.See3Cam_24CUG
),
new QuirkyCamera(
0x9331,
0x5A3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ public void setExposure(double exposure) {
} else if (getCameraConfiguration().cameraQuirks.hasQuirk(CameraQuirk.ArduOV2311)) {
propMin = 1;
propMax = 140;
} else if (getCameraConfiguration().cameraQuirks.hasQuirk(CameraQuirk.See3Cam_24CUG)) {
propMin = 0;
propMax = 600;
}

var exposure_manual_val = MathUtils.map(Math.round(exposure), 0, 100, propMin, propMax);
Expand Down

0 comments on commit d29b87d

Please sign in to comment.