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>
This commit is contained in:
parent
caa753179c
commit
2db8a767ca
4 changed files with 17 additions and 15 deletions
|
@ -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_);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue