mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-09-28 07:46:37 -04:00
SoapySDR: Support native formats that reports diffrent fullrange values
This commit is contained in:
parent
21255f8d82
commit
45ea4ed243
@ -100,11 +100,13 @@ void SoapySDRInputThread::run()
|
|||||||
|
|
||||||
qDebug("SoapySDRInputThread::run: format: %s fullScale: %f", format.c_str(), fullScale);
|
qDebug("SoapySDRInputThread::run: format: %s fullScale: %f", format.c_str(), fullScale);
|
||||||
|
|
||||||
if ((format == "CS8") && (fullScale == 128.0)) { // 8 bit signed - native
|
// Older version of soapy and it's plugins were incorrectly reporting
|
||||||
|
// (1 << n) instead (1 << n) - 1. Accept both values.
|
||||||
|
if ((format == "CS8") && (fullScale == 127.0 || fullScale == 128.0)) { // 8 bit signed - native
|
||||||
m_decimatorType = Decimator8;
|
m_decimatorType = Decimator8;
|
||||||
} else if ((format == "CS16") && (fullScale == 2048.0)) { // 12 bit signed - native
|
} else if ((format == "CS16") && (fullScale == 2047.0 || fullScale == 2048.0)) { // 12 bit signed - native
|
||||||
m_decimatorType = Decimator12;
|
m_decimatorType = Decimator12;
|
||||||
} else if ((format == "CS16") && (fullScale == 32768.0)) { // 16 bit signed - native
|
} else if ((format == "CS16") && (fullScale == 32767.0 || fullScale == 32768.0 )) { // 16 bit signed - native
|
||||||
m_decimatorType = Decimator16;
|
m_decimatorType = Decimator16;
|
||||||
} else { // for other types make a conversion to float
|
} else { // for other types make a conversion to float
|
||||||
m_decimatorType = DecimatorFloat;
|
m_decimatorType = DecimatorFloat;
|
||||||
|
Loading…
Reference in New Issue
Block a user