1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-22 09:31:10 -05:00

Display actual trigger level for log magnitude and phase

This commit is contained in:
f4exb 2015-07-14 00:53:08 +02:00
parent 8a41edf24d
commit 14d2c87518

View File

@ -179,7 +179,15 @@ void GLScopeGUI::applyTriggerSettings()
void GLScopeGUI::setTrigLevelDisplay()
{
ui->trigText->setText(tr("%1").arg(m_triggerLevel/100.0, 0, 'f', 2));
if (m_triggerChannel == ScopeVis::TriggerMagDb) {
ui->trigText->setText(tr("%1dB").arg(m_triggerLevel - 100.0, 0, 'f', 0));
}
else if (m_triggerChannel == ScopeVis::TriggerPhase) {
ui->trigText->setText(tr("%1°").arg(m_triggerLevel * 1.8, 0, 'f', 0));
}
else {
ui->trigText->setText(tr("%1").arg(m_triggerLevel / 100.0, 0, 'f', 2));
}
}
void GLScopeGUI::setAmpScaleDisplay()
@ -378,6 +386,7 @@ void GLScopeGUI::on_gridIntensity_valueChanged(int index)
void GLScopeGUI::on_trigMode_currentIndexChanged(int index)
{
m_triggerChannel = index;
setTrigLevelDisplay();
applyTriggerSettings();
}