diff --git a/plugins/channel/am/amdemod.cpp b/plugins/channel/am/amdemod.cpp index 8ee018f38..f5631b7b8 100644 --- a/plugins/channel/am/amdemod.cpp +++ b/plugins/channel/am/amdemod.cpp @@ -23,8 +23,6 @@ #include "dsp/dspcommands.h" #include "dsp/pidcontroller.h" -#include - MESSAGE_CLASS_DEFINITION(AMDemod::MsgConfigureAMDemod, Message) AMDemod::AMDemod(AudioFifo* audioFifo, SampleSink* sampleSink) : diff --git a/plugins/channel/am/amdemodgui.cpp b/plugins/channel/am/amdemodgui.cpp index 668768f58..f320418e7 100644 --- a/plugins/channel/am/amdemodgui.cpp +++ b/plugins/channel/am/amdemodgui.cpp @@ -11,7 +11,6 @@ #include "util/simpleserializer.h" #include "gui/basicchannelsettingswidget.h" -#include #include "amdemod.h" const int AMDemodGUI::m_rfBW[] = { diff --git a/plugins/channel/chanalyzer/chanalyzer.cpp b/plugins/channel/chanalyzer/chanalyzer.cpp index 936a6004a..db278f954 100644 --- a/plugins/channel/chanalyzer/chanalyzer.cpp +++ b/plugins/channel/chanalyzer/chanalyzer.cpp @@ -21,7 +21,6 @@ #include "audio/audiooutput.h" #include "dsp/dspcommands.h" -#include #include "chanalyzer.h" MESSAGE_CLASS_DEFINITION(ChannelAnalyzer::MsgConfigureChannelAnalyzer, Message) diff --git a/plugins/channel/chanalyzer/chanalyzergui.cpp b/plugins/channel/chanalyzer/chanalyzergui.cpp index 8c44eecce..b5cc10ea0 100644 --- a/plugins/channel/chanalyzer/chanalyzergui.cpp +++ b/plugins/channel/chanalyzer/chanalyzergui.cpp @@ -13,7 +13,6 @@ #include "gui/basicchannelsettingswidget.h" #include "mainwindow.h" -#include #include "chanalyzer.h" #include "chanalyzergui.h" diff --git a/plugins/channel/nfm/nfmdemod.cpp b/plugins/channel/nfm/nfmdemod.cpp index d8afc55f7..0f1debfb3 100644 --- a/plugins/channel/nfm/nfmdemod.cpp +++ b/plugins/channel/nfm/nfmdemod.cpp @@ -24,8 +24,6 @@ #include "dsp/dspcommands.h" #include "dsp/pidcontroller.h" -#include - static const Real afSqTones[2] = {1200.0, 8000.0}; MESSAGE_CLASS_DEFINITION(NFMDemod::MsgConfigureNFMDemod, Message) diff --git a/plugins/channel/nfm/nfmdemodgui.cpp b/plugins/channel/nfm/nfmdemodgui.cpp index 1c89e42b6..2e6de59cb 100644 --- a/plugins/channel/nfm/nfmdemodgui.cpp +++ b/plugins/channel/nfm/nfmdemodgui.cpp @@ -11,8 +11,6 @@ #include "util/simpleserializer.h" #include "gui/basicchannelsettingswidget.h" -#include - const int NFMDemodGUI::m_rfBW[] = { 5000, 6250, 8330, 10000, 12500, 15000, 20000, 25000, 40000 }; diff --git a/plugins/channel/ssb/ssbdemod.cpp b/plugins/channel/ssb/ssbdemod.cpp index 3f117393b..00e21ad27 100644 --- a/plugins/channel/ssb/ssbdemod.cpp +++ b/plugins/channel/ssb/ssbdemod.cpp @@ -22,8 +22,6 @@ #include "audio/audiooutput.h" #include "dsp/dspcommands.h" -#include - MESSAGE_CLASS_DEFINITION(SSBDemod::MsgConfigureSSBDemod, Message) SSBDemod::SSBDemod(AudioFifo* audioFifo, SampleSink* sampleSink) : diff --git a/plugins/channel/ssb/ssbdemodgui.cpp b/plugins/channel/ssb/ssbdemodgui.cpp index f93c9e174..f72201f20 100644 --- a/plugins/channel/ssb/ssbdemodgui.cpp +++ b/plugins/channel/ssb/ssbdemodgui.cpp @@ -14,8 +14,6 @@ #include "gui/basicchannelsettingswidget.h" #include "mainwindow.h" -#include - SSBDemodGUI* SSBDemodGUI::create(PluginAPI* pluginAPI) { SSBDemodGUI* gui = new SSBDemodGUI(pluginAPI); diff --git a/plugins/channel/wfm/wfmdemod.cpp b/plugins/channel/wfm/wfmdemod.cpp index ab96c25ab..2f0bc8fdd 100644 --- a/plugins/channel/wfm/wfmdemod.cpp +++ b/plugins/channel/wfm/wfmdemod.cpp @@ -23,8 +23,6 @@ #include "dsp/pidcontroller.h" #include "wfmdemod.h" -//#include - MESSAGE_CLASS_DEFINITION(WFMDemod::MsgConfigureWFMDemod, Message) WFMDemod::WFMDemod(AudioFifo* audioFifo, SampleSink* sampleSink) : @@ -168,7 +166,6 @@ void WFMDemod::feed(SampleVector::const_iterator begin, SampleVector::const_iter //m_lastSample = ci; - //std::cerr << "demod=" << demod << std::endl; /* Real argument = atan2(ci.real()*m_lastSample.imag() - m_lastSample.real()*ci.imag(), @@ -316,12 +313,4 @@ void WFMDemod::apply() m_running.m_volume = m_config.m_volume; m_running.m_audioSampleRate = m_config.m_audioSampleRate; - /* - std::cerr << "WFMDemod::apply: in=" << m_config.m_inputSampleRate - << ", df=" << m_config.m_inputFrequencyOffset - << ", rfbw=" << m_config.m_rfBandwidth - << ", afbw=" << m_config.m_afBandwidth - << std::endl; - */ - } diff --git a/plugins/channel/wfm/wfmdemodgui.cpp b/plugins/channel/wfm/wfmdemodgui.cpp index c0d9009a9..629f2b034 100644 --- a/plugins/channel/wfm/wfmdemodgui.cpp +++ b/plugins/channel/wfm/wfmdemodgui.cpp @@ -9,7 +9,6 @@ #include "util/simpleserializer.h" #include "gui/basicchannelsettingswidget.h" -#include #include "wfmdemod.h" #include "wfmdemodgui.h" diff --git a/plugins/samplesource/bladerf/bladerfgui.cpp b/plugins/samplesource/bladerf/bladerfgui.cpp index 0e8a18e61..05237c7c9 100644 --- a/plugins/samplesource/bladerf/bladerfgui.cpp +++ b/plugins/samplesource/bladerf/bladerfgui.cpp @@ -14,7 +14,7 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include "ui_bladerfgui.h" @@ -199,7 +199,7 @@ void BladerfGui::on_fcPos_currentIndexChanged(int index) void BladerfGui::on_lna_valueChanged(int value) { - std::cerr << "BladerfGui: LNA gain = " << value << std::endl; + qDebug() << "BladerfGui: LNA gain = " << value; if ((value < 0) || (value > 2)) return; diff --git a/plugins/samplesource/bladerf/bladerfinput.cpp b/plugins/samplesource/bladerf/bladerfinput.cpp index 14f298cf1..7f2cb25e2 100644 --- a/plugins/samplesource/bladerf/bladerfinput.cpp +++ b/plugins/samplesource/bladerf/bladerfinput.cpp @@ -16,8 +16,7 @@ #include #include -#include -#include +#include #include "util/simpleserializer.h" #include "bladerfgui.h" @@ -236,7 +235,7 @@ bool BladerfInput::applySettings(const GeneralSettings& generalSettings, const S if(bladerf_set_lna_gain(m_dev, getLnaGain(m_settings.m_lnaGain)) != 0) { qDebug("bladerf_set_lna_gain() failed"); } else { - std::cerr << "BladerfInput: LNA gain set to " << getLnaGain(m_settings.m_lnaGain) << std::endl; + qDebug() << "BladerfInput: LNA gain set to " << getLnaGain(m_settings.m_lnaGain); } } } @@ -247,7 +246,7 @@ bool BladerfInput::applySettings(const GeneralSettings& generalSettings, const S if(bladerf_set_rxvga1(m_dev, m_settings.m_vga1) != 0) { qDebug("bladerf_set_rxvga1() failed"); } else { - std::cerr << "BladerfInput: VGA1 gain set to " << m_settings.m_vga1 << std::endl; + qDebug() << "BladerfInput: VGA1 gain set to " << m_settings.m_vga1; } } } @@ -258,7 +257,7 @@ bool BladerfInput::applySettings(const GeneralSettings& generalSettings, const S if(bladerf_set_rxvga2(m_dev, m_settings.m_vga2) != 0) { qDebug("bladerf_set_rxvga2() failed"); } else { - std::cerr << "BladerfInput: VGA2 gain set to " << m_settings.m_vga2 << std::endl; + qDebug() << "BladerfInput: VGA2 gain set to " << m_settings.m_vga2; } } } @@ -270,13 +269,13 @@ bool BladerfInput::applySettings(const GeneralSettings& generalSettings, const S if (bladerf_expansion_attach(m_dev, BLADERF_XB_200) != 0) { qDebug("bladerf_expansion_attach(xb200) failed"); } else { - std::cerr << "BladerfInput: Attach XB200" << std::endl; + qDebug() << "BladerfInput: Attach XB200"; } } else { if (bladerf_expansion_attach(m_dev, BLADERF_XB_NONE) != 0) { qDebug("bladerf_expansion_attach(none) failed"); } else { - std::cerr << "BladerfInput: Detach XB200" << std::endl; + qDebug() << "BladerfInput: Detach XB200"; } } } @@ -288,7 +287,7 @@ bool BladerfInput::applySettings(const GeneralSettings& generalSettings, const S if(bladerf_xb200_set_path(m_dev, BLADERF_MODULE_RX, m_settings.m_xb200Path) != 0) { qDebug("bladerf_xb200_set_path(BLADERF_MODULE_RX) failed"); } else { - std::cerr << "BladerfInput: set xb200 path to " << m_settings.m_xb200Path << std::endl; + qDebug() << "BladerfInput: set xb200 path to " << m_settings.m_xb200Path; } } } @@ -299,7 +298,7 @@ bool BladerfInput::applySettings(const GeneralSettings& generalSettings, const S if(bladerf_xb200_set_filterbank(m_dev, BLADERF_MODULE_RX, m_settings.m_xb200Filter) != 0) { qDebug("bladerf_xb200_set_filterbank(BLADERF_MODULE_RX) failed"); } else { - std::cerr << "BladerfInput: set xb200 filter to " << m_settings.m_xb200Filter << std::endl; + qDebug() << "BladerfInput: set xb200 filter to " << m_settings.m_xb200Filter; } } } @@ -310,7 +309,7 @@ bool BladerfInput::applySettings(const GeneralSettings& generalSettings, const S if( bladerf_set_sample_rate(m_dev, BLADERF_MODULE_RX, settings.m_samplerate, &actualSamplerate) < 0) qCritical("could not set sample rate: %d", settings.m_samplerate); else { - std::cerr << "bladerf_set_sample_rate(BLADERF_MODULE_RX) actual sample rate is " << actualSamplerate << std::endl; + qDebug() << "bladerf_set_sample_rate(BLADERF_MODULE_RX) actual sample rate is " << actualSamplerate; m_settings.m_samplerate = settings.m_samplerate; m_bladerfThread->setSamplerate(settings.m_samplerate); } @@ -324,7 +323,7 @@ bool BladerfInput::applySettings(const GeneralSettings& generalSettings, const S if( bladerf_set_bandwidth(m_dev, BLADERF_MODULE_RX, m_settings.m_bandwidth, &actualBandwidth) < 0) qCritical("could not set sample rate: %d", m_settings.m_samplerate); else { - std::cerr << "bladerf_set_bandwidth(BLADERF_MODULE_RX) actual bandwidth is " << actualBandwidth << std::endl; + qDebug() << "bladerf_set_bandwidth(BLADERF_MODULE_RX) actual bandwidth is " << actualBandwidth; } } } @@ -333,7 +332,7 @@ bool BladerfInput::applySettings(const GeneralSettings& generalSettings, const S m_settings.m_log2Decim = settings.m_log2Decim; if(m_dev != NULL) { m_bladerfThread->setLog2Decimation(m_settings.m_log2Decim); - std::cerr << "BladerfInput: set decimation to " << (1<setFcPos((int) m_settings.m_fcPos); - std::cerr << "BladerfInput: set fc pos (enum) to " << (int) m_settings.m_fcPos << std::endl; + qDebug() << "BladerfInput: set fc pos (enum) to " << (int) m_settings.m_fcPos; } } @@ -374,13 +373,13 @@ bool BladerfInput::applySettings(const GeneralSettings& generalSettings, const S qDebug("bladerf_set_frequency(%lld) failed", m_generalSettings.m_centerFrequency); } - std::cerr << "BladerfInput: center freq: " << m_generalSettings.m_centerFrequency << " Hz" + qDebug() << "BladerfInput: center freq: " << m_generalSettings.m_centerFrequency << " Hz" << " RF center freq: " << centerFrequency << " Hz" << " sample rate / 2 : " << m_settings.m_samplerate/2 << "Hz" << " BW: " << m_settings.m_bandwidth << "Hz" << " img: " << f_img << "Hz" << " cut: " << f_cut << "Hz" - << " img - cut: " << f_img - f_cut << std::endl; + << " img - cut: " << f_img - f_cut; } return true; diff --git a/plugins/samplesource/filesource/filesourcegui.cpp b/plugins/samplesource/filesource/filesourcegui.cpp index fa3b558f4..54a702895 100644 --- a/plugins/samplesource/filesource/filesourcegui.cpp +++ b/plugins/samplesource/filesource/filesourcegui.cpp @@ -14,7 +14,7 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include @@ -131,7 +131,6 @@ bool FileSourceGui::handleMessage(Message* message) } else if(FileSourceInput::MsgReportFileSourceStreamData::match(message)) { - //std::cerr << "FileSourceGui::handleMessage: MsgReportFileSourceStreamData" << std::endl; m_sampleRate = ((FileSourceInput::MsgReportFileSourceStreamData*)message)->getSampleRate(); m_centerFrequency = ((FileSourceInput::MsgReportFileSourceStreamData*)message)->getCenterFrequency(); m_startingTimeStamp = ((FileSourceInput::MsgReportFileSourceStreamData*)message)->getStartingTimeStamp(); @@ -142,7 +141,6 @@ bool FileSourceGui::handleMessage(Message* message) else if(FileSourceInput::MsgReportFileSourceStreamTiming::match(message)) { m_samplesCount = ((FileSourceInput::MsgReportFileSourceStreamTiming*)message)->getSamplesCount(); - //std::cerr << "FileSourceGui::handleMessage: MsgReportFileSourceStreamTiming: " << m_samplesCount << std::endl; message->completed(); updateWithStreamTime(); return true; @@ -192,7 +190,7 @@ void FileSourceGui::on_showFileDialog_clicked(bool checked) void FileSourceGui::configureFileName() { - std::cerr << "FileSourceGui::configureFileName: " << m_fileName.toStdString() << std::endl; + qDebug() << "FileSourceGui::configureFileName: " << m_fileName.toStdString(); FileSourceInput::MsgConfigureFileSourceName* message = FileSourceInput::MsgConfigureFileSourceName::create(m_fileName); message->submit(m_pluginAPI->getDSPEngineMessageQueue()); } @@ -229,8 +227,6 @@ void FileSourceGui::updateWithStreamTime() QString s_time = t.toString("hh:mm:ss.zzz"); ui->relTimeText->setText(s_time); - //std::cerr << "FileSourceGui::updateWithStreamTime: " << t_sec << "." << t_msec << " " << s_time.toStdString() << std::endl; - quint64 startingTimeStampMsec = m_startingTimeStamp * 1000; QDateTime dt = QDateTime::fromMSecsSinceEpoch(startingTimeStampMsec); dt = dt.addSecs(t_sec); diff --git a/plugins/samplesource/filesource/filesourceinput.cpp b/plugins/samplesource/filesource/filesourceinput.cpp index 37d840d60..9d0770b39 100644 --- a/plugins/samplesource/filesource/filesourceinput.cpp +++ b/plugins/samplesource/filesource/filesourceinput.cpp @@ -16,8 +16,7 @@ #include #include -#include -#include +#include #include "util/simpleserializer.h" #include "dsp/filesink.h" @@ -90,7 +89,7 @@ FileSourceInput::~FileSourceInput() void FileSourceInput::openFileStream() { - std::cerr << "FileSourceInput::openFileStream: " << m_fileName.toStdString() << std::endl; + qDebug() << "FileSourceInput::openFileStream: " << m_fileName.toStdString(); //stopInput(); @@ -112,7 +111,7 @@ void FileSourceInput::openFileStream() bool FileSourceInput::startInput(int device) { QMutexLocker mutexLocker(&m_mutex); - std::cerr << "FileSourceInput::startInput" << std::endl; + qDebug() << "FileSourceInput::startInput"; /* if (!m_ifstream.is_open()) { @@ -154,7 +153,7 @@ failed: void FileSourceInput::stopInput() { - std::cerr << "FileSourceInput::stopInput" << std::endl; + qDebug() << "FileSourceInput::stopInput"; QMutexLocker mutexLocker(&m_mutex); if(m_fileSourceThread != NULL) { @@ -192,7 +191,6 @@ bool FileSourceInput::handleMessage(Message* message) { if (MsgConfigureFileSourceName::match(message)) { - //std::cerr << "FileSourceInput::handleMessage: MsgConfigureFileName" << std::endl; MsgConfigureFileSourceName* conf = (MsgConfigureFileSourceName*) message; m_fileName = conf->getFileName(); openFileStream(); @@ -201,10 +199,8 @@ bool FileSourceInput::handleMessage(Message* message) } else if (MsgConfigureFileSourceWork::match(message)) { - //std::cerr << "FileSourceInput::handleMessage: MsgConfigureFileSourceWork: "; MsgConfigureFileSourceWork* conf = (MsgConfigureFileSourceWork*) message; bool working = conf->isWorking(); - //std::cerr << (working ? "working" : "not working") << std::endl; if (m_fileSourceThread != 0) { if (working) { @@ -260,11 +256,11 @@ bool FileSourceInput::applySettings(const GeneralSettings& generalSettings, cons } } - std::cerr << "FileSourceInput::applySettings:" + qDebug() << "FileSourceInput::applySettings:" << " file name: " << settings.m_fileName.toStdString() << " center freq: " << m_centerFrequency << " Hz" << " sample rate: " << m_sampleRate - << " Unix timestamp: " << m_startingTimeStamp << std::endl; + << " Unix timestamp: " << m_startingTimeStamp; } return true; diff --git a/plugins/samplesource/filesource/filesourcethread.cpp b/plugins/samplesource/filesource/filesourcethread.cpp index 9ee136171..ee7901fe2 100644 --- a/plugins/samplesource/filesource/filesourcethread.cpp +++ b/plugins/samplesource/filesource/filesourcethread.cpp @@ -18,6 +18,7 @@ #include #include #include "dsp/samplefifo.h" +#include #include "filesourcethread.h" @@ -50,11 +51,11 @@ FileSourceThread::~FileSourceThread() void FileSourceThread::startWork() { - std::cerr << "FileSourceThread::startWork: "; + qDebug() << "FileSourceThread::startWork: "; if (m_ifstream->is_open()) { - std::cerr << " file stream open, starting..." << std::endl; + qDebug() << " - file stream open, starting..."; m_startWaitMutex.lock(); start(); while(!m_running) @@ -63,20 +64,20 @@ void FileSourceThread::startWork() } else { - std::cerr << " file stream closed, not starting." << std::endl; + qDebug() << " - file stream closed, not starting."; } } void FileSourceThread::stopWork() { - std::cerr << "FileSourceThread::stopWork" << std::endl; + qDebug() << "FileSourceThread::stopWork"; m_running = false; wait(); } void FileSourceThread::setSamplerate(int samplerate) { - std::cerr << "FileSourceThread::setSamplerate:" + qDebug() << "FileSourceThread::setSamplerate:" << " new:" << samplerate << " old:" << m_samplerate; @@ -91,19 +92,15 @@ void FileSourceThread::setSamplerate(int samplerate) m_bufsize = m_chunksize; if (m_buf == 0) { - std::cerr << " Allocate buffer"; + qDebug() << " - Allocate buffer"; m_buf = (quint8*) malloc(m_bufsize); } else { - std::cerr << " Re-allocate buffer"; + qDebug() << " - Re-allocate buffer"; m_buf = (quint8*) realloc((void*) m_buf, m_bufsize); } - std::cerr << " size: " << m_bufsize - << " #samples: " << (m_bufsize/4) << std::endl; - } - else - { - std::cerr << std::endl; + qDebug() << " - size: " << m_bufsize + << " #samples: " << (m_bufsize/4); } //m_samplerate = samplerate; @@ -126,7 +123,7 @@ void FileSourceThread::run() void FileSourceThread::connectTimer(const QTimer& timer) { - std::cerr << "FileSourceThread::connectTimer" << std::endl; + qDebug() << "FileSourceThread::connectTimer"; connect(&timer, SIGNAL(timeout()), this, SLOT(tick())); } diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp index 7b9ddf0bd..cc98b95a5 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp @@ -1,4 +1,3 @@ -#include #include "rtlsdrgui.h" #include "ui_rtlsdrgui.h" #include "plugin/pluginapi.h" diff --git a/sdrbase/dsp/channelizer.cpp b/sdrbase/dsp/channelizer.cpp index a66a478a6..8082f1d14 100644 --- a/sdrbase/dsp/channelizer.cpp +++ b/sdrbase/dsp/channelizer.cpp @@ -2,8 +2,7 @@ #include "dsp/inthalfbandfilter.h" #include "dsp/dspcommands.h" -//#include -#include +#include Channelizer::Channelizer(SampleSink* sampleSink) : m_sampleSink(sampleSink), @@ -102,11 +101,10 @@ void Channelizer::applyConfiguration() m_requestedCenterFrequency - m_requestedOutputSampleRate / 2, m_requestedCenterFrequency + m_requestedOutputSampleRate / 2); m_currentOutputSampleRate = m_inputSampleRate / (1 << m_filterStages.size()); - std::cerr << "Channelizer::applyConfiguration in=" << m_inputSampleRate + qDebug() << "Channelizer::applyConfiguration in=" << m_inputSampleRate << ", req=" << m_requestedOutputSampleRate << ", out=" << m_currentOutputSampleRate - << ", fc=" << m_currentCenterFrequency - << std::endl; + << ", fc=" << m_currentCenterFrequency; } Channelizer::FilterStage::FilterStage(Mode mode) : diff --git a/sdrbase/dsp/channelmarker.cpp b/sdrbase/dsp/channelmarker.cpp index ed6757086..8328dd9c9 100644 --- a/sdrbase/dsp/channelmarker.cpp +++ b/sdrbase/dsp/channelmarker.cpp @@ -1,7 +1,5 @@ #include "dsp/channelmarker.h" -#include - QRgb ChannelMarker::m_colorTable[] = { qRgb(0xc0, 0x00, 0x00), qRgb(0x00, 0xc0, 0x00), diff --git a/sdrbase/dsp/filesink.cpp b/sdrbase/dsp/filesink.cpp index cb3f0e8d9..c216e5579 100644 --- a/sdrbase/dsp/filesink.cpp +++ b/sdrbase/dsp/filesink.cpp @@ -2,7 +2,7 @@ #include "util/simpleserializer.h" #include "util/messagequeue.h" -#include +#include MESSAGE_CLASS_DEFINITION(FileSink::MsgConfigureFileSink, Message) @@ -60,7 +60,7 @@ void FileSink::startRecording() { if (!m_sampleFile.is_open()) { - std::cerr << "FileSink::startRecording" << std::endl; + qDebug() << "FileSink::startRecording"; m_sampleFile.open(m_fileName.c_str(), std::ios::binary); m_recordOn = true; m_recordStart = true; @@ -72,7 +72,7 @@ void FileSink::stopRecording() { if (m_sampleFile.is_open()) { - std::cerr << "FileSink::stopRecording" << std::endl; + qDebug() << "FileSink::stopRecording"; m_sampleFile.close(); m_recordOn = false; m_recordStart = false; @@ -85,10 +85,10 @@ bool FileSink::handleMessage(Message* message) { MsgConfigureFileSink* conf = (MsgConfigureFileSink*) message; handleConfigure(conf->getFileName(), conf->getSampleRate(), conf->getCenterFrequency()); - std::cerr << "FileSink::handleMessage:" + qDebug() << "FileSink::handleMessage:" << " fileName: " << m_fileName << " sampleRate: " << m_sampleRate - << " centerFrequency: " << m_centerFrequency << std::endl; + << " centerFrequency: " << m_centerFrequency; message->completed(); return true; } diff --git a/sdrbase/dsp/samplesource/samplesource.cpp b/sdrbase/dsp/samplesource/samplesource.cpp index a13e05cbe..c48e60ba0 100644 --- a/sdrbase/dsp/samplesource/samplesource.cpp +++ b/sdrbase/dsp/samplesource/samplesource.cpp @@ -18,7 +18,7 @@ #include "dsp/samplesource/samplesource.h" #include "util/simpleserializer.h" -#include +#include SampleSource::GeneralSettings::GeneralSettings() : m_centerFrequency(100000000) @@ -42,15 +42,15 @@ bool SampleSource::GeneralSettings::deserialize(const QByteArray& data) SimpleDeserializer d(data); if(!d.isValid()) { - std::cerr << "SampleSource::GeneralSettings::deserialize: invalid deserializer" << std::endl; + qDebug() << "SampleSource::GeneralSettings::deserialize: invalid deserializer"; resetToDefaults(); return false; } if(d.getVersion() == 1) { d.readU64(1, &m_centerFrequency, 100000000); - std::cerr << "SampleSource::GeneralSettings::deserialize: center frequency = " - << m_centerFrequency << std::endl; + qDebug() << "SampleSource::GeneralSettings::deserialize: center frequency = " + << m_centerFrequency; return true; } else { resetToDefaults(); diff --git a/sdrbase/dsp/scopevis.cpp b/sdrbase/dsp/scopevis.cpp index 94454345b..acac8958b 100644 --- a/sdrbase/dsp/scopevis.cpp +++ b/sdrbase/dsp/scopevis.cpp @@ -4,8 +4,7 @@ #include "util/messagequeue.h" #include -#include -#include +#include MESSAGE_CLASS_DEFINITION(ScopeVis::MsgConfigureScopeVis, Message) @@ -230,14 +229,14 @@ bool ScopeVis::handleMessageKeep(Message* message) if (newSize > m_traceback.size()) { // fitting the exact required space is not a requirement for the back trace m_traceback.resize(newSize); } - std::cerr << "ScopeVis::handleMessageKeep:" + qDebug() << "ScopeVis::handleMessageKeep:" << " m_triggerChannel: " << m_triggerChannel << " m_triggerLevel: " << m_triggerLevel << " m_triggerPositiveEdge: " << (m_triggerPositiveEdge ? "edge+" : "edge-") << " m_triggerBothEdges: " << (m_triggerBothEdges ? "yes" : "no") << " m_preTrigger: " << m_triggerPre << " m_triggerDelay: " << m_triggerDelay - << " m_traceSize: " << m_trace.size() << std::endl; + << " m_traceSize: " << m_trace.size(); return true; /* } else if(DSPConfigureScopeVis::match(message)) { diff --git a/sdrbase/gui/glscope.cpp b/sdrbase/gui/glscope.cpp index 4551b1d60..437b97415 100644 --- a/sdrbase/gui/glscope.cpp +++ b/sdrbase/gui/glscope.cpp @@ -4,7 +4,7 @@ #include "dsp/dspengine.h" #include -#include +#include #ifdef _WIN32 static double log2f(double n) @@ -344,18 +344,12 @@ void GLScope::paintGL() else if (m_triggerChannel == ScopeVis::TriggerMagLin) { Real y = (m_triggerLevel + 1.0 - (m_ofs / 2.0)) * m_amp1; - //std::cerr << "y=" << y << " ofs=" << m_ofs << std::endl; glVertex2f(0, (y - 1.0)/m_amp1); glVertex2f(1, (y - 1.0)/m_amp1); } else if (m_triggerChannel == ScopeVis::TriggerMagDb) { Real y = (m_triggerLevel - m_ofs) * m_amp1; - /* - std::cerr << "m_triggerLevel=" << m_triggerLevel - << " amp1=" << m_amp1 - << " ofs=" << m_ofs - << " ofs1=" << m_ofs1 << std::endl;*/ glVertex2f(0, (y - 1.0)/m_amp1); glVertex2f(1, (y - 1.0)/m_amp1); } @@ -403,7 +397,6 @@ void GLScope::paintGL() || (m_triggerChannel == ScopeVis::TriggerMagDb))) { float x = (m_triggerPre - (m_timeOfsProMill/1000.0)) * m_displayTrace->size(); - //std::cerr << "x=" << x << " w=" << (float) m_displayTrace->size() / (float) m_timeBase << std::endl; if ((x >= 0.0) && (x <= (float) m_displayTrace->size() / (float) m_timeBase)) { @@ -888,7 +881,6 @@ void GLScope::applyConfig() tick = &(*tickList)[i]; if(tick->major) { if(tick->textSize > 0) { - //std::cerr << (tick->text).toStdString() << " @ " << tick->textPos << std::endl; painter.drawText(QPointF(leftMargin - M - tick->textSize, topMargin + scopeHeight - tick->textPos - fm.ascent()/2), tick->text); } } @@ -978,7 +970,6 @@ void GLScope::applyConfig() tick = &(*tickList)[i]; if(tick->major) { if(tick->textSize > 0) { - //std::cerr << (tick->text).toStdString() << " @ " << tick->textPos << std::endl; painter.drawText(QPointF(leftMargin - M - tick->textSize, topMargin + scopeHeight - tick->textPos - fm.ascent()/2), tick->text); } } @@ -1055,7 +1046,6 @@ void GLScope::applyConfig() ); { // Y1 scale - //std::cerr << "Horizontal: " << width() << "x" << scopeHeight << " amp:" << m_amp << std::endl; m_y1Scale.setSize(scopeHeight); m_left1ScalePixmap = QPixmap( @@ -1076,7 +1066,6 @@ void GLScope::applyConfig() tick = &(*tickList)[i]; if(tick->major) { if(tick->textSize > 0) { - //std::cerr << (tick->text).toStdString() << " @ " << tick->textPos << std::endl; painter.drawText(QPointF(leftMargin - M - tick->textSize, topMargin + scopeHeight - tick->textPos - fm.ascent()/2), tick->text); } } @@ -1167,7 +1156,6 @@ void GLScope::applyConfig() tick = &(*tickList)[i]; if(tick->major) { if(tick->textSize > 0) { - //std::cerr << (tick->text).toStdString() << " @ " << tick->textPos << std::endl; painter.drawText(QPointF(leftMargin - M - tick->textSize, topMargin + scopeHeight - tick->textPos - fm.ascent()/2), tick->text); } } @@ -1244,7 +1232,6 @@ void GLScope::applyConfig() ); { // Y1 scale - //std::cerr << "Horizontal: " << width() << "x" << scopeHeight << " amp:" << m_amp << std::endl; m_y1Scale.setSize(scopeHeight); m_left1ScalePixmap = QPixmap( @@ -1265,7 +1252,6 @@ void GLScope::applyConfig() tick = &(*tickList)[i]; if(tick->major) { if(tick->textSize > 0) { - //std::cerr << (tick->text).toStdString() << " @ " << tick->textPos << std::endl; painter.drawText(QPointF(leftMargin - M - tick->textSize, topMargin + scopeHeight - tick->textPos - fm.ascent()/2), tick->text); } } @@ -1341,7 +1327,6 @@ void GLScope::applyConfig() ); { // Y2 scale - //std::cerr << "Horizontal: " << width() << "x" << scopeHeight << " amp:" << m_amp << std::endl; m_y2Scale.setSize(scopeHeight); m_left2ScalePixmap = QPixmap( @@ -1362,7 +1347,6 @@ void GLScope::applyConfig() tick = &(*tickList)[i]; if(tick->major) { if(tick->textSize > 0) { - //std::cerr << (tick->text).toStdString() << " @ " << tick->textPos << std::endl; painter.drawText(QPointF(leftMargin - M - tick->textSize, topMargin + scopeHeight - tick->textPos - fm.ascent()/2), tick->text); } } @@ -1438,7 +1422,7 @@ void GLScope::setTriggerPre(Real triggerPre) void GLScope::connectTimer(const QTimer& timer) { - std::cerr << "GLScope::connectTimer" << std::endl; + qDebug() << "GLScope::connectTimer"; disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(tick())); connect(&timer, SIGNAL(timeout()), this, SLOT(tick())); m_timer.stop(); diff --git a/sdrbase/gui/glscopegui.cpp b/sdrbase/gui/glscopegui.cpp index 5482666aa..56dc5698b 100644 --- a/sdrbase/gui/glscopegui.cpp +++ b/sdrbase/gui/glscopegui.cpp @@ -5,8 +5,7 @@ #include "util/simpleserializer.h" #include "ui_glscopegui.h" -#include -#include +#include const qreal GLScopeGUI::amps[11] = { 0.2, 0.1, 0.05, 0.02, 0.01, 0.005, 0.002, 0.001, 0.0005, 0.0002, 0.0001 }; @@ -346,11 +345,6 @@ void GLScopeGUI::setTimeScaleDisplay() { m_sampleRate = m_glScope->getSampleRate(); qreal t = (m_glScope->getTraceSize() * 1.0 / m_sampleRate) / (qreal)m_timeBase; - /*std::cerr << "GLScopeGUI::setTimeScaleDisplay: sample rate: " - << m_sampleRate - << " traceSize: " << m_glScope->getTraceSize() - << " timeBase: " << m_timeBase - << " t: " << t << std::endl;*/ if(t < 0.000001) ui->timeText->setText(tr("%1\nns").arg(t * 1000000000.0)); else if(t < 0.001) @@ -652,7 +646,7 @@ void GLScopeGUI::on_slopeNeg_clicked() void GLScopeGUI::on_slopeBoth_clicked() { - std::cerr << "GLScopeGUI::on_slopeBoth_clicked" << std::endl; + qDebug() << "GLScopeGUI::on_slopeBoth_clicked"; ui->slopePos->setChecked(false); ui->slopeNeg->setChecked(false); ui->slopeBoth->setChecked(true); diff --git a/sdrbase/gui/glspectrum.cpp b/sdrbase/gui/glspectrum.cpp index 001dc02ea..ceda6182a 100644 --- a/sdrbase/gui/glspectrum.cpp +++ b/sdrbase/gui/glspectrum.cpp @@ -21,7 +21,7 @@ #include #include "gui/glspectrum.h" -#include +#include GLSpectrum::GLSpectrum(QWidget* parent) : QGLWidget(parent), @@ -1546,7 +1546,7 @@ void GLSpectrum::setWaterfallShare(Real waterfallShare) void GLSpectrum::connectTimer(const QTimer& timer) { - std::cerr << "GLSpectrum::connectTimer" << std::endl; + qDebug() << "GLSpectrum::connectTimer"; disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(tick())); connect(&timer, SIGNAL(timeout()), this, SLOT(tick())); m_timer.stop(); diff --git a/sdrbase/mainwindow.cpp b/sdrbase/mainwindow.cpp index 9b829dd38..17d227167 100644 --- a/sdrbase/mainwindow.cpp +++ b/sdrbase/mainwindow.cpp @@ -37,7 +37,7 @@ #include "plugin/plugingui.h" #include -#include +#include MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), @@ -179,7 +179,7 @@ void MainWindow::setInputGUI(QWidget* gui) void MainWindow::loadSettings() { - std::cerr << "MainWindow::loadSettings" << std::endl; + qDebug() << "MainWindow::loadSettings"; m_settings.load(); for(int i = 0; i < m_settings.getPresetCount(); ++i) @@ -194,7 +194,7 @@ void MainWindow::loadSettings() void MainWindow::loadSettings(const Preset* preset) { - std::cerr << "MainWindow::loadSettings(preset): " << preset->getSource().toStdString() << std::endl; + qDebug() << "MainWindow::loadSettings(preset): " << preset->getSource().toStdString(); ui->glSpectrumGUI->deserialize(preset->getSpectrumConfig()); ui->dcOffset->setChecked(preset->getDCOffsetCorrection()); @@ -208,7 +208,7 @@ void MainWindow::loadSettings(const Preset* preset) void MainWindow::saveSettings() { - std::cerr << "MainWindow::saveSettings" << std::endl; + qDebug() << "MainWindow::saveSettings"; saveSettings(m_settings.getCurrent()); m_settings.save(); @@ -217,7 +217,7 @@ void MainWindow::saveSettings() void MainWindow::saveSettings(Preset* preset) { - std::cerr << "MainWindow::saveSettings(preset): " << preset->getSource().toStdString() << std::endl; + qDebug() << "MainWindow::saveSettings(preset): " << preset->getSource().toStdString(); preset->setSpectrumConfig(ui->glSpectrumGUI->serialize()); preset->clearChannels(); @@ -324,7 +324,7 @@ void MainWindow::handleMessages() updateCenterFreqDisplay(); updateSampleRate(); message->completed(); - std::cerr << "MainWindow::handleMessages: m_fileSink->configure" << std::endl; + qDebug() << "MainWindow::handleMessages: m_fileSink->configure"; m_fileSink->configure(m_dspEngine->getMessageQueue(), m_sampleFileName, m_sampleRate, m_centerFrequency); } else { if(!m_pluginManager->handleMessage(message)) diff --git a/sdrbase/plugin/pluginmanager.cpp b/sdrbase/plugin/pluginmanager.cpp index e6bdbe3a7..45b73a665 100644 --- a/sdrbase/plugin/pluginmanager.cpp +++ b/sdrbase/plugin/pluginmanager.cpp @@ -8,8 +8,7 @@ #include "dsp/dspengine.h" #include "dsp/samplesource/samplesource.h" -#include -#include +#include #include "util/stacktrace.h" PluginManager::PluginManager(MainWindow* mainWindow, DSPEngine* dspEngine, QObject* parent) : @@ -71,16 +70,16 @@ void PluginManager::removeChannelInstance(PluginGUI* pluginGUI) void PluginManager::registerSampleSource(const QString& sourceName, PluginInterface* plugin) { - std::cerr << "PluginManager::registerSampleSource " + qDebug() << "PluginManager::registerSampleSource " << plugin->getPluginDescriptor().displayedName.toStdString() - << " with source name " << sourceName.toStdString() << std::endl; + << " with source name " << sourceName.toStdString(); m_sampleSourceRegistrations.append(SampleSourceRegistration(sourceName, plugin)); } void PluginManager::loadSettings(const Preset* preset) { - std::cerr << "PluginManager::loadSettings" << std::endl; + qDebug() << "PluginManager::loadSettings"; fprintf(stderr, "-------- [%s | %s] --------\n", qPrintable(preset->getGroup()), qPrintable(preset->getDescription())); @@ -124,10 +123,10 @@ void PluginManager::loadSettings(const Preset* preset) renameChannelInstances(); if(m_sampleSourceInstance != NULL) { - std::cerr << "m_sampleSourceInstance->deserializeGeneral (" << m_sampleSourceInstance->getName().toStdString() << ")" << std::endl; + qDebug() << "m_sampleSourceInstance->deserializeGeneral (" << m_sampleSourceInstance->getName().toStdString() << ")"; m_sampleSourceInstance->deserializeGeneral(preset->getSourceGeneralConfig()); if(m_sampleSource == preset->getSource()) { - std::cerr << "m_sampleSourceInstance->deserialize" << std::endl; + qDebug() << "m_sampleSourceInstance->deserialize"; m_sampleSourceInstance->deserialize(preset->getSourceConfig()); } } @@ -214,7 +213,7 @@ void PluginManager::fillSampleSourceSelector(QComboBox* comboBox) int PluginManager::selectSampleSource(int index) { - std::cout << "PluginManager::selectSampleSource by index" << std::endl; + qDebug() << "PluginManager::selectSampleSource by index"; m_dspEngine->stopAcquistion(); @@ -244,14 +243,14 @@ int PluginManager::selectSampleSource(int index) return -1; m_sampleSource = m_sampleSourceDevices[index].m_sourceName; - std::cerr << "m_sampleSource at index " << index << " is " << m_sampleSource.toStdString() << std::endl; + qDebug() << "m_sampleSource at index " << index << " is " << m_sampleSource.toStdString(); m_sampleSourceInstance = m_sampleSourceDevices[index].m_plugin->createSampleSource(m_sampleSource, m_sampleSourceDevices[index].m_address); return index; } int PluginManager::selectSampleSource(const QString& source) { - std::cout << "PluginManager::selectSampleSource by name: " << source.toStdString() << std::endl; + qDebug() << "PluginManager::selectSampleSource by name: " << source.toStdString(); int index = -1; @@ -281,7 +280,7 @@ int PluginManager::selectSampleSource(const QString& source) return -1; m_sampleSource = m_sampleSourceDevices[index].m_sourceName; - std::cerr << "m_sampleSource at index " << index << " is " << m_sampleSource.toStdString() << std::endl; + qDebug() << "m_sampleSource at index " << index << " is " << m_sampleSource.toStdString(); m_sampleSourceInstance = m_sampleSourceDevices[index].m_plugin->createSampleSource(m_sampleSource, m_sampleSourceDevices[index].m_address); return index; } diff --git a/sdrbase/settings/preset.cpp b/sdrbase/settings/preset.cpp index 85f5480dc..518751bc0 100644 --- a/sdrbase/settings/preset.cpp +++ b/sdrbase/settings/preset.cpp @@ -1,7 +1,7 @@ #include "util/simpleserializer.h" #include "settings/preset.h" -#include +#include Preset::Preset() { @@ -27,7 +27,7 @@ void Preset::resetToDefaults() QByteArray Preset::serialize() const { - std::cerr << "Preset::serialize (" << this->getSource().toStdString()<< ")" << std::endl; + qDebug() << "Preset::serialize (" << this->getSource().toStdString()<< ")"; SimpleSerializer s(1); s.writeString(1, m_group); @@ -45,7 +45,7 @@ QByteArray Preset::serialize() const s.writeS32(200, m_channelConfigs.size()); - std::cerr << " m_group: " << m_group.toStdString() << std::endl; + qDebug() << " m_group: " << m_group.toStdString(); for(int i = 0; i < m_channelConfigs.size(); i++) { s.writeString(201 + i * 2, m_channelConfigs[i].m_channel); @@ -57,7 +57,7 @@ QByteArray Preset::serialize() const bool Preset::deserialize(const QByteArray& data) { - std::cerr << "Preset::deserialize (" << this->getSource().toStdString() << ")" << std::endl; + qDebug() << "Preset::deserialize (" << this->getSource().toStdString() << ")"; SimpleDeserializer d(data); if(!d.isValid()) { @@ -79,7 +79,7 @@ bool Preset::deserialize(const QByteArray& data) d.readBlob(11, &m_sourceGeneralConfig); d.readBlob(12, &m_sourceConfig); - std::cerr << " m_group: " << m_group.toStdString() << std::endl; + qDebug() << " m_group: " << m_group.toStdString(); qint32 channelCount = 0; d.readS32(200, &channelCount, 0);