[libcamera-devel] [PATCH v3 6/6] DNI: libcamera: sensor: ov5670: Add lens properties

Jacopo Mondi jacopo at jmondi.org
Mon Mar 9 19:04:44 CET 2020


Register lens properties in the ov5670 sensor handler.

This patch is not intended for merge as we know lens properties do no
belong to the sensor handler, but I am including it anyhow to trigger
discussions on where they would be more appropriately defined.

Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>

---
v2 -> v3:
- Update to use new properties names
---
 src/libcamera/sensor/ov5670.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp
index a027a0816e58..75ad1f3ce81f 100644
--- a/src/libcamera/sensor/ov5670.cpp
+++ b/src/libcamera/sensor/ov5670.cpp
@@ -52,6 +52,12 @@ int OV5670::initProperties()
 			properties::BayerFilterGRBG);
 	properties_.set(properties::ISOSensitivityRange, { 50, 800 });
 
+	/* Lens Properties. */
+	properties_.set(properties::LensApertures, { 0.0f });
+	properties_.set(properties::LensFocalLengths, { 3.69f });
+	properties_.set(properties::LensHyperfocalDistances, { 0.0f });
+	properties_.set(properties::LensMinimumFocusDistance, 3.69f);
+
 	return CameraSensor::initProperties();
 }
 
-- 
2.25.0



More information about the libcamera-devel mailing list