From df8cafaf8788eb27c25576ce94ca605f8a50527d Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Mon, 12 Jul 2021 11:02:03 +0100 Subject: ipa: raspberrypi: Add a constructor struct DeviceStatus The constructor sets all fields to 0. This replaces the memset(0) and default value initialisation usage in the agc and lux controllers respectively. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/ipa/raspberrypi/controller/device_status.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ipa/raspberrypi/controller/device_status.h') diff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/raspberrypi/controller/device_status.h index 733378db..73df7ce2 100644 --- a/src/ipa/raspberrypi/controller/device_status.h +++ b/src/ipa/raspberrypi/controller/device_status.h @@ -14,6 +14,12 @@ */ struct DeviceStatus { + DeviceStatus() + : shutter_speed(std::chrono::seconds(0)), analogue_gain(0.0), + lens_position(0.0), aperture(0.0), flash_intensity(0.0) + { + } + /* time shutter is open */ libcamera::utils::Duration shutter_speed; double analogue_gain; -- cgit v1.2.1