mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 00:55:07 +03:00
libcamera: camera_sensor: Do not register Location if not available
Do not register the Location property if not available from the firmware interface instead of defaulting it to External. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
aab49f903e
commit
285d365186
1 changed files with 2 additions and 4 deletions
|
@ -468,12 +468,10 @@ int CameraSensor::initProperties()
|
||||||
propertyValue = properties::CameraLocationBack;
|
propertyValue = properties::CameraLocationBack;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
properties_.set(properties::Location, propertyValue);
|
||||||
} else {
|
} else {
|
||||||
LOG(CameraSensor, Warning)
|
LOG(CameraSensor, Warning) << "Failed to retrieve the camera location";
|
||||||
<< "Failed to retrieve the camera location, setting to External";
|
|
||||||
propertyValue = properties::CameraLocationExternal;
|
|
||||||
}
|
}
|
||||||
properties_.set(properties::Location, propertyValue);
|
|
||||||
|
|
||||||
const auto &rotationControl = controls.find(V4L2_CID_CAMERA_SENSOR_ROTATION);
|
const auto &rotationControl = controls.find(V4L2_CID_CAMERA_SENSOR_ROTATION);
|
||||||
if (rotationControl != controls.end()) {
|
if (rotationControl != controls.end()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue