mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-16 17:05:08 +03:00
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 <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.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
ace5e21feb
commit
df8cafaf87
4 changed files with 8 additions and 10 deletions
|
@ -60,14 +60,7 @@ void Lux::Prepare(Metadata *image_metadata)
|
|||
|
||||
void Lux::Process(StatisticsPtr &stats, Metadata *image_metadata)
|
||||
{
|
||||
// set some initial values to shut the compiler up
|
||||
DeviceStatus device_status = {
|
||||
.shutter_speed = 1.0ms,
|
||||
.analogue_gain = 1.0,
|
||||
.lens_position = 0.0,
|
||||
.aperture = 0.0,
|
||||
.flash_intensity = 0.0
|
||||
};
|
||||
DeviceStatus device_status;
|
||||
if (image_metadata->Get("device.status", device_status) == 0) {
|
||||
double current_gain = device_status.analogue_gain;
|
||||
double current_aperture = device_status.aperture;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue