mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
New scope: set trace length display to two decimals precision
This commit is contained in:
parent
91377b8a59
commit
07078fa913
@ -833,13 +833,13 @@ void GLScopeNGGUI::setTraceLenDisplay()
|
||||
double t = (m_glScope->getTraceSize() * 1.0 / m_sampleRate);
|
||||
|
||||
if(t < 0.000001)
|
||||
ui->traceLenText->setText(tr("%1\nns").arg(t * 1000000000.0));
|
||||
ui->traceLenText->setText(tr("%1\nns").arg(t * 1000000000.0, 0, 'f', 2));
|
||||
else if(t < 0.001)
|
||||
ui->traceLenText->setText(tr("%1\nµs").arg(t * 1000000.0));
|
||||
ui->traceLenText->setText(tr("%1\nµs").arg(t * 1000000.0, 0, 'f', 2));
|
||||
else if(t < 1.0)
|
||||
ui->traceLenText->setText(tr("%1\nms").arg(t * 1000.0));
|
||||
ui->traceLenText->setText(tr("%1\nms").arg(t * 1000.0, 0, 'f', 2));
|
||||
else
|
||||
ui->traceLenText->setText(tr("%1\ns").arg(t * 1.0));
|
||||
ui->traceLenText->setText(tr("%1\ns").arg(t * 1.0, 0, 'f', 2));
|
||||
}
|
||||
|
||||
void GLScopeNGGUI::setTimeOfsDisplay()
|
||||
|
Loading…
Reference in New Issue
Block a user