summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/rpi/agc.cpp
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2021-06-08 12:03:34 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-06-08 23:56:18 +0300
commit2db8a767ca2c1a06658716e762b2fa8b4c005983 (patch)
tree2cf1c8d4278c2a738ff72747a26e89a43c8e4fcb /src/ipa/raspberrypi/controller/rpi/agc.cpp
parentcaa753179c039a0ecbfef595c3179aac4bf044d5 (diff)
ipa: raspberrypi: Switch AgcAlgorithm API to use utils::Duration
Switch the AgcAlgorithm API functions to use utils::Duration for all time based variables. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi/agc.cpp')
-rw-r--r--src/ipa/raspberrypi/controller/rpi/agc.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp
index f4cd5d26..fd3359a7 100644
--- a/src/ipa/raspberrypi/controller/rpi/agc.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp
@@ -21,6 +21,7 @@
using namespace RPiController;
using namespace libcamera;
+using libcamera::utils::Duration;
LOG_DEFINE_CATEGORY(RPiAgc)
@@ -222,19 +223,19 @@ void Agc::SetEv(double ev)
ev_ = ev;
}
-void Agc::SetFlickerPeriod(double flicker_period)
+void Agc::SetFlickerPeriod(Duration flicker_period)
{
- flicker_period_ = flicker_period;
+ flicker_period_ = flicker_period.get<std::micro>();
}
-void Agc::SetMaxShutter(double max_shutter)
+void Agc::SetMaxShutter(Duration max_shutter)
{
- max_shutter_ = max_shutter;
+ max_shutter_ = max_shutter.get<std::micro>();
}
-void Agc::SetFixedShutter(double fixed_shutter)
+void Agc::SetFixedShutter(Duration fixed_shutter)
{
- fixed_shutter_ = fixed_shutter;
+ fixed_shutter_ = fixed_shutter.get<std::micro>();
// Set this in case someone calls Pause() straight after.
status_.shutter_time = clipShutter(fixed_shutter_);
}