diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2022-09-03 12:48:03 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2022-09-05 17:34:49 +0100 |
commit | 29497a73dd67bbfc7062570738aa8d7e026fd633 (patch) | |
tree | bcd2eccd7fc645973f666c11f49a1f1127724e2a | |
parent | 1a082a3e957bc669ae7b143e04d8d1012dddac4c (diff) |
CameraSensor: Don't fail to add camera with faulty lens
If the CameraSensor fails to identify the VCM specified, it could still
be possible to continue to operate the sensor. Autofocus support will be
disabled, but this would be no different to operating a camera with a
fixed focus. While of course the fixed focus position may not be
suitable, it would provide a better user experience to be able to
continue to operate the camera, while still reporting that the lens is
disabled.
Bug: https://bugs.libcamera.org/show_bug.cgi?id=146
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
-rw-r--r-- | src/libcamera/camera_sensor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index d055c16a..911fd0be 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -467,8 +467,8 @@ int CameraSensor::discoverAncillaryDevices() ret = focusLens_->init(); if (ret) { LOG(CameraSensor, Error) - << "CameraLens initialisation failed"; - return ret; + << "Lens initialisation failed, lens disabled"; + focusLens_.reset(); } break; |