diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-12-20 23:02:53 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-01-07 16:04:04 +0100 |
commit | 9279e0e12303fb91c351075c74e4dab5dc2251a7 (patch) | |
tree | d6a8251e85cd0882249cc90d838898ffc94a4576 /Transceiver52M | |
parent | 84231bd8b7f1675c91979aab25be6d2beb41e5ba (diff) |
uhd: Improve some logging lines printing UHD pretty-print output
Change-Id: If5aba28aaf8a3312d89b3e963184f9f20966d199
Diffstat (limited to 'Transceiver52M')
-rw-r--r-- | Transceiver52M/device/uhd/UHDDevice.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp b/Transceiver52M/device/uhd/UHDDevice.cpp index 4a6c233..8bab882 100644 --- a/Transceiver52M/device/uhd/UHDDevice.cpp +++ b/Transceiver52M/device/uhd/UHDDevice.cpp @@ -566,7 +566,7 @@ int uhd_device::open(const std::string &args, int ref, bool swap_channels) init_gains(); // Print configuration - LOGC(DDEV, INFO) << "\n" << usrp_dev->get_pp_string(); + LOGC(DDEV, INFO) << "Device configuration: " << usrp_dev->get_pp_string(); if (iface == MULTI_ARFCN) return MULTI_ARFCN; @@ -919,15 +919,18 @@ bool uhd_device::set_freq(double freq, size_t chan, bool tx) std::vector<double> freqs; uhd::tune_result_t tres; uhd::tune_request_t treq = select_freq(freq, chan, tx); + std::string str_dir; if (tx) { tres = usrp_dev->set_tx_freq(treq, chan); tx_freqs[chan] = usrp_dev->get_tx_freq(chan); + str_dir = "Tx"; } else { tres = usrp_dev->set_rx_freq(treq, chan); rx_freqs[chan] = usrp_dev->get_rx_freq(chan); + str_dir = "Rx"; } - LOGC(DDEV, INFO) << "\n" << tres.to_pp_string() << std::endl; + LOGCHAN(chan, DDEV, INFO) << "set_freq(" << freq << ", " << str_dir << "): " << tres.to_pp_string() << std::endl; if ((chans == 1) || ((chans == 2) && dev_type == UMTRX)) return true; @@ -947,7 +950,7 @@ bool uhd_device::set_freq(double freq, size_t chan, bool tx) rx_freqs[!chan] = usrp_dev->get_rx_freq(!chan); } - LOGC(DDEV, INFO) << "\n" << tres.to_pp_string() << std::endl; + LOGCHAN(chan, DDEV, INFO) << "set_freq(" << freq << ", " << str_dir << "): " << tres.to_pp_string() << std::endl; } return true; |