Show a patch.

GET /api/1.1/patches/17810/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 17810,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/17810/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17810/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20221117154500.8829-2-david.plowman@raspberrypi.com>",
    "date": "2022-11-17T15:45:00",
    "name": "[libcamera-devel,1/1] libcamera: controls: Change LensPosition units to dioptres",
    "commit_ref": "1bd74b91be2da535918d509ff32c1cb2b76dcec3",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d2fa99765a0d3fbdd03876b65a5a301dcee0f7db",
    "submitter": {
        "id": 42,
        "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api",
        "name": "David Plowman",
        "email": "david.plowman@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17810/mbox/",
    "series": [
        {
            "id": 3615,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3615/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3615",
            "date": "2022-11-17T15:44:59",
            "name": "Change LensPosition units to dioptres",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3615/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17810/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17810/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E3269BE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 17 Nov 2022 15:45:08 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A5E436308F;\n\tThu, 17 Nov 2022 16:45:08 +0100 (CET)",
            "from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com\n\t[IPv6:2a00:1450:4864:20::32f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A899161F32\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 17 Nov 2022 16:45:05 +0100 (CET)",
            "by mail-wm1-x32f.google.com with SMTP id t1so1662890wmi.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 17 Nov 2022 07:45:05 -0800 (PST)",
            "from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:e4a2:3070:eea4:e434])\n\tby smtp.gmail.com with ESMTPSA id\n\te21-20020a05600c219500b003cf894dbc4fsm1606687wme.25.2022.11.17.07.45.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 17 Nov 2022 07:45:04 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1668699908;\n\tbh=ftLM8naKjL8YKhpx8qNdue12tjb1tvtXu1X8rukWDk8=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=R93wJIlr44Q8yy54rHIPoOYYHKZztd0FmxX+yF5v7yxuQsymcwku+UICMHmCLQS2M\n\tzTTGa+cvghKPfX+V8rRrJkA43775jFpHJ1gzJtnyIesnbi/iEjwh7ttWXhPziTLa9E\n\tIadFQoACZkoumM3Xd1Pv3UsAOZaFKPFkdtBJT8G7Nb9MCFGBWgOjXFy0dPbf12aJp9\n\t8NP060H+tMJWcjI5Iv+4NJtPvMOdSXptwhyrPrk3r7SJFJFk+VPCd89FbKhYl3oDQV\n\tKjYEMiUp5beKWkXq+JoX9T/R7KB9kAqEj/BMJmqxJLMa7VFLqwPrIybayFlW67J/Jf\n\t3NYPjsYKgaDug==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=wKEskL/cmPbXtE9KRAG3Cape98ttE87f4LFRyTbSncE=;\n\tb=QGvpj3jvhYFssUf9wYuhELu8jSizg5UZWi6J/pU/itsv63RMAzEU9O3rwWi2aM/U6V\n\tIT+af9/bT91shR0E11ZMRgqED+vJ0OnRVhYXobhUUEIdHQL5PW/W/rrdBclnzQf84V4W\n\tSDCyDDTMSzYsV7CEVl9r8cNHOrtYaNdoROCqZYHXsHXlEipld1dln1AY/5k0Iwqa3Mao\n\tsKaODBoGzWb+NU713nFgs3XevfKilBNKWC7Gv0JXmDRYT8qEhgSq3RsTrl/ba0jKR8m4\n\tvA22tQDjbH+gNXbOVw5NdAo4p2XVU4H77bMQvYsjRBSbj1Geb0LmhwJW4ocmSHuGF9yk\n\tgnhg=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"QGvpj3jv\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=wKEskL/cmPbXtE9KRAG3Cape98ttE87f4LFRyTbSncE=;\n\tb=RlSd3dYfaQvd5aVYx/VgsPnfUljYh95Br3NqGN3ti+Lxe0oXWIKf7nV5TnOxg9Xre1\n\tVm+sWJchsDU2709HDSpMx69dw432qke2z3Yru1HBC4ZWUQokAYwot5BpIrUaefVBzUkb\n\tH0JBR63Nbtg0TfMQBuco5YONkwG5OE6on5MR403meV0J8fy3h8Ito2KWU/6LkLRdIVzV\n\tS2x5kAr3nDZFpUF49AVAQVCyTftQiyettqh7hPPEPnC+eoJD1Pd6LKPW2129rxdHxTNG\n\tQWYlWZmPRl2fFj0PKN4DYGZ77y56Z/2Ci7utWqG4ovAMMJqPqhCSzz/BaSm47MpoFLGA\n\tDKOw==",
        "X-Gm-Message-State": "ANoB5pmMfQZp4ghZQzaUDu69daOrjvglw4TyrgkzHHTTn9t/tYWuGDO+\n\teRvMMlLEeB6bZWGfTcBNxw1XLuJKIntQ1A==",
        "X-Google-Smtp-Source": "AA0mqf6yp2Q3PU2LqUnpYmVNCeANA8bPHpUU735In9/Jp+WW0OSMlHaIX2Qs2rl2NwTucwuurIhhNw==",
        "X-Received": "by 2002:a05:600c:4b18:b0:3c5:9cf6:32a4 with SMTP id\n\ti24-20020a05600c4b1800b003c59cf632a4mr2220050wmp.88.1668699905041; \n\tThu, 17 Nov 2022 07:45:05 -0800 (PST)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 17 Nov 2022 15:45:00 +0000",
        "Message-Id": "<20221117154500.8829-2-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20221117154500.8829-1-david.plowman@raspberrypi.com>",
        "References": "<20221117154500.8829-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 1/1] libcamera: controls: Change\n\tLensPosition units to dioptres",
        "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>",
        "From": "David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "David Plowman <david.plowman@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The units for the LensPosition control, previously defined as being in\nunits of 1 / hyperfocal_distance, are changed to 1 / distance (in\nmetres).\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/libcamera/control_ids.yaml | 26 ++++++++++++++------------\n 1 file changed, 14 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\nindex a456e6c0..adea5f90 100644\n--- a/src/libcamera/control_ids.yaml\n+++ b/src/libcamera/control_ids.yaml\n@@ -591,25 +591,27 @@ controls:\n         AfModeManual, though the value is reported back unconditionally in all\n         modes.\n \n-        The units are a reciprocal distance scale like dioptres but normalised\n-        for the hyperfocal distance. That is, for a lens with hyperfocal\n-        distance H, and setting it to a focal distance D, the lens position LP,\n-        which is generally a non-integer, is given by\n+        This value, which is generally a non-integer, is the reciprocal of the\n+        focal distance in metres, also known as dioptres. That is, to set a\n+        focal distance D, the lens position LP is given by\n \n-        \\f$LP = \\frac{H}{D}\\f$\n+        \\f$LP = \\frac{1\\mathrm{m}}{D}\\f$\n \n         For example:\n \n         0 moves the lens to infinity.\n-        0.5 moves the lens to twice the hyperfocal distance.\n-        1 moves the lens to the hyperfocal position.\n-        And larger values will focus the lens ever closer.\n+        0.5 moves the lens to focus on objects 2m away.\n+        2 moves the lens to focus on objects 50cm away.\n+        And larger values will focus the lens closer.\n \n-        \\todo Define a property to report the Hyperforcal distance of calibrated\n-        lenses.\n+        The default value of the control should indicate a good general position\n+        for the lens, often corresponding to the hyperfocal distance (the\n+        closest position for which objects at infinity are still acceptably\n+        sharp). The minimum will often be zero (meaning infinity), and the\n+        maximum value defines the closest focus position.\n \n-        \\todo Define a property to report the maximum and minimum positions of\n-        this lens. The minimum value will often be zero (meaning infinity).\n+        \\todo Define a property to report the Hyperfocal distance of calibrated\n+        lenses.\n \n   - AfState:\n       type: int32_t\n",
    "prefixes": [
        "libcamera-devel",
        "1/1"
    ]
}