1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-20 16:41:01 -05:00
sdrangel/sdrbase/dsp/spectrumscopecombovis.cpp

42 lines
1.0 KiB
C++
Raw Normal View History

#include "dsp/spectrumscopecombovis.h"
#include "dsp/dspcommands.h"
#include "util/messagequeue.h"
SpectrumScopeComboVis::SpectrumScopeComboVis(SpectrumVis* spectrumVis, ScopeVis* scopeVis) :
m_spectrumVis(spectrumVis),
m_scopeVis(scopeVis)
{
setObjectName("SpectrumScopeComboVis");
}
2015-08-13 23:00:28 -04:00
SpectrumScopeComboVis::~SpectrumScopeComboVis()
{
}
void SpectrumScopeComboVis::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly)
{
m_scopeVis->feed(begin, end, false);
SampleVector::const_iterator triggerPoint = m_scopeVis->getTriggerPoint();
m_spectrumVis->feedTriggered(triggerPoint, begin, end, positiveOnly);
}
void SpectrumScopeComboVis::start()
{
m_spectrumVis->start();
m_scopeVis->start();
}
void SpectrumScopeComboVis::stop()
{
m_spectrumVis->stop();
m_scopeVis->stop();
}
2015-08-13 23:00:28 -04:00
bool SpectrumScopeComboVis::handleMessage(const Message& message)
{
2015-08-13 23:00:28 -04:00
bool spectDone = m_spectrumVis->handleMessage(message);
bool scopeDone = m_scopeVis->handleMessage(message);
return (spectDone || scopeDone);
}