1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-05 08:21:16 -05:00

New scope: fixed and enhance trigger delay

This commit is contained in:
f4exb 2017-02-09 22:22:56 +01:00
parent 1f37bcf3de
commit b8e3d60110
3 changed files with 58 additions and 14 deletions

View File

@ -343,7 +343,13 @@ void GLScopeNGGUI::on_trigLevelFine_valueChanged(int value)
changeCurrentTrigger();
}
void GLScopeNGGUI::on_trigDelay_valueChanged(int value)
void GLScopeNGGUI::on_trigDelayCoarse_valueChanged(int value)
{
setTrigDelayDisplay();
changeCurrentTrigger();
}
void GLScopeNGGUI::on_trigDelayFine_valueChanged(int value)
{
setTrigDelayDisplay();
changeCurrentTrigger();
@ -558,7 +564,8 @@ void GLScopeNGGUI::setTrigLevelDisplay()
void GLScopeNGGUI::setTrigDelayDisplay()
{
unsigned int n_samples_delay = m_traceLenMult * ScopeVisNG::m_traceChunkSize * ui->trigDelay->value();
double delayMult = ui->trigDelayCoarse->value() + ui->trigDelayFine->value() / 100.0;
unsigned int n_samples_delay = m_traceLenMult * ScopeVisNG::m_traceChunkSize * delayMult;
if (n_samples_delay < 1000) {
ui->trigDelayText->setToolTip(tr("%1S").arg(n_samples_delay));
@ -644,8 +651,9 @@ void GLScopeNGGUI::fillTriggerData(ScopeVisNG::TriggerData& triggerData)
triggerData.m_triggerLevel = (ui->trigLevelCoarse->value() / 100.0) + (ui->trigLevelFine->value() / 20000.0);
triggerData.m_triggerPositiveEdge = ui->trigPos->isChecked();
triggerData.m_triggerBothEdges = ui->trigBoth->isChecked();
triggerData.m_triggerDelay = ui->trigDelay->value();
triggerData.m_triggerRepeat = ui->trigCount->value();
double delayMult = ui->trigDelayCoarse->value() + ui->trigDelayFine->value() / 100.0;
triggerData.m_triggerDelay = (int) (m_traceLenMult * ScopeVisNG::m_traceChunkSize * delayMult);
}
void GLScopeNGGUI::applySettings()

View File

@ -113,7 +113,8 @@ private slots:
void on_trigBoth_toggled(bool checked);
void on_trigLevelCoarse_valueChanged(int value);
void on_trigLevelFine_valueChanged(int value);
void on_trigDelay_valueChanged(int value);
void on_trigDelayCoarse_valueChanged(int value);
void on_trigDelayFine_valueChanged(int value);
void on_trigPre_valueChanged(int value);
void on_trigOneShot_toggled(bool checked);
void on_freerun_toggled(bool checked);

View File

@ -1386,9 +1386,26 @@ kS/s</string>
</widget>
</item>
<item>
<widget class="QSlider" name="trigDelay">
<layout class="QVBoxLayout" name="trigDelayLayout">
<property name="spacing">
<number>2</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QSlider" name="trigDelayCoarse">
<property name="toolTip">
<string>Trigger delay</string>
<string>Trigger delay coarse (trace length multiplier)</string>
</property>
<property name="maximum">
<number>100</number>
@ -1401,6 +1418,24 @@ kS/s</string>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="trigDelayFine">
<property name="toolTip">
<string>Trigger delay fine (trace length divider)</string>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line_14">
<property name="orientation">