diff options
author | Josh Blum <josh@joshknows.com> | 2011-02-22 10:59:21 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-02-22 10:59:21 -0800 |
commit | 557d62ee648cef2a8edfd15602544064550f82fc (patch) | |
tree | 0614b00317b55a5a2b09315924cc43865ad6dc73 /host/lib/usrp/dboard/db_rfx.cpp | |
parent | de35e125bc6e09fbe4da60f8f18390c137c77c43 (diff) | |
parent | 4613f454c781d258d6d9b210ff1b9043a2125981 (diff) | |
download | uhd-557d62ee648cef2a8edfd15602544064550f82fc.tar.gz uhd-557d62ee648cef2a8edfd15602544064550f82fc.tar.bz2 uhd-557d62ee648cef2a8edfd15602544064550f82fc.zip |
Merge branch 'sensors' into dboard_serial
Diffstat (limited to 'host/lib/usrp/dboard/db_rfx.cpp')
-rw-r--r-- | host/lib/usrp/dboard/db_rfx.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp index 2c672ded8..3e3cf00f2 100644 --- a/host/lib/usrp/dboard/db_rfx.cpp +++ b/host/lib/usrp/dboard/db_rfx.cpp @@ -36,6 +36,7 @@ #include <uhd/types/dict.hpp> #include <uhd/usrp/subdev_props.hpp> #include <uhd/types/ranges.hpp> +#include <uhd/types/sensors.hpp> #include <uhd/utils/assert.hpp> #include <uhd/utils/static.hpp> #include <uhd/utils/algorithm.hpp> @@ -449,8 +450,13 @@ void rfx_xcvr::rx_get(const wax::obj &key_, wax::obj &val){ val = false; return; - case SUBDEV_PROP_LO_LOCKED: - val = this->get_locked(dboard_iface::UNIT_RX); + case SUBDEV_PROP_SENSOR: + UHD_ASSERT_THROW(key.name == "lo_locked"); + val = sensor_value_t("LO", this->get_locked(dboard_iface::UNIT_RX), "locked", "unlocked"); + return; + + case SUBDEV_PROP_SENSOR_NAMES: + val = prop_names_t(1, "lo_locked"); return; case SUBDEV_PROP_BANDWIDTH: @@ -546,8 +552,13 @@ void rfx_xcvr::tx_get(const wax::obj &key_, wax::obj &val){ val = true; return; - case SUBDEV_PROP_LO_LOCKED: - val = this->get_locked(dboard_iface::UNIT_TX); + case SUBDEV_PROP_SENSOR: + UHD_ASSERT_THROW(key.name == "lo_locked"); + val = sensor_value_t("LO", this->get_locked(dboard_iface::UNIT_TX), "locked", "unlocked"); + return; + + case SUBDEV_PROP_SENSOR_NAMES: + val = prop_names_t(1, "lo_locked"); return; case SUBDEV_PROP_BANDWIDTH: |