1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-07 16:34:45 -04:00

SSB demod: show LSB and DSB values appropriately

This commit is contained in:
f4exb
2017-07-22 04:23:10 +02:00
parent dd4ab0f0b5
commit de74f27c9a
5 changed files with 79 additions and 56 deletions
+9 -5
View File
@@ -29,9 +29,12 @@ static double trunc(double d)
QString ScaleEngine::formatTick(double value, int decimalPlaces, bool fancyTime)
{
if((m_physicalUnit != Unit::Time) || (!fancyTime) || 1) {
return QString("%1").arg(value, 0, 'f', decimalPlaces);
} else {
if((m_physicalUnit != Unit::Time) || (!fancyTime) || 1)
{
return QString("%1").arg(m_makeOpposite ? -value : value, 0, 'f', decimalPlaces);
}
else
{
QString str;
double orig = fabs(value);
double tmp;
@@ -60,7 +63,7 @@ QString ScaleEngine::formatTick(double value, int decimalPlaces, bool fancyTime)
value *= -1.0;
}
tmp = value;
tmp = m_makeOpposite ? -value : value;
str += QString("%1").arg(tmp, 2, 'f', decimalPlaces, QChar('0'));
return str;
@@ -496,7 +499,8 @@ ScaleEngine::ScaleEngine() :
m_majorTickValueDistance(1.0),
m_firstMajorTickValue(1.0),
m_numMinorTicks(1),
m_decimalPlaces(1)
m_decimalPlaces(1),
m_makeOpposite(false)
{
}