summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/raspberrypi/controller')
-rw-r--r--src/ipa/raspberrypi/controller/device_status.cpp3
-rw-r--r--src/ipa/raspberrypi/controller/device_status.h3
2 files changed, 6 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;
}
diff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/raspberrypi/controller/device_status.h
index c4a5d9c8..eca3bf4b 100644
--- a/src/ipa/raspberrypi/controller/device_status.h
+++ b/src/ipa/raspberrypi/controller/device_status.h
@@ -7,6 +7,7 @@
#pragma once
#include <iostream>
+#include <optional>
#include <libcamera/base/utils.h>
@@ -36,4 +37,6 @@ struct DeviceStatus {
double aperture;
/* proportional to brightness with 0 = no flash, 1 = maximum flash */
double flash_intensity;
+ /* Sensor reported temperature value (in degrees) */
+ std::optional<double> sensor_temperature;
};