mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 17:15:07 +03:00
libcamera: camera_sensor: Do not default 'rotation'
The 'rotation' property is not critical. Only register it if the sensor driver reports it. Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
87ceac9c8c
commit
c35123e6f9
1 changed files with 3 additions and 5 deletions
|
@ -370,13 +370,11 @@ int CameraSensor::initProperties()
|
|||
}
|
||||
properties_.set(properties::Location, propertyValue);
|
||||
|
||||
/* Camera Rotation: default is 0 degrees. */
|
||||
const auto &rotationControl = controls.find(V4L2_CID_CAMERA_SENSOR_ROTATION);
|
||||
if (rotationControl != controls.end())
|
||||
if (rotationControl != controls.end()) {
|
||||
propertyValue = rotationControl->second.def().get<int32_t>();
|
||||
else
|
||||
propertyValue = 0;
|
||||
properties_.set(properties::Rotation, propertyValue);
|
||||
properties_.set(properties::Rotation, propertyValue);
|
||||
}
|
||||
|
||||
properties_.set(properties::PixelArraySize, pixelArraySize_);
|
||||
properties_.set(properties::PixelArrayActiveAreas, { activeArea_ });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue