aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/common/ad9361_ctrl.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2015-01-13 09:45:55 +0100
committerMartin Braun <martin.braun@ettus.com>2015-01-13 09:45:55 +0100
commitbe5f9613311d944b8971570bff444c5af094f0f5 (patch)
tree6e97e48801fe10a61244c2f4e36ef7f28a6e3c57 /host/lib/usrp/common/ad9361_ctrl.cpp
parentd15fe9bc22efe4d0499a9108659e32c93e0a2848 (diff)
parent23729861a2020359b9c920347bd2d7c43d96ebf8 (diff)
downloaduhd-be5f9613311d944b8971570bff444c5af094f0f5.tar.gz
uhd-be5f9613311d944b8971570bff444c5af094f0f5.tar.bz2
uhd-be5f9613311d944b8971570bff444c5af094f0f5.zip
Merge branch 'maint'
Diffstat (limited to 'host/lib/usrp/common/ad9361_ctrl.cpp')
-rw-r--r--host/lib/usrp/common/ad9361_ctrl.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/host/lib/usrp/common/ad9361_ctrl.cpp b/host/lib/usrp/common/ad9361_ctrl.cpp
index c84fcee39..f94536ed9 100644
--- a/host/lib/usrp/common/ad9361_ctrl.cpp
+++ b/host/lib/usrp/common/ad9361_ctrl.cpp
@@ -148,7 +148,7 @@ public:
return _device.tune(direction, value);
}
- //! turn on/off Catalina's data port loopback
+ //! turn on/off data port loopback
void data_port_loopback(const bool on)
{
boost::lock_guard<boost::mutex> lock(_mutex);
@@ -156,6 +156,15 @@ public:
_device.data_port_loopback(on);
}
+ //! read internal RSSI sensor
+ sensor_value_t get_rssi(const std::string &which)
+ {
+ boost::lock_guard<boost::mutex> lock(_mutex);
+
+ ad9361_device_t::chain_t chain =_get_chain_from_antenna(which);
+ return sensor_value_t("RSSI", _device.get_rssi(chain), "dB");
+ }
+
private:
static ad9361_device_t::direction_t _get_direction_from_antenna(const std::string& antenna)
{