From 424462cb99a3c4b12ac8a79ed9bb0670e1426cba Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 28 Apr 2011 21:11:36 -0700 Subject: dbsrx: implement SUBDEV_PROP_ANTENNA to give users a better error --- host/lib/usrp/dboard/db_dbsrx.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'host') 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()); return; + case SUBDEV_PROP_ANTENNA: + assert_has(dbsrx_antennas, val.as(), "DBSRX antenna name"); + return; + case SUBDEV_PROP_GAIN: this->set_gain(val.as(), key.name); return; -- cgit v1.2.3