[libcamera-devel] [PATCH 2/3] libcamera: camera_sensor: Set default sensor location to Unknown
Kieran Bingham
kieran.bingham at ideasonboard.com
Thu Feb 11 14:52:12 CET 2021
Hi Paul,
On 11/02/2021 08:55, Paul Elder wrote:
> Instead of choosing some arbitrary location for the sensor when its
> location is unknown, set it explicitly to unknown.
This probably confirms that we should always expect the property to be
initialised to something.
I guess if this were initialised to zero by default, then this would
become implicit, but being explicit is nice all the same.
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> ---
> src/libcamera/camera_sensor.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp
> index c9e8d49b..474055ba 100644
> --- a/src/libcamera/camera_sensor.cpp
> +++ b/src/libcamera/camera_sensor.cpp
> @@ -446,7 +446,7 @@ int CameraSensor::initProperties()
> break;
> }
> } else {
> - propertyValue = properties::CameraLocationExternal;
> + propertyValue = properties::CameraLocationUnknown;
> }
> properties_.set(properties::Location, propertyValue);
>
>
--
Regards
--
Kieran
More information about the libcamera-devel
mailing list