[libcamera-devel,v2,1/4] libcamera: properties: Add Unknown value to camera Location
diff mbox series

Message ID 20210212054816.53561-2-paul.elder@ideasonboard.com
State Changes Requested
Headers show
Series
  • Add Unknown camera location
Related show

Commit Message

Paul Elder Feb. 12, 2021, 5:48 a.m. UTC
If a camera's location is unknown, it should be set so, and not
defaulted to another location. Add such a value to the Location property
enum.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

---
Changes in v2:
- Unknown is now 0, the rest are incremented by 1
---
 src/libcamera/property_ids.yaml | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Comments

Jacopo Mondi Feb. 12, 2021, 9:38 a.m. UTC | #1
Hi Paul,

On Fri, Feb 12, 2021 at 02:48:13PM +0900, Paul Elder wrote:
> If a camera's location is unknown, it should be set so, and not
> defaulted to another location. Add such a value to the Location property
> enum.
>
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>

Looks good thanks
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
  j

> ---
> Changes in v2:
> - Unknown is now 0, the rest are incremented by 1
> ---
>  src/libcamera/property_ids.yaml | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml
> index 104e9aaf..fd17bf0c 100644
> --- a/src/libcamera/property_ids.yaml
> +++ b/src/libcamera/property_ids.yaml
> @@ -10,18 +10,22 @@ controls:
>        description: |
>          Camera mounting location
>        enum:
> -        - name: CameraLocationFront
> +        - name: CameraLocationUnknown
>            value: 0
> +          description: |
> +            The camera location is unknown
> +        - name: CameraLocationFront
> +          value: 1
>            description: |
>              The camera is mounted on the front side of the device, facing the
>              user
>          - name: CameraLocationBack
> -          value: 1
> +          value: 2
>            description: |
>              The camera is mounted on the back side of the device, facing away
>              from the user
>          - name: CameraLocationExternal
> -          value: 2
> +          value: 3
>            description: |
>              The camera is attached to the device in a way that allows it to
>              be moved freely
> --
> 2.27.0
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch
diff mbox series

diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml
index 104e9aaf..fd17bf0c 100644
--- a/src/libcamera/property_ids.yaml
+++ b/src/libcamera/property_ids.yaml
@@ -10,18 +10,22 @@  controls:
       description: |
         Camera mounting location
       enum:
-        - name: CameraLocationFront
+        - name: CameraLocationUnknown
           value: 0
+          description: |
+            The camera location is unknown
+        - name: CameraLocationFront
+          value: 1
           description: |
             The camera is mounted on the front side of the device, facing the
             user
         - name: CameraLocationBack
-          value: 1
+          value: 2
           description: |
             The camera is mounted on the back side of the device, facing away
             from the user
         - name: CameraLocationExternal
-          value: 2
+          value: 3
           description: |
             The camera is attached to the device in a way that allows it to
             be moved freely