DSD demod: GUI scope simplification (2)

This commit is contained in:
f4exb 2018-03-12 05:23:09 +01:00
parent de68eb360f
commit 1728f91d15
6 changed files with 20 additions and 82 deletions

View File

@ -53,7 +53,6 @@ DSDDemod::DSDDemod(DeviceSourceAPI *deviceAPI) :
m_squelchOpen(false), m_squelchOpen(false),
m_audioFifo1(48000), m_audioFifo1(48000),
m_audioFifo2(48000), m_audioFifo2(48000),
m_scope(0),
m_scopeXY(0), m_scopeXY(0),
m_scopeEnabled(true), m_scopeEnabled(true),
m_dsdDecoder(), m_dsdDecoder(),
@ -310,12 +309,6 @@ void DSDDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
// } // }
} }
if ((m_scope != 0) && (m_scopeEnabled))
{
m_scope->feed(m_scopeSampleBuffer.begin(), m_scopeSampleBuffer.end(), true); // true = real samples for what it's worth
}
if ((m_scopeXY != 0) && (m_scopeEnabled)) if ((m_scopeXY != 0) && (m_scopeEnabled))
{ {
m_scopeXY->feed(m_scopeSampleBuffer.begin(), m_scopeSampleBuffer.end(), true); // true = real samples for what it's worth m_scopeXY->feed(m_scopeSampleBuffer.begin(), m_scopeSampleBuffer.end(), true); // true = real samples for what it's worth

View File

@ -93,7 +93,6 @@ public:
DSDDemod(DeviceSourceAPI *deviceAPI); DSDDemod(DeviceSourceAPI *deviceAPI);
~DSDDemod(); ~DSDDemod();
virtual void destroy() { delete this; } virtual void destroy() { delete this; }
void setScopeSink(BasebandSampleSink* sampleSink) { m_scope = sampleSink; }
void setScopeXYSink(BasebandSampleSink* sampleSink) { m_scopeXY = sampleSink; } void setScopeXYSink(BasebandSampleSink* sampleSink) { m_scopeXY = sampleSink; }
void configureMyPosition(MessageQueue* messageQueue, float myLatitude, float myLongitude); void configureMyPosition(MessageQueue* messageQueue, float myLatitude, float myLongitude);
@ -193,7 +192,6 @@ private:
AudioFifo m_audioFifo1; AudioFifo m_audioFifo1;
AudioFifo m_audioFifo2; AudioFifo m_audioFifo2;
BasebandSampleSink* m_scope;
BasebandSampleSink* m_scopeXY; BasebandSampleSink* m_scopeXY;
bool m_scopeEnabled; bool m_scopeEnabled;

View File

@ -282,7 +282,6 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_scopeVis = new ScopeVis(SDR_RX_SCALEF, ui->glScope);
m_scopeVisXY = new ScopeVisXY(ui->screenTV); m_scopeVisXY = new ScopeVisXY(ui->screenTV);
m_scopeVisXY->setScale(2.0); m_scopeVisXY->setScale(2.0);
m_scopeVisXY->setPixelsPerFrame(4001); m_scopeVisXY->setPixelsPerFrame(4001);
@ -298,15 +297,9 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
} }
m_dsdDemod = (DSDDemod*) rxChannel; //new DSDDemod(m_deviceUISet->m_deviceSourceAPI); m_dsdDemod = (DSDDemod*) rxChannel; //new DSDDemod(m_deviceUISet->m_deviceSourceAPI);
m_dsdDemod->setScopeSink(m_scopeVis);
m_dsdDemod->setScopeXYSink(m_scopeVisXY); m_dsdDemod->setScopeXYSink(m_scopeVisXY);
m_dsdDemod->setMessageQueueToGUI(getInputMessageQueue()); m_dsdDemod->setMessageQueueToGUI(getInputMessageQueue());
ui->glScope->setSampleRate(48000);
m_scopeVis->setSampleRate(48000);
ui->glScope->connectTimer(MainWindow::getInstance()->getMasterTimer());
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
ui->audioMute->setStyleSheet("QToolButton { background:rgb(79,79,79); }"); ui->audioMute->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
@ -337,10 +330,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor())); connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
connect(&m_channelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor())); connect(&m_channelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor()));
ui->scopeGUI->setBuddies(m_scopeVis->getInputMessageQueue(), m_scopeVis, ui->glScope);
m_settings.setChannelMarker(&m_channelMarker); m_settings.setChannelMarker(&m_channelMarker);
m_settings.setScopeGUI(ui->scopeGUI);
updateMyPosition(); updateMyPosition();
displaySettings(); displaySettings();
@ -352,7 +342,6 @@ DSDDemodGUI::~DSDDemodGUI()
m_deviceUISet->removeRxChannelInstance(this); m_deviceUISet->removeRxChannelInstance(this);
delete m_dsdDemod; // TODO: check this: when the GUI closes it has to delete the demodulator delete m_dsdDemod; // TODO: check this: when the GUI closes it has to delete the demodulator
delete m_scopeVisXY; delete m_scopeVisXY;
delete m_scopeVis;
delete ui; delete ui;
} }

View File

@ -81,7 +81,6 @@ private:
char m_formatStatusText[82+1]; //!< Fixed signal format dependent status text char m_formatStatusText[82+1]; //!< Fixed signal format dependent status text
SignalFormat m_signalFormat; SignalFormat m_signalFormat;
ScopeVis* m_scopeVis;
ScopeVisXY* m_scopeVisXY; ScopeVisXY* m_scopeVisXY;
DSDDemod* m_dsdDemod; DSDDemod* m_dsdDemod;

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>686</width> <width>686</width>
<height>841</height> <height>397</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -931,14 +931,14 @@
<rect> <rect>
<x>10</x> <x>10</x>
<y>180</y> <y>180</y>
<width>636</width> <width>200</width>
<height>651</height> <height>200</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>636</width> <width>200</width>
<height>0</height> <height>200</height>
</size> </size>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -949,49 +949,20 @@
<number>2</number> <number>2</number>
</property> </property>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <widget class="TVScreen" name="screenTV" native="true">
<item> <property name="sizePolicy">
<widget class="GLScope" name="glScope" native="true"> <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<property name="sizePolicy"> <horstretch>0</horstretch>
<sizepolicy hsizetype="Maximum" vsizetype="Maximum"> <verstretch>0</verstretch>
<horstretch>0</horstretch> </sizepolicy>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="minimumSize">
</property> <size>
<property name="minimumSize"> <width>200</width>
<size> <height>200</height>
<width>432</width> </size>
<height>200</height> </property>
</size> </widget>
</property>
<property name="font">
<font>
<family>Monospace</family>
<pointsize>8</pointsize>
</font>
</property>
</widget>
</item>
<item>
<widget class="TVScreen" name="screenTV" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>200</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="GLScopeGUI" name="scopeGUI" native="true"/>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -1014,18 +985,6 @@
<header>gui/levelmeter.h</header> <header>gui/levelmeter.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>GLScope</class>
<extends>QWidget</extends>
<header>gui/glscope.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>GLScopeGUI</class>
<extends>QWidget</extends>
<header>gui/glscopegui.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>ValueDialZ</class> <class>ValueDialZ</class>
<extends>QWidget</extends> <extends>QWidget</extends>

View File

@ -25,7 +25,7 @@
const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = { const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = {
QString("DSD Demodulator"), QString("DSD Demodulator"),
QString("3.12.0"), QString("3.13.0"),
QString("(c) Edouard Griffiths, F4EXB"), QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"), QString("https://github.com/f4exb/sdrangel"),
true, true,