1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-17 23:28:50 -05:00

Merged with f4exb branch

This commit is contained in:
f4exb 2015-08-09 10:36:31 +02:00
commit c5409e9b0f
27 changed files with 77 additions and 142 deletions

View File

@ -23,8 +23,6 @@
#include "dsp/dspcommands.h"
#include "dsp/pidcontroller.h"
#include <iostream>
MESSAGE_CLASS_DEFINITION(AMDemod::MsgConfigureAMDemod, Message)
AMDemod::AMDemod(AudioFifo* audioFifo, SampleSink* sampleSink) :

View File

@ -11,7 +11,6 @@
#include "util/simpleserializer.h"
#include "gui/basicchannelsettingswidget.h"
#include <iostream>
#include "amdemod.h"
const int AMDemodGUI::m_rfBW[] = {

View File

@ -21,7 +21,6 @@
#include "audio/audiooutput.h"
#include "dsp/dspcommands.h"
#include <iostream>
#include "chanalyzer.h"
MESSAGE_CLASS_DEFINITION(ChannelAnalyzer::MsgConfigureChannelAnalyzer, Message)

View File

@ -13,7 +13,6 @@
#include "gui/basicchannelsettingswidget.h"
#include "mainwindow.h"
#include <iostream>
#include "chanalyzer.h"
#include "chanalyzergui.h"

View File

@ -24,8 +24,6 @@
#include "dsp/dspcommands.h"
#include "dsp/pidcontroller.h"
#include <iostream>
static const Real afSqTones[2] = {1200.0, 8000.0};
MESSAGE_CLASS_DEFINITION(NFMDemod::MsgConfigureNFMDemod, Message)

View File

@ -11,8 +11,6 @@
#include "util/simpleserializer.h"
#include "gui/basicchannelsettingswidget.h"
#include <iostream>
const int NFMDemodGUI::m_rfBW[] = {
5000, 6250, 8330, 10000, 12500, 15000, 20000, 25000, 40000
};

View File

@ -22,8 +22,6 @@
#include "audio/audiooutput.h"
#include "dsp/dspcommands.h"
#include <iostream>
MESSAGE_CLASS_DEFINITION(SSBDemod::MsgConfigureSSBDemod, Message)
SSBDemod::SSBDemod(AudioFifo* audioFifo, SampleSink* sampleSink) :

View File

@ -14,8 +14,6 @@
#include "gui/basicchannelsettingswidget.h"
#include "mainwindow.h"
#include <iostream>
SSBDemodGUI* SSBDemodGUI::create(PluginAPI* pluginAPI)
{
SSBDemodGUI* gui = new SSBDemodGUI(pluginAPI);

View File

@ -23,8 +23,6 @@
#include "dsp/pidcontroller.h"
#include "wfmdemod.h"
//#include <iostream>
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;
*/
}

View File

@ -9,7 +9,6 @@
#include "util/simpleserializer.h"
#include "gui/basicchannelsettingswidget.h"
#include <iostream>
#include "wfmdemod.h"
#include "wfmdemodgui.h"

View File

@ -14,7 +14,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <QDebug>
#include <libbladeRF.h>
#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;

View File

@ -16,8 +16,7 @@
#include <string.h>
#include <errno.h>
#include <cstdio>
#include <iostream>
#include <QDebug>
#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<<settings.m_log2Decim) << std::endl;
qDebug() << "BladerfInput: set decimation to " << (1<<settings.m_log2Decim);
}
}
@ -341,7 +340,7 @@ bool BladerfInput::applySettings(const GeneralSettings& generalSettings, const S
m_settings.m_fcPos = settings.m_fcPos;
if(m_dev != NULL) {
m_bladerfThread->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;

View File

@ -14,7 +14,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <QDebug>
#include <QTime>
#include <QDateTime>
@ -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);

View File

@ -16,8 +16,7 @@
#include <string.h>
#include <errno.h>
#include <cstdio>
#include <iostream>
#include <QDebug>
#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;

View File

@ -18,6 +18,7 @@
#include <errno.h>
#include <assert.h>
#include "dsp/samplefifo.h"
#include <QDebug>
#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()));
}

View File

@ -1,4 +1,3 @@
#include <iostream>
#include "rtlsdrgui.h"
#include "ui_rtlsdrgui.h"
#include "plugin/pluginapi.h"

View File

@ -2,8 +2,7 @@
#include "dsp/inthalfbandfilter.h"
#include "dsp/dspcommands.h"
//#include <cstdio>
#include <iostream>
#include <QDebug>
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) :

View File

@ -1,7 +1,5 @@
#include "dsp/channelmarker.h"
#include <iostream>
QRgb ChannelMarker::m_colorTable[] = {
qRgb(0xc0, 0x00, 0x00),
qRgb(0x00, 0xc0, 0x00),

View File

@ -2,7 +2,7 @@
#include "util/simpleserializer.h"
#include "util/messagequeue.h"
#include <iostream>
#include <QDebug>
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;
}

View File

@ -18,7 +18,7 @@
#include "dsp/samplesource/samplesource.h"
#include "util/simpleserializer.h"
#include <iostream>
#include <QDebug>
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();

View File

@ -4,8 +4,7 @@
#include "util/messagequeue.h"
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <QDebug>
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)) {

View File

@ -4,7 +4,7 @@
#include "dsp/dspengine.h"
#include <algorithm>
#include <iostream>
#include <QDebug>
#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();

View File

@ -5,8 +5,7 @@
#include "util/simpleserializer.h"
#include "ui_glscopegui.h"
#include <iostream>
#include <cstdio>
#include <QDebug>
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);

View File

@ -21,7 +21,7 @@
#include <QMouseEvent>
#include "gui/glspectrum.h"
#include <iostream>
#include <QDebug>
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();

View File

@ -37,7 +37,7 @@
#include "plugin/plugingui.h"
#include <string>
#include <iostream>
#include <QDebug>
MainWindow::MainWindow(QWidget* parent) :
QMainWindow(parent),
@ -183,7 +183,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)
@ -198,7 +198,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());
@ -212,7 +212,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();
@ -221,7 +221,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();
@ -334,6 +334,7 @@ void MainWindow::handleDSPMessages()
updateCenterFreqDisplay();
updateSampleRate();
message->completed();
qDebug() << "MainWindow::handleMessages: m_fileSink->configure";
m_fileSink->configure(m_dspEngine->getMessageQueue(), m_sampleFileName, m_sampleRate, m_centerFrequency);
}
}

View File

@ -8,8 +8,7 @@
#include "dsp/dspengine.h"
#include "dsp/samplesource/samplesource.h"
#include <iostream>
#include <cstdio>
#include <QDebug>
#include "util/stacktrace.h"
PluginManager::PluginManager(MainWindow* mainWindow, DSPEngine* dspEngine, QObject* parent) :
@ -72,16 +71,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()));
@ -125,10 +124,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());
}
}
@ -215,7 +214,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();
@ -245,14 +244,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;
@ -282,7 +281,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;
}

View File

@ -1,7 +1,7 @@
#include "util/simpleserializer.h"
#include "settings/preset.h"
#include <iostream>
#include <QDebug>
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);