SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
spectrumscopecombovis.cpp
Go to the documentation of this file.
2 #include "dsp/dspcommands.h"
3 #include "dsp/scopevis.h"
4 #include "util/messagequeue.h"
5 
7  m_spectrumVis(spectrumVis),
8  m_scopeVis(scopeVis)
9 {
10  setObjectName("SpectrumScopeComboVis");
11 }
12 
14 {
15 }
16 
17 void SpectrumScopeComboVis::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly)
18 {
19  (void) positiveOnly;
20  m_scopeVis->feed(begin, end, false);
21  //SampleVector::const_iterator triggerPoint = m_scopeVis->getTriggerPoint();
22  //m_spectrumVis->feedTriggered(triggerPoint, end, positiveOnly);
23  int triggerPointLocation = m_scopeVis->getTriggerLocation();
24  if ((triggerPointLocation >= 0) && (triggerPointLocation <= end - begin)) {
25  m_spectrumVis->feedTriggered(end - triggerPointLocation, end, positiveOnly);
26  } else {
27  m_spectrumVis->feedTriggered(begin, end, positiveOnly);
28  }
29 }
30 
32 {
34  m_scopeVis->start();
35 }
36 
38 {
40  m_scopeVis->stop();
41 }
42 
44 {
45  bool spectDone = m_spectrumVis->handleMessage(message);
46  bool scopeDone = m_scopeVis->handleMessage(message);
47 
48  return (spectDone || scopeDone);
49 }
virtual void feed(const SampleVector::const_iterator &begin, const SampleVector::const_iterator &end, bool positiveOnly)
virtual bool handleMessage(const Message &message)
Processing of a message. Returns true if message has actually been processed.
virtual void feed(const SampleVector::const_iterator &begin, const SampleVector::const_iterator &end, bool positiveOnly)
Definition: scopevis.cpp:221
int getTriggerLocation() const
Definition: scopevis.h:247
virtual void stop()
virtual bool handleMessage(const Message &message)
Processing of a message. Returns true if message has actually been processed.
virtual void start()
Definition: scopevis.cpp:642
void feedTriggered(const SampleVector::const_iterator &triggerPoint, const SampleVector::const_iterator &end, bool positiveOnly)
Definition: spectrumvis.cpp:56
SpectrumScopeComboVis(SpectrumVis *spectrumVis, ScopeVis *scopeVis)
virtual void stop()
Definition: scopevis.cpp:646
virtual void start()
virtual bool handleMessage(const Message &message)
Processing of a message. Returns true if message has actually been processed.
Definition: scopevis.cpp:650