mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-06 16:05:13 -04:00
Print scale on scope part #1
This commit is contained in:
@@ -158,6 +158,7 @@ void ScaleEngine::calcScaleFactor()
|
||||
|
||||
case Unit::AngleDegrees:
|
||||
m_unitStr = QString("°");
|
||||
break;
|
||||
|
||||
case Unit::Time:
|
||||
if(median < 0.001) {
|
||||
@@ -170,6 +171,24 @@ void ScaleEngine::calcScaleFactor()
|
||||
m_unitStr = QString("s");
|
||||
}
|
||||
break;
|
||||
|
||||
case Unit::Volt:
|
||||
if (median < 1e-9) {
|
||||
m_unitStr = QString("pV");
|
||||
m_scale = 1e-12;
|
||||
} else if (median < 1e-6) {
|
||||
m_unitStr = QString("nV");
|
||||
m_scale = 1e-9;
|
||||
} else if (median < 1e-3) {
|
||||
m_unitStr = QString("µV");
|
||||
m_scale = 1e-6;
|
||||
} else if (median < 1.0) {
|
||||
m_unitStr = QString("mV");
|
||||
m_scale = 1e-3;
|
||||
} else {
|
||||
m_unitStr = QString("V");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user