1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-23 00:18:37 -05:00

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_audioFifo1(48000),
m_audioFifo2(48000),
m_scope(0),
m_scopeXY(0),
m_scopeEnabled(true),
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))
{
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();
virtual void destroy() { delete this; }
void setScopeSink(BasebandSampleSink* sampleSink) { m_scope = sampleSink; }
void setScopeXYSink(BasebandSampleSink* sampleSink) { m_scopeXY = sampleSink; }
void configureMyPosition(MessageQueue* messageQueue, float myLatitude, float myLongitude);
@ -193,7 +192,6 @@ private:
AudioFifo m_audioFifo1;
AudioFifo m_audioFifo2;
BasebandSampleSink* m_scope;
BasebandSampleSink* m_scopeXY;
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(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->setScale(2.0);
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->setScopeSink(m_scopeVis);
m_dsdDemod->setScopeXYSink(m_scopeVisXY);
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()));
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(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor()));
ui->scopeGUI->setBuddies(m_scopeVis->getInputMessageQueue(), m_scopeVis, ui->glScope);
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setScopeGUI(ui->scopeGUI);
updateMyPosition();
displaySettings();
@ -352,7 +342,6 @@ DSDDemodGUI::~DSDDemodGUI()
m_deviceUISet->removeRxChannelInstance(this);
delete m_dsdDemod; // TODO: check this: when the GUI closes it has to delete the demodulator
delete m_scopeVisXY;
delete m_scopeVis;
delete ui;
}

View File

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

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>686</width>
<height>841</height>
<height>397</height>
</rect>
</property>
<property name="sizePolicy">
@ -931,14 +931,14 @@
<rect>
<x>10</x>
<y>180</y>
<width>636</width>
<height>651</height>
<width>200</width>
<height>200</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>636</width>
<height>0</height>
<width>200</width>
<height>200</height>
</size>
</property>
<property name="windowTitle">
@ -948,30 +948,6 @@
<property name="margin">
<number>2</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="GLScope" name="glScope" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>432</width>
<height>200</height>
</size>
</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">
@ -989,11 +965,6 @@
</widget>
</item>
</layout>
</item>
<item>
<widget class="GLScopeGUI" name="scopeGUI" native="true"/>
</item>
</layout>
</widget>
</widget>
<customwidgets>
@ -1014,18 +985,6 @@
<header>gui/levelmeter.h</header>
<container>1</container>
</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>
<class>ValueDialZ</class>
<extends>QWidget</extends>

View File

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