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
+2 -20
View File
@@ -64,8 +64,7 @@ m_colorCode(0U),
m_delay(0U),
m_state(DMRRXS_NONE),
m_n(0U),
m_type(0U),
m_scale(SCALING_FACTOR)
m_type(0U)
{
}
@@ -274,7 +273,7 @@ void CDMRSlotRX::correlateSync(bool first)
if (corr > m_maxCorr) {
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);
uint8_t sync[DMR_SYNC_BYTES_LENGTH];
@@ -375,20 +374,3 @@ void CDMRSlotRX::setDelay(uint8_t delay)
m_delay = delay;
}
void CDMRSlotRX::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("DMRSlotRX: Scale", m_scale);
}