1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-03 15:31:15 -05:00
sdrangel/sdrgui/dsp/spectrumscopecombovis.cpp

43 lines
1.1 KiB
C++
Raw Normal View History

#include "dsp/spectrumscopecombovis.h"
2017-01-29 13:51:45 -05:00
#include "dsp/dspcommands.h"
2018-08-12 11:22:39 -04:00
#include "dsp/scopevis.h"
2017-01-29 13:51:45 -05:00
#include "util/messagequeue.h"
2018-08-12 11:18:58 -04:00
SpectrumScopeComboVis::SpectrumScopeComboVis(SpectrumVis* spectrumVis, ScopeVis* scopeVis) :
2017-01-29 13:51:45 -05:00
m_spectrumVis(spectrumVis),
m_scopeVis(scopeVis)
{
setObjectName("SpectrumScopeComboVis");
2017-01-29 13:51:45 -05:00
}
SpectrumScopeComboVis::~SpectrumScopeComboVis()
2017-01-29 13:51:45 -05:00
{
}
void SpectrumScopeComboVis::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 SpectrumScopeComboVis::start()
2017-01-29 13:51:45 -05:00
{
m_spectrumVis->start();
m_scopeVis->start();
}
void SpectrumScopeComboVis::stop()
2017-01-29 13:51:45 -05:00
{
m_spectrumVis->stop();
m_scopeVis->stop();
}
bool SpectrumScopeComboVis::handleMessage(const Message& message)
2017-01-29 13:51:45 -05:00
{
bool spectDone = m_spectrumVis->handleMessage(message);
bool scopeDone = m_scopeVis->handleMessage(message);
return (spectDone || scopeDone);
}