summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/OutputUHD.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/OutputUHD.cpp b/src/OutputUHD.cpp
index 072b63a..3a4511a 100644
--- a/src/OutputUHD.cpp
+++ b/src/OutputUHD.cpp
@@ -222,30 +222,30 @@ OutputUHD::OutputUHD(
}
if (myConf.lo_offset != 0.0) {
- etiLog.log(info, "OutputUHD:Setting freq to %f with LO offset %f...\n",
- myConf.frequency, myConf.lo_offset);
+ etiLog.level(info) << std::fixed << std::setprecision(3) <<
+ "OutputUHD:Setting freq to " << myConf.frequency <<
+ " with LO offset " << myConf.lo_offset << "...";
+
const auto tr = uhd::tune_request_t(myConf.frequency, myConf.lo_offset);
uhd::tune_result_t result = myUsrp->set_tx_freq(tr);
- etiLog.level(info) << "OutputUHD: " << std::fixed <<
- "Target RF: " << result.target_rf_freq <<
- "Actual RF: " << result.actual_rf_freq <<
- "Target DSP: " << result.target_dsp_freq <<
- "Actual DSP: " << result.actual_dsp_freq;
-
- if (result.clipped_rf_freq != result.target_rf_freq) {
- etiLog.level(warn) <<
- "OutputUHD: clipped RF frequency " << std::fixed <<
- " different from target";
- }
+ etiLog.level(debug) << "OutputUHD:" <<
+ std::fixed << std::setprecision(0) <<
+ " Target RF: " << result.target_rf_freq <<
+ " Actual RF: " << result.actual_rf_freq <<
+ " Target DSP: " << result.target_dsp_freq <<
+ " Actual DSP: " << result.actual_dsp_freq;
}
else {
//set the centre frequency
- etiLog.log(info, "OutputUHD:Setting freq to %f...\n", myConf.frequency);
+ etiLog.level(info) << std::fixed << std::setprecision(3) <<
+ "OutputUHD:Setting freq to " << myConf.frequency << "...";
myUsrp->set_tx_freq(myConf.frequency);
}
+
myConf.frequency = myUsrp->get_tx_freq();
- MDEBUG("OutputUHD:Actual frequency: %f\n", myConf.frequency);
+ etiLog.level(info) << std::fixed << std::setprecision(3) <<
+ "OutputUHD:Actual frequency: " << myConf.frequency;
myUsrp->set_tx_gain(myConf.txgain);
MDEBUG("OutputUHD:Actual TX Gain: %f ...\n", myUsrp->get_tx_gain());