summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/device_status.cpp
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2022-06-29 09:57:20 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2022-06-29 12:12:07 +0100
commit2a321be376dbc3c534d3634fdcaf141aff79cd48 (patch)
tree00f388e73ef9909300fd1248620744f70f9ab2c9 /src/ipa/raspberrypi/controller/device_status.cpp
parent71fb6549183d1bd91289eb1e40fcbf69c74ce91d (diff)
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 <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller/device_status.cpp')
-rw-r--r--src/ipa/raspberrypi/controller/device_status.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ipa/raspberrypi/controller/device_status.cpp b/src/ipa/raspberrypi/controller/device_status.cpp
index f052ea8b..05897fc1 100644
--- a/src/ipa/raspberrypi/controller/device_status.cpp
+++ b/src/ipa/raspberrypi/controller/device_status.cpp
@@ -17,5 +17,8 @@ std::ostream &operator<<(std::ostream &out, const DeviceStatus &d)
<< " Lens: " << d.lens_position
<< " Flash: " << d.flash_intensity;
+ if (d.sensor_temperature)
+ out << " Temperature: " << *d.sensor_temperature;
+
return out;
}