From patchwork Tue Feb 18 11:27:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 2856 X-Patchwork-Delegate: jacopo@jmondi.org Return-Path: Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D7AC161F6A for ; Tue, 18 Feb 2020 12:25:18 +0100 (CET) X-Originating-IP: 93.34.114.233 Received: from uno.lan (93-34-114-233.ip49.fastwebnet.it [93.34.114.233]) (Authenticated sender: jacopo@jmondi.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 564B76000A; Tue, 18 Feb 2020 11:25:18 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Tue, 18 Feb 2020 12:27:52 +0100 Message-Id: <20200218112752.3910410-8-jacopo@jmondi.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200218112752.3910410-1-jacopo@jmondi.org> References: <20200218112752.3910410-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 7/7] DNI: libcamera: sensor: ov5670: Add lens properties X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Feb 2020 11:25:19 -0000 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 --- src/libcamera/sensor/ov5670.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp index c5fdffda7412..5304dac658f4 100644 --- a/src/libcamera/sensor/ov5670.cpp +++ b/src/libcamera/sensor/ov5670.cpp @@ -70,6 +70,21 @@ int OV5670::initProperties() properties_.set(properties::ISOSensitivityRange, Span{ isoSensitivities }); + /* Lens Properties. */ + std::array lensApertures = { 0.0f }; + properties_.set(properties::LensApertures, + Span{ lensApertures }); + + std::array lensFocalLengths = { 3.69f }; + properties_.set(properties::LensFocalLength, + Span{ lensFocalLengths }); + + std::array lensHyperfocalMinDistance = { 0.0f }; + properties_.set(properties::LensHyperfocalDistance, + Span{ lensHyperfocalMinDistance }); + + properties_.set(properties::LensMinimumFocusDistance, 3.69f); + return CameraSensor::initProperties(); }