diff options
author | Josh Blum <josh@joshknows.com> | 2011-04-28 21:11:36 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-04-28 21:11:36 -0700 |
commit | 424462cb99a3c4b12ac8a79ed9bb0670e1426cba (patch) | |
tree | f9e86a008356e4551af2c7d9f21e742f652ae235 /host/lib/usrp | |
parent | 76fb9508a9cb4cb45ef48af4bd3afb4ac507813b (diff) | |
download | uhd-424462cb99a3c4b12ac8a79ed9bb0670e1426cba.tar.gz uhd-424462cb99a3c4b12ac8a79ed9bb0670e1426cba.tar.bz2 uhd-424462cb99a3c4b12ac8a79ed9bb0670e1426cba.zip |
dbsrx: implement SUBDEV_PROP_ANTENNA to give users a better error
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/dboard/db_dbsrx.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp index b984608ca..8fdd4f953 100644 --- a/host/lib/usrp/dboard/db_dbsrx.cpp +++ b/host/lib/usrp/dboard/db_dbsrx.cpp @@ -543,7 +543,7 @@ void dbsrx::rx_get(const wax::obj &key_, wax::obj &val){ return; case SUBDEV_PROP_ANTENNA: - val = std::string("J3"); + val = dbsrx_antennas.at(0); return; case SUBDEV_PROP_ANTENNA_NAMES: @@ -589,6 +589,10 @@ void dbsrx::rx_set(const wax::obj &key_, const wax::obj &val){ this->set_lo_freq(val.as<double>()); return; + case SUBDEV_PROP_ANTENNA: + assert_has(dbsrx_antennas, val.as<std::string>(), "DBSRX antenna name"); + return; + case SUBDEV_PROP_GAIN: this->set_gain(val.as<double>(), key.name); return; |