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:
committed by
Laurent Pinchart
parent
ace5e21feb
commit
df8cafaf87
@@ -49,7 +49,7 @@ void Geq::Prepare(Metadata *image_metadata)
|
||||
lux_status.lux = 400;
|
||||
if (image_metadata->Get("lux.status", lux_status))
|
||||
LOG(RPiGeq, Warning) << "no lux data found";
|
||||
DeviceStatus device_status = {};
|
||||
DeviceStatus device_status;
|
||||
device_status.analogue_gain = 1.0; // in case not found
|
||||
if (image_metadata->Get("device.status", device_status))
|
||||
LOG(RPiGeq, Warning)
|
||||
|
||||
Reference in New Issue
Block a user