mirror of https://github.com/g4klx/MMDVM.git
Merge remote-tracking branch 'g4klx/master'
This commit is contained in:
commit
4f516a827f
|
@ -41,10 +41,10 @@ const q15_t DMR_LEVELB = 963;
|
|||
const q15_t DMR_LEVELC = -963;
|
||||
const q15_t DMR_LEVELD = -2889;
|
||||
|
||||
// The PR FILL and Data Sync pattern.
|
||||
// The PR FILL and MS Data Sync pattern.
|
||||
const uint8_t IDLE_DATA[] =
|
||||
{0x53U, 0xC2U, 0x5EU, 0xABU, 0xA8U, 0x67U, 0x1DU, 0xC7U, 0x38U, 0x3BU, 0xD9U,
|
||||
0x36U, 0x00U, 0x0DU, 0xFFU, 0x57U, 0xD7U, 0x5DU, 0xF5U, 0xD0U, 0x03U, 0xF6U,
|
||||
0x36U, 0x00U, 0x0DU, 0x5DU, 0x7FU, 0x77U, 0xFDU, 0x75U, 0x70U, 0x03U, 0xF6U,
|
||||
0xE4U, 0x65U, 0x17U, 0x1BU, 0x48U, 0xCAU, 0x6DU, 0x4FU, 0xC6U, 0x10U, 0xB4U};
|
||||
|
||||
const uint8_t CACH_INTERLEAVE[] =
|
||||
|
|
|
@ -41,7 +41,7 @@ const q15_t DMR_LEVELB = 963;
|
|||
const q15_t DMR_LEVELC = -963;
|
||||
const q15_t DMR_LEVELD = -2889;
|
||||
|
||||
// The PR FILL and Data Sync pattern.
|
||||
// The PR FILL and BS Data Sync pattern.
|
||||
const uint8_t IDLE_DATA[] =
|
||||
{0x53U, 0xC2U, 0x5EU, 0xABU, 0xA8U, 0x67U, 0x1DU, 0xC7U, 0x38U, 0x3BU, 0xD9U,
|
||||
0x36U, 0x00U, 0x0DU, 0xFFU, 0x57U, 0xD7U, 0x5DU, 0xF5U, 0xD0U, 0x03U, 0xF6U,
|
||||
|
|
22
DStarRX.cpp
22
DStarRX.cpp
|
@ -262,14 +262,16 @@ m_pathMemory2(),
|
|||
m_pathMemory3(),
|
||||
m_fecOutput(),
|
||||
m_rssiAccum(0U),
|
||||
m_rssiCount(0U)
|
||||
m_rssiCount(0U),
|
||||
m_dcFilter(),
|
||||
m_dcState()
|
||||
{
|
||||
::memset(m_DCState, 0x00U, 4U * sizeof(q15_t));
|
||||
::memset(m_dcState, 0x00U, 4U * sizeof(q15_t));
|
||||
|
||||
m_DCFilter.numStages = DC_FILTER_STAGES;
|
||||
m_DCFilter.pState = m_DCState;
|
||||
m_DCFilter.pCoeffs = DC_FILTER;
|
||||
m_DCFilter.postShift = 0;
|
||||
m_dcFilter.numStages = DC_FILTER_STAGES;
|
||||
m_dcFilter.pState = m_dcState;
|
||||
m_dcFilter.pCoeffs = DC_FILTER;
|
||||
m_dcFilter.postShift = 0;
|
||||
}
|
||||
|
||||
void CDStarRX::reset()
|
||||
|
@ -287,12 +289,12 @@ void CDStarRX::reset()
|
|||
void CDStarRX::samples(const q15_t* samples, const uint16_t* rssi, uint8_t length)
|
||||
{
|
||||
q31_t dc_level = 0;
|
||||
q15_t DCVals[20];
|
||||
q15_t dcVals[20];
|
||||
|
||||
::arm_biquad_cascade_df1_q15(&m_DCFilter, (q15_t*)samples, DCVals, length);
|
||||
::arm_biquad_cascade_df1_q15(&m_dcFilter, (q15_t*)samples, dcVals, length);
|
||||
|
||||
for (uint8_t i = 0U; i < length; i++)
|
||||
dc_level += (q31_t)DCVals[i];
|
||||
dc_level += q31_t(dcVals[i]);
|
||||
|
||||
dc_level /= length;
|
||||
|
||||
|
@ -300,7 +302,7 @@ void CDStarRX::samples(const q15_t* samples, const uint16_t* rssi, uint8_t lengt
|
|||
m_rssiAccum += rssi[i];
|
||||
m_rssiCount++;
|
||||
|
||||
bool bit = samples[i] < (q15_t)dc_level;
|
||||
bool bit = samples[i] < q15_t(dc_level);
|
||||
|
||||
if (bit != m_prev) {
|
||||
if (m_pll < (PLLMAX / 2U))
|
||||
|
|
Loading…
Reference in New Issue