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:
parent
1f37bcf3de
commit
b8e3d60110
@ -343,12 +343,18 @@ void GLScopeNGGUI::on_trigLevelFine_valueChanged(int value)
|
|||||||
changeCurrentTrigger();
|
changeCurrentTrigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLScopeNGGUI::on_trigDelay_valueChanged(int value)
|
void GLScopeNGGUI::on_trigDelayCoarse_valueChanged(int value)
|
||||||
{
|
{
|
||||||
setTrigDelayDisplay();
|
setTrigDelayDisplay();
|
||||||
changeCurrentTrigger();
|
changeCurrentTrigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GLScopeNGGUI::on_trigDelayFine_valueChanged(int value)
|
||||||
|
{
|
||||||
|
setTrigDelayDisplay();
|
||||||
|
changeCurrentTrigger();
|
||||||
|
}
|
||||||
|
|
||||||
void GLScopeNGGUI::on_trigPre_valueChanged(int value)
|
void GLScopeNGGUI::on_trigPre_valueChanged(int value)
|
||||||
{
|
{
|
||||||
setTrigPreDisplay();
|
setTrigPreDisplay();
|
||||||
@ -558,7 +564,8 @@ void GLScopeNGGUI::setTrigLevelDisplay()
|
|||||||
|
|
||||||
void GLScopeNGGUI::setTrigDelayDisplay()
|
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) {
|
if (n_samples_delay < 1000) {
|
||||||
ui->trigDelayText->setToolTip(tr("%1S").arg(n_samples_delay));
|
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_triggerLevel = (ui->trigLevelCoarse->value() / 100.0) + (ui->trigLevelFine->value() / 20000.0);
|
||||||
triggerData.m_triggerPositiveEdge = ui->trigPos->isChecked();
|
triggerData.m_triggerPositiveEdge = ui->trigPos->isChecked();
|
||||||
triggerData.m_triggerBothEdges = ui->trigBoth->isChecked();
|
triggerData.m_triggerBothEdges = ui->trigBoth->isChecked();
|
||||||
triggerData.m_triggerDelay = ui->trigDelay->value();
|
|
||||||
triggerData.m_triggerRepeat = ui->trigCount->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()
|
void GLScopeNGGUI::applySettings()
|
||||||
|
@ -113,7 +113,8 @@ private slots:
|
|||||||
void on_trigBoth_toggled(bool checked);
|
void on_trigBoth_toggled(bool checked);
|
||||||
void on_trigLevelCoarse_valueChanged(int value);
|
void on_trigLevelCoarse_valueChanged(int value);
|
||||||
void on_trigLevelFine_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_trigPre_valueChanged(int value);
|
||||||
void on_trigOneShot_toggled(bool checked);
|
void on_trigOneShot_toggled(bool checked);
|
||||||
void on_freerun_toggled(bool checked);
|
void on_freerun_toggled(bool checked);
|
||||||
|
@ -1386,20 +1386,55 @@ kS/s</string>
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSlider" name="trigDelay">
|
<layout class="QVBoxLayout" name="trigDelayLayout">
|
||||||
<property name="toolTip">
|
<property name="spacing">
|
||||||
<string>Trigger delay</string>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="leftMargin">
|
||||||
<number>100</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="pageStep">
|
<property name="topMargin">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="orientation">
|
<property name="rightMargin">
|
||||||
<enum>Qt::Horizontal</enum>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QSlider" name="trigDelayCoarse">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Trigger delay coarse (trace length multiplier)</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>
|
||||||
|
<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>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line_14">
|
<widget class="Line" name="line_14">
|
||||||
|
Loading…
Reference in New Issue
Block a user