mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-21 15:53:54 +03:00
ipa: rpi: controller: Replace Pwl::readYaml() with YamlObject::get()
Now that deserializing a Pwl object from YAML data is possible using the YamlObject::get() function, replace all usage of Pwl::readYaml() to prepare for its removal. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # On Raspberry Pi 4
This commit is contained in:
parent
13a8fbeb5c
commit
b781955c6a
8 changed files with 20 additions and 16 deletions
|
@ -130,7 +130,8 @@ int AgcConstraint::read(const libcamera::YamlObject ¶ms)
|
|||
return -EINVAL;
|
||||
qHi = *value;
|
||||
|
||||
return yTarget.readYaml(params["y_target"]);
|
||||
yTarget = params["y_target"].get<ipa::Pwl>(ipa::Pwl{});
|
||||
return yTarget.empty() ? -EINVAL : 0;
|
||||
}
|
||||
|
||||
static std::tuple<int, AgcConstraintMode>
|
||||
|
@ -237,9 +238,9 @@ int AgcConfig::read(const libcamera::YamlObject ¶ms)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = yTarget.readYaml(params["y_target"]);
|
||||
if (ret)
|
||||
return ret;
|
||||
yTarget = params["y_target"].get<ipa::Pwl>(ipa::Pwl{});
|
||||
if (yTarget.empty())
|
||||
return -EINVAL;
|
||||
|
||||
speed = params["speed"].get<double>(0.2);
|
||||
startupFrames = params["startup_frames"].get<uint16_t>(10);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue