diff options
author | Josh Blum <josh@joshknows.com> | 2011-02-11 18:43:20 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-02-11 18:43:20 -0800 |
commit | 9de6f36bc5d9f5d9d602547166c92b53b278b428 (patch) | |
tree | 6ad2101b5c5e1051188067318dcd045fbd37834a /host/lib/usrp/dboard/db_wbx.cpp | |
parent | e4b45cca1b99d92baab061d36b6c0ceaebdfe5b7 (diff) | |
download | uhd-9de6f36bc5d9f5d9d602547166c92b53b278b428.tar.gz uhd-9de6f36bc5d9f5d9d602547166c92b53b278b428.tar.bz2 uhd-9de6f36bc5d9f5d9d602547166c92b53b278b428.zip |
usrp: implement sensors in all the dboards, deprecated read rssi and get lo locked
Diffstat (limited to 'host/lib/usrp/dboard/db_wbx.cpp')
-rw-r--r-- | host/lib/usrp/dboard/db_wbx.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/host/lib/usrp/dboard/db_wbx.cpp b/host/lib/usrp/dboard/db_wbx.cpp index 135997789..0bc2d0ca1 100644 --- a/host/lib/usrp/dboard/db_wbx.cpp +++ b/host/lib/usrp/dboard/db_wbx.cpp @@ -68,6 +68,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> @@ -521,8 +522,13 @@ void wbx_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: @@ -622,8 +628,13 @@ void wbx_xcvr::tx_get(const wax::obj &key_, wax::obj &val){ val = false; 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: |