diff options
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi/dpc.cpp')
-rw-r--r-- | src/ipa/raspberrypi/controller/rpi/dpc.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/dpc.cpp b/src/ipa/raspberrypi/controller/rpi/dpc.cpp index def39bb7..be3871df 100644 --- a/src/ipa/raspberrypi/controller/rpi/dpc.cpp +++ b/src/ipa/raspberrypi/controller/rpi/dpc.cpp @@ -31,13 +31,14 @@ char const *Dpc::name() const return NAME; } -int Dpc::read(boost::property_tree::ptree const ¶ms) +int Dpc::read(const libcamera::YamlObject ¶ms) { - config_.strength = params.get<int>("strength", 1); + config_.strength = params["strength"].get<int>(1); if (config_.strength < 0 || config_.strength > 2) { - LOG(RPiDpc, Error) << "bad strength value"; + LOG(RPiDpc, Error) << "Bad strength value"; return -EINVAL; } + return 0; } |