From 2a321be376dbc3c534d3634fdcaf141aff79cd48 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Wed, 29 Jun 2022 09:57:20 +0100 Subject: ipa: raspberrypi: Add sensor temperature to DeviceStatus Add an optional sensor_temperature field to the DeviceStatus structure. If a temperature measurement is available for a frame, the value is returned out through the SensorTemperature control in the Request metadata. Additionally, provide the sensor temperature value from the std::ostream &operator<< overload. Signed-off-by: Naushir Patuck Reviewed-by: Kieran Bingham Reviewed-by: David Plowman Signed-off-by: Kieran Bingham --- src/ipa/raspberrypi/raspberrypi.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ipa/raspberrypi/raspberrypi.cpp') diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 3b126bb5..cb0025a1 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -491,6 +491,8 @@ void IPARPi::reportMetadata() libcameraMetadata_.set(controls::AnalogueGain, deviceStatus->analogue_gain); libcameraMetadata_.set(controls::FrameDuration, helper_->Exposure(deviceStatus->frame_length).get()); + if (deviceStatus->sensor_temperature) + libcameraMetadata_.set(controls::SensorTemperature, *deviceStatus->sensor_temperature); } AgcStatus *agcStatus = rpiMetadata_.GetLocked("agc.status"); -- cgit v1.2.1