mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-05 08:21:16 -05:00
GLScope: fixed trace history size bug and set it to 32 positions (2^5)
This commit is contained in:
parent
3eec09a01f
commit
0d9905c482
@ -82,7 +82,7 @@ public:
|
||||
Mode getDataMode() const { return m_mode; }
|
||||
void connectTimer(const QTimer& timer);
|
||||
|
||||
static const int m_memHistorySizeLog2 = 4;
|
||||
static const int m_memHistorySizeLog2 = 5;
|
||||
|
||||
signals:
|
||||
void traceSizeChanged(int);
|
||||
@ -100,7 +100,7 @@ private:
|
||||
|
||||
// traces
|
||||
std::vector<Complex> m_rawTrace[1<<m_memHistorySizeLog2];
|
||||
int m_sampleRates[16];
|
||||
int m_sampleRates[1<<m_memHistorySizeLog2];
|
||||
BitfieldIndex<m_memHistorySizeLog2> m_memTraceIndex; //!< current index of trace being written
|
||||
BitfieldIndex<m_memHistorySizeLog2> m_memTraceHistory; //!< trace index shift into history
|
||||
int m_memTraceIndexMax;
|
||||
|
@ -96,7 +96,7 @@ private slots:
|
||||
void on_traceIntensity_valueChanged(int index);
|
||||
void on_trigPre_valueChanged(int value);
|
||||
void on_trigDelay_valueChanged(int value);
|
||||
void on_memHistory_valueChanged(int value);
|
||||
void on_memIndex_valueChanged(int value);
|
||||
void on_trigCount_valueChanged(int value);
|
||||
void on_trigIndex_valueChanged(int value);
|
||||
|
||||
|
@ -12,9 +12,9 @@ const qreal GLScopeGUI::amps[11] = { 0.2, 0.1, 0.05, 0.02, 0.01, 0.005, 0.002, 0
|
||||
GLScopeGUI::GLScopeGUI(QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::GLScopeGUI),
|
||||
m_messageQueue(NULL),
|
||||
m_scopeVis(NULL),
|
||||
m_glScope(NULL),
|
||||
m_messageQueue(0),
|
||||
m_scopeVis(0),
|
||||
m_glScope(0),
|
||||
m_sampleRate(1),
|
||||
m_displayData(GLScope::ModeIQ),
|
||||
m_displayOrientation(Qt::Horizontal),
|
||||
@ -57,7 +57,7 @@ void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVis* scopeVis, GLSc
|
||||
m_messageQueue = messageQueue;
|
||||
m_scopeVis = scopeVis;
|
||||
m_glScope = glScope;
|
||||
ui->memHistory->setMaximum((1<<GLScope::m_memHistorySizeLog2)-1);
|
||||
ui->memIndex->setMaximum((1<<GLScope::m_memHistorySizeLog2)-1);
|
||||
connect(m_glScope, SIGNAL(traceSizeChanged(int)), this, SLOT(on_scope_traceSizeChanged(int)));
|
||||
connect(m_glScope, SIGNAL(sampleRateChanged(int)), this, SLOT(on_scope_sampleRateChanged(int)));
|
||||
applySettings();
|
||||
@ -741,7 +741,7 @@ void GLScopeGUI::on_gridIntensity_valueChanged(int index)
|
||||
{
|
||||
m_displayGridIntensity = index;
|
||||
ui->gridIntensity->setToolTip(QString("Grid intensity: %1").arg(m_displayGridIntensity));
|
||||
if(m_glScope != NULL)
|
||||
if(m_glScope != 0)
|
||||
m_glScope->setDisplayGridIntensity(m_displayGridIntensity);
|
||||
}
|
||||
|
||||
@ -749,7 +749,7 @@ void GLScopeGUI::on_traceIntensity_valueChanged(int index)
|
||||
{
|
||||
m_displayTraceIntensity = index;
|
||||
ui->traceIntensity->setToolTip(QString("Trace intensity: %1").arg(m_displayTraceIntensity));
|
||||
if(m_glScope != NULL)
|
||||
if(m_glScope != 0)
|
||||
m_glScope->setDisplayTraceIntensity(m_displayTraceIntensity);
|
||||
}
|
||||
|
||||
@ -774,15 +774,15 @@ void GLScopeGUI::on_trigLevelFine_valueChanged(int value)
|
||||
applyTriggerSettings();
|
||||
}
|
||||
|
||||
void GLScopeGUI::on_memHistory_valueChanged(int value)
|
||||
void GLScopeGUI::on_memIndex_valueChanged(int value)
|
||||
{
|
||||
QString text;
|
||||
text.sprintf("%02d", value % (1<<GLScope::m_memHistorySizeLog2));
|
||||
ui->memIndexText->setText(text);
|
||||
|
||||
if(m_glScope != NULL)
|
||||
if(m_glScope != 0)
|
||||
{
|
||||
m_glScope->setMemHistoryShift(value % (1<<GLScope::m_memHistorySizeLog2));
|
||||
m_glScope->setMemHistoryShift(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -433,7 +433,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDial" name="memHistory">
|
||||
<widget class="QDial" name="memIndex">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
|
Loading…
Reference in New Issue
Block a user