1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-15 12:51:49 -05:00
sdrangel/sdrbase/dsp/spectrumscopengcombovis.cpp

42 lines
1.1 KiB
C++
Raw Normal View History

2017-01-29 13:51:45 -05:00
#include "dsp/spectrumscopengcombovis.h"
#include "dsp/dspcommands.h"
#include "util/messagequeue.h"
SpectrumScopeNGComboVis::SpectrumScopeNGComboVis(SpectrumVis* spectrumVis, ScopeVisNG* scopeVis) :
m_spectrumVis(spectrumVis),
m_scopeVis(scopeVis)
{
setObjectName("SpectrumScopeNGComboVis");
}
SpectrumScopeNGComboVis::~SpectrumScopeNGComboVis()
{
}
2017-05-25 14:13:34 -04:00
void SpectrumScopeNGComboVis::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly __attribute__((unused)))
2017-01-29 13:51:45 -05:00
{
m_scopeVis->feed(begin, end, false);
SampleVector::const_iterator triggerPoint = m_scopeVis->getTriggerPoint();
2017-05-25 14:13:34 -04:00
m_spectrumVis->feedTriggered(triggerPoint, end, positiveOnly);
2017-01-29 13:51:45 -05:00
}
void SpectrumScopeNGComboVis::start()
{
m_spectrumVis->start();
m_scopeVis->start();
}
void SpectrumScopeNGComboVis::stop()
{
m_spectrumVis->stop();
m_scopeVis->stop();
}
bool SpectrumScopeNGComboVis::handleMessage(const Message& message)
{
bool spectDone = m_spectrumVis->handleMessage(message);
bool scopeDone = m_scopeVis->handleMessage(message);
return (spectDone || scopeDone);
}