Remove the OscOffset parameter.

This commit is contained in:
Jonathan Naylor 2017-03-07 20:41:54 +00:00
parent a9b761d1dc
commit df1210eaea
16 changed files with 61 additions and 227 deletions

View file

@ -49,8 +49,7 @@ m_modState(),
m_poBuffer(),
m_poLen(0U),
m_poPtr(0U),
m_txDelay(240U), // 200ms
m_count(0U)
m_txDelay(240U) // 200ms
{
::memset(m_modState, 0x00U, 70U * sizeof(q15_t));
@ -112,8 +111,8 @@ uint8_t CDMRDMOTX::writeData(const uint8_t* data, uint8_t length)
void CDMRDMOTX::writeByte(uint8_t c)
{
q15_t inBuffer[DMR_RADIO_SYMBOL_LENGTH * 4U + 1U];
q15_t outBuffer[DMR_RADIO_SYMBOL_LENGTH * 4U + 1U];
q15_t inBuffer[DMR_RADIO_SYMBOL_LENGTH * 4U];
q15_t outBuffer[DMR_RADIO_SYMBOL_LENGTH * 4U];
const uint8_t MASK = 0xC0U;
@ -135,27 +134,9 @@ void CDMRDMOTX::writeByte(uint8_t c)
}
}
uint16_t blockSize = DMR_RADIO_SYMBOL_LENGTH * 4U;
::arm_fir_fast_q15(&m_modFilter, inBuffer, outBuffer, DMR_RADIO_SYMBOL_LENGTH * 4U);
// Handle the case of the oscillator not being accurate enough
if (m_sampleCount > 0U) {
m_count += DMR_RADIO_SYMBOL_LENGTH * 4U;
if (m_count >= m_sampleCount) {
if (m_sampleInsert) {
inBuffer[DMR_RADIO_SYMBOL_LENGTH * 4U] = inBuffer[DMR_RADIO_SYMBOL_LENGTH * 4U - 1U];
blockSize++;
} else {
blockSize--;
}
m_count -= m_sampleCount;
}
}
::arm_fir_fast_q15(&m_modFilter, inBuffer, outBuffer, blockSize);
io.write(STATE_DMR, outBuffer, blockSize);
io.write(STATE_DMR, outBuffer, DMR_RADIO_SYMBOL_LENGTH * 4U);
}
uint8_t CDMRDMOTX::getSpace() const