{"id":2856,"url":"https://patchwork.libcamera.org/api/1.1/patches/2856/?format=json","web_url":"https://patchwork.libcamera.org/patch/2856/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20200218112752.3910410-8-jacopo@jmondi.org>","date":"2020-02-18T11:27:52","name":"[libcamera-devel,v3,7/7] DNI: libcamera: sensor: ov5670: Add lens properties","commit_ref":null,"pull_url":null,"state":"superseded","archived":true,"hash":"d04f2e90ba839a65c59f12d29bc0d8f7105c1c87","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":{"id":15,"url":"https://patchwork.libcamera.org/api/1.1/users/15/?format=json","username":"jmondi","first_name":"Jacopo","last_name":"Mondi","email":"jacopo@jmondi.org"},"mbox":"https://patchwork.libcamera.org/patch/2856/mbox/","series":[{"id":685,"url":"https://patchwork.libcamera.org/api/1.1/series/685/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=685","date":"2020-02-18T11:27:45","name":"Camera sensor factory","version":3,"mbox":"https://patchwork.libcamera.org/series/685/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/2856/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/2856/checks/","tags":{},"headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D7AC161F6A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 18 Feb 2020 12:25:18 +0100 (CET)","from uno.lan (93-34-114-233.ip49.fastwebnet.it [93.34.114.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 564B76000A;\n\tTue, 18 Feb 2020 11:25:18 +0000 (UTC)"],"X-Originating-IP":"93.34.114.233","From":"Jacopo Mondi <jacopo@jmondi.org>","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","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 7/7] DNI: libcamera: sensor: ov5670:\n\tAdd lens properties","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 18 Feb 2020 11:25:19 -0000"},"content":"Register lens properties in the ov5670 sensor handler.\n\nThis patch is not intended for merge as we know lens properties do no\nbelong to the sensor handler, but I am including it anyhow to trigger\ndiscussions on where they would be more appropriately defined.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/sensor/ov5670.cpp | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)","diff":"diff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp\nindex c5fdffda7412..5304dac658f4 100644\n--- a/src/libcamera/sensor/ov5670.cpp\n+++ b/src/libcamera/sensor/ov5670.cpp\n@@ -70,6 +70,21 @@ int OV5670::initProperties()\n \tproperties_.set(properties::ISOSensitivityRange,\n \t\t\tSpan<int32_t>{ isoSensitivities });\n \n+\t/* Lens Properties. */\n+\tstd::array<float, 1> lensApertures = { 0.0f };\n+\tproperties_.set(properties::LensApertures,\n+\t\t\tSpan<float>{ lensApertures });\n+\n+\tstd::array<float, 1> lensFocalLengths = { 3.69f };\n+\tproperties_.set(properties::LensFocalLength,\n+\t\t\tSpan<float>{ lensFocalLengths });\n+\n+\tstd::array<float, 1> lensHyperfocalMinDistance = { 0.0f };\n+\tproperties_.set(properties::LensHyperfocalDistance,\n+\t\t\tSpan<float>{ lensHyperfocalMinDistance });\n+\n+\tproperties_.set(properties::LensMinimumFocusDistance, 3.69f);\n+\n \treturn CameraSensor::initProperties();\n }\n \n","prefixes":["libcamera-devel","v3","7/7"]}