mirror of https://github.com/g4klx/MMDVM.git
Forgot the Q31 to Q15 conversion.
This commit is contained in:
parent
f195fd6f66
commit
e6adc0a296
|
@ -304,11 +304,13 @@ void CDStarRX::samples(q15_t* samples, const uint16_t* rssi, uint8_t length)
|
|||
dcLevel += dcVals[i];
|
||||
dcLevel /= length;
|
||||
|
||||
q15_t offset = q15_t(__SSAT((dcLevel >> 16), 16));
|
||||
|
||||
for (uint16_t i = 0U; i < length; i++) {
|
||||
m_rssiAccum += rssi[i];
|
||||
m_rssiCount++;
|
||||
|
||||
q15_t sample = samples[i] - dcLevel;
|
||||
q15_t sample = samples[i] - offset;
|
||||
|
||||
m_bitBuffer[m_bitPtr] <<= 1;
|
||||
if (sample < 0)
|
||||
|
|
Loading…
Reference in New Issue