From 47562bbf143889197f942168173ae7eb99209f19 Mon Sep 17 00:00:00 2001 From: Julian Arnold Date: Tue, 20 Jan 2015 08:55:08 -0800 Subject: ad9361: Added relative temperature sensor This allows to read a relative temperature from an AD9361 device. --- host/lib/usrp/common/ad9361_ctrl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'host/lib/usrp/common/ad9361_ctrl.cpp') 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) { -- cgit v1.2.3