Skip to content

Commit

Permalink
Add proper exposure range for OV2311 (#1282)
Browse files Browse the repository at this point in the history
  • Loading branch information
gautvm authored Mar 17, 2024
1 parent 5b878fe commit def37b9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,13 @@ public void setExposure(double exposure) {
if (getCameraConfiguration().cameraQuirks.hasQuirk(CameraQuirk.ArduOV9281)) {
propMin = 1;
propMax = 75;
} else if (getCameraConfiguration().cameraQuirks.hasQuirk(CameraQuirk.ArduOV2311)) {
propMin = 1;
propMax = 140;
}

var exposure_manual_val = MathUtils.map(Math.round(exposure), 0, 100, propMin, propMax);
logger.debug("Setting camera exposure to " + exposure_manual_val);
prop.set((int) exposure_manual_val);
} else {
scaledExposure = (int) Math.round(exposure);
Expand Down

0 comments on commit def37b9

Please sign in to comment.