Remove the level tweaking functionality.

This commit is contained in:
Jonathan Naylor 2016-07-07 17:37:06 +01:00
parent dcc52ca479
commit 87b6688f8f
15 changed files with 27 additions and 241 deletions

View file

@ -55,8 +55,7 @@ m_bufferPtr(0U),
m_symbolPtr(0U),
m_lostCount(0U),
m_centre(0),
m_threshold(0),
m_scale(SCALING_FACTOR)
m_threshold(0)
{
m_buffer = m_outBuffer + 1U;
}
@ -124,7 +123,7 @@ void CYSFRX::processNone(q15_t sample)
q15_t centre = (max + min) >> 1;
q31_t v1 = (max - centre) * m_scale;
q31_t v1 = (max - centre) * SCALING_FACTOR;
q15_t threshold = q15_t(v1 >> 15);
uint16_t ptr = m_symbolPtr + 1U;
@ -243,20 +242,3 @@ void CYSFRX::processData(q15_t sample)
}
}
void CYSFRX::setThreshold(int8_t percent)
{
q31_t res = SCALING_FACTOR * 1000;
if (percent > 0) {
for (int8_t i = 0; i < percent; i++)
res += SCALING_FACTOR;
} else if (percent < 0) {
for (int8_t i = 0; i < -percent; i++)
res -= SCALING_FACTOR;
}
m_scale = res / 1000;
DEBUG2("YSFRX: Scale", m_scale);
}