aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/common/ad9361_ctrl.cpp
diff options
context:
space:
mode:
authorJulian Arnold <julian.arnold@ettus.com>2015-01-20 08:55:08 -0800
committerMartin Braun <martin.braun@ettus.com>2015-01-20 19:31:25 +0100
commit47562bbf143889197f942168173ae7eb99209f19 (patch)
tree84f1dcb58a7a880de4aa724a2a8199c4d6158936 /host/lib/usrp/common/ad9361_ctrl.cpp
parent28373cc1f7eddfb11748674316ffd4c52eeec3d9 (diff)
downloaduhd-47562bbf143889197f942168173ae7eb99209f19.tar.gz
uhd-47562bbf143889197f942168173ae7eb99209f19.tar.bz2
uhd-47562bbf143889197f942168173ae7eb99209f19.zip
ad9361: Added relative temperature sensor
This allows to read a relative temperature from an AD9361 device.
Diffstat (limited to 'host/lib/usrp/common/ad9361_ctrl.cpp')
-rw-r--r--host/lib/usrp/common/ad9361_ctrl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/host/lib/usrp/common/ad9361_ctrl.cpp b/host/lib/usrp/common/ad9361_ctrl.cpp
index 85510530d..3db6739e7 100644
--- a/host/lib/usrp/common/ad9361_ctrl.cpp
+++ b/host/lib/usrp/common/ad9361_ctrl.cpp
@@ -172,6 +172,12 @@ public:
return sensor_value_t("RSSI", _device.get_rssi(chain), "dB");
}
+ //! read the internal temp sensor. Average over 3 results
+ sensor_value_t get_temperature()
+ {
+ return sensor_value_t("temp", _device.get_average_temperature(), "C");
+ }
+
private:
static ad9361_device_t::direction_t _get_direction_from_antenna(const std::string& antenna)
{