aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/codec_impl.cpp
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-10-12 14:46:41 -0700
committerNick Foster <nick@nerdnetworks.org>2010-10-12 14:46:41 -0700
commit5982ec4ee2c6f9efca1c5068e42dc38b822df7dc (patch)
tree6b15ce5f837ea57cc5c9fdf79e45fdbd2f44d9de /host/lib/usrp/usrp2/codec_impl.cpp
parent3df994e1c784d7037e869610f1417fe64e0e89a8 (diff)
downloaduhd-5982ec4ee2c6f9efca1c5068e42dc38b822df7dc.tar.gz
uhd-5982ec4ee2c6f9efca1c5068e42dc38b822df7dc.tar.bz2
uhd-5982ec4ee2c6f9efca1c5068e42dc38b822df7dc.zip
USRP2P: This is surprisingly involved. Adding a consistent interface to deal with hardware revisions.
Diffstat (limited to 'host/lib/usrp/usrp2/codec_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/codec_impl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp2/codec_impl.cpp b/host/lib/usrp/usrp2/codec_impl.cpp
index db98e50ab..04a11d922 100644
--- a/host/lib/usrp/usrp2/codec_impl.cpp
+++ b/host/lib/usrp/usrp2/codec_impl.cpp
@@ -67,7 +67,7 @@ void usrp2_mboard_impl::rx_codec_get(const wax::obj &key_, wax::obj &val){
return;
case CODEC_PROP_GAIN_NAMES:
- if(_iface->get_hw_rev() >= USRP2P_FIRST_HW_REV) {
+ if(_iface->get_hw_rev().to_uint16() >= USRP2P_FIRST_HW_REV) {
val = prop_names_t(codec_rx_gain_ranges.keys());
} else val = prop_names_t();
return;
@@ -94,7 +94,7 @@ void usrp2_mboard_impl::rx_codec_set(const wax::obj &key_, const wax::obj &val){
switch(key.as<codec_prop_t>()) {
case CODEC_PROP_GAIN_I:
case CODEC_PROP_GAIN_Q:
- if(_iface->get_hw_rev() < USRP2P_FIRST_HW_REV) UHD_THROW_PROP_SET_ERROR();//this capability is only found in USRP2P
+ if(_iface->get_hw_rev().to_uint16() < USRP2P_FIRST_HW_REV) UHD_THROW_PROP_SET_ERROR();//this capability is only found in USRP2P
gain = val.as<float>();
this->rx_codec_set_gain(gain, key.name);