ipa: raspberrypi: Add an operator<< to struct DeviceStatus

Add an operator<< overload to log all fields in DeviceStatus, and remove the
manual logging statements in the IPA and CamHelper.

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: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Naushir Patuck 2021-07-12 11:02:04 +01:00 committed by Laurent Pinchart
parent df8cafaf87
commit f24d83720f
5 changed files with 27 additions and 8 deletions

View file

@ -1019,10 +1019,7 @@ void IPARPi::fillDeviceStatus(const ControlList &sensorControls)
deviceStatus.shutter_speed = helper_->Exposure(exposureLines);
deviceStatus.analogue_gain = helper_->Gain(gainCode);
LOG(IPARPI, Debug) << "Metadata - Exposure : "
<< deviceStatus.shutter_speed
<< " Gain : "
<< deviceStatus.analogue_gain;
LOG(IPARPI, Debug) << "Metadata - " << deviceStatus;
rpiMetadata_.Set("device.status", deviceStatus);
}