aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajib Bhattacharjea <rbhattacharjea@gmail.com>2015-02-04 14:48:04 -0500
committerMartin Braun <martin.braun@ettus.com>2015-02-09 13:36:02 +0100
commit4dc4c3cd700db5b1e66ca2be275bf5f743a75c8e (patch)
treeb76edc4ffd6613f4ebf0301f991cd6a905c64b31
parent38cfd24f7e4cbb4a6811ab6a41507a91e23bd748 (diff)
downloaduhd-4dc4c3cd700db5b1e66ca2be275bf5f743a75c8e.tar.gz
uhd-4dc4c3cd700db5b1e66ca2be275bf5f743a75c8e.tar.bz2
uhd-4dc4c3cd700db5b1e66ca2be275bf5f743a75c8e.zip
examples: Show set_rx_bandwidth units properly in MHz in all examples
Conflicts: host/examples/rx_samples_to_file.cpp
-rw-r--r--host/examples/rx_ascii_art_dft.cpp4
-rw-r--r--host/examples/rx_samples_to_file.cpp4
-rw-r--r--host/examples/rx_samples_to_udp.cpp4
-rw-r--r--host/examples/txrx_loopback_to_file.cpp4
4 files changed, 8 insertions, 8 deletions
diff --git a/host/examples/rx_ascii_art_dft.cpp b/host/examples/rx_ascii_art_dft.cpp
index 81208cf8b..c73e57459 100644
--- a/host/examples/rx_ascii_art_dft.cpp
+++ b/host/examples/rx_ascii_art_dft.cpp
@@ -110,9 +110,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
//set the analog frontend filter bandwidth
if (vm.count("bw")){
- std::cout << boost::format("Setting RX Bandwidth: %f MHz...") % bw << std::endl;
+ std::cout << boost::format("Setting RX Bandwidth: %f MHz...") % (bw/1e6) << std::endl;
usrp->set_rx_bandwidth(bw);
- std::cout << boost::format("Actual RX Bandwidth: %f MHz...") % usrp->get_rx_bandwidth() << std::endl << std::endl;
+ std::cout << boost::format("Actual RX Bandwidth: %f MHz...") % (usrp->get_rx_bandwidth()/1e6) << std::endl << std::endl;
}
//set the antenna
diff --git a/host/examples/rx_samples_to_file.cpp b/host/examples/rx_samples_to_file.cpp
index 4fe438798..975a9da88 100644
--- a/host/examples/rx_samples_to_file.cpp
+++ b/host/examples/rx_samples_to_file.cpp
@@ -300,9 +300,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
//set the analog frontend filter bandwidth
if (vm.count("bw")){
- std::cout << boost::format("Setting RX Bandwidth: %f MHz...") % bw << std::endl;
+ std::cout << boost::format("Setting RX Bandwidth: %f MHz...") % (bw/1e6) << std::endl;
usrp->set_rx_bandwidth(bw);
- std::cout << boost::format("Actual RX Bandwidth: %f MHz...") % usrp->get_rx_bandwidth() << std::endl << std::endl;
+ std::cout << boost::format("Actual RX Bandwidth: %f MHz...") % (usrp->get_rx_bandwidth()/1e6) << std::endl << std::endl;
}
//set the antenna
diff --git a/host/examples/rx_samples_to_udp.cpp b/host/examples/rx_samples_to_udp.cpp
index 9accdef83..9a8a3f4ac 100644
--- a/host/examples/rx_samples_to_udp.cpp
+++ b/host/examples/rx_samples_to_udp.cpp
@@ -93,9 +93,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
//set the analog frontend filter bandwidth
if (vm.count("bw")){
- std::cout << boost::format("Setting RX Bandwidth: %f MHz...") % bw << std::endl;
+ std::cout << boost::format("Setting RX Bandwidth: %f MHz...") % (bw/1e6) << std::endl;
usrp->set_rx_bandwidth(bw);
- std::cout << boost::format("Actual RX Bandwidth: %f MHz...") % usrp->get_rx_bandwidth() << std::endl << std::endl;
+ std::cout << boost::format("Actual RX Bandwidth: %f MHz...") % (usrp->get_rx_bandwidth()/1e6) << std::endl << std::endl;
}
//set the antenna
diff --git a/host/examples/txrx_loopback_to_file.cpp b/host/examples/txrx_loopback_to_file.cpp
index f8c8b9785..4eb6daa6c 100644
--- a/host/examples/txrx_loopback_to_file.cpp
+++ b/host/examples/txrx_loopback_to_file.cpp
@@ -419,9 +419,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
//set the receive analog frontend filter bandwidth
if (vm.count("rx-bw")){
- std::cout << boost::format("Setting RX Bandwidth: %f MHz...") % rx_bw << std::endl;
+ std::cout << boost::format("Setting RX Bandwidth: %f MHz...") % (rx_bw/1e6) << std::endl;
rx_usrp->set_rx_bandwidth(rx_bw, channel);
- std::cout << boost::format("Actual RX Bandwidth: %f MHz...") % rx_usrp->get_rx_bandwidth(channel) << std::endl << std::endl;
+ std::cout << boost::format("Actual RX Bandwidth: %f MHz...") % (rx_usrp->get_rx_bandwidth(channel)/1e6) << std::endl << std::endl;
}
}
//set the receive antenna