aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_iface.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-04-19 09:36:53 -0700
committerJosh Blum <josh@joshknows.com>2011-04-19 09:36:53 -0700
commita28099fe4abe10b11c9234d67b243adbd20ce1a1 (patch)
tree38cad47d5d7544c7800a471beef5bba2d07b263f /host/lib/usrp/usrp2/usrp2_iface.cpp
parent668402f27e34422a9afdc4d12f0f5575228f815b (diff)
downloaduhd-a28099fe4abe10b11c9234d67b243adbd20ce1a1.tar.gz
uhd-a28099fe4abe10b11c9234d67b243adbd20ce1a1.tar.bz2
uhd-a28099fe4abe10b11c9234d67b243adbd20ce1a1.zip
usrp2: improve the compatibility error messages
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_iface.cpp')
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index 6b3409ecc..d88d31765 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -242,11 +242,6 @@ public:
){
boost::mutex::scoped_lock lock(_ctrl_mutex);
- std::string range = (lo == hi)?
- str(boost::format("%d") % hi) :
- str(boost::format("[%d to %d]") % lo % hi)
- ;
-
//fill in the seq number and send
usrp2_ctrl_data_t out_copy = out_data;
out_copy.proto_ver = htonl(_protocol_compat);
@@ -261,9 +256,11 @@ public:
boost::uint32_t compat = ntohl(ctrl_data_in->proto_ver);
if(len >= sizeof(boost::uint32_t) and (hi < compat or lo > compat)){
throw uhd::runtime_error(str(boost::format(
+ "\nPlease update the firmware and FPGA images for your device.\n"
+ "See the application notes for USRP2/N-Series for instructions.\n"
"Expected protocol compatibility number %s, but got %d:\n"
"The firmware build is not compatible with the host code build."
- ) % range % compat));
+ ) % ((lo == hi)? (boost::format("%d") % hi) : (boost::format("[%d to %d]") % lo % hi)) % compat));
}
if (len >= sizeof(usrp2_ctrl_data_t) and ntohl(ctrl_data_in->seq) == _ctrl_seq_num){
return *ctrl_data_in;