ipa: raspberrypi: Switch the AGC/Lux code to use utils::Duration

Convert the core AGC and Lux controller code to use
utils::Duration for all exposure time related variables and
calculations.

Convert the exposure/shutter time fields in AgcStatus and DeviceStatus
to use utils::Duration.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Naushir Patuck 2021-06-08 12:03:35 +01:00 committed by Laurent Pinchart
parent 2db8a767ca
commit 6914fc487f
8 changed files with 93 additions and 73 deletions

View file

@ -8,6 +8,8 @@
#include <mutex>
#include "libcamera/internal/utils.h"
#include "../lux_status.h"
#include "../algorithm.hpp"
@ -28,7 +30,7 @@ public:
private:
// These values define the conditions of the reference image, against
// which we compare the new image.
double reference_shutter_speed_; // in micro-seconds
libcamera::utils::Duration reference_shutter_speed_;
double reference_gain_;
double reference_aperture_; // units of 1/f
double reference_Y_; // out of 65536