Skip to content

Commit c6ad0b0

Browse files
committed
alter when processData() is called when we are transitioned into a P25RXS_DATA state (for the purposes of efficiency this skips multiple instructions); slightly narrower boxcar 5 window for symbol detection;
1 parent a8b417f commit c6ad0b0

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

IO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const uint16_t RRC_0_2_FILTER_LEN = 42U;
2929
static q15_t BOXCAR_5_FILTER[] = { 12000, 12000, 12000, 12000, 12000, 0 };
3030
#endif
3131
#if defined(P25_RX_NARROW_BOXCAR)
32-
static q15_t BOXCAR_5_FILTER[] = { 9600, 9600, 9600, 9600, 9600, 0 };
32+
static q15_t BOXCAR_5_FILTER[] = { 8000, 8000, 8000, 8000, 8000, 0 };
3333
#endif
3434
const uint16_t BOXCAR_5_FILTER_LEN = 6U;
3535

p25/P25RX.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ void P25RX::processSample(q15_t sample)
328328
}
329329
}
330330

331+
if (m_state == P25RXS_DATA) {
332+
processData(sample);
333+
return;
334+
}
335+
331336
// late entry?
332337
if (!m_lduSyncPos) {
333338
m_minSyncPtr = m_syncPtr + P25_LDU_FRAME_LENGTH_SAMPLES - 1U;
@@ -349,10 +354,6 @@ void P25RX::processSample(q15_t sample)
349354
if (m_state == P25RXS_VOICE) {
350355
processVoice(sample);
351356
}
352-
353-
if (m_state == P25RXS_DATA) {
354-
processData(sample);
355-
}
356357
}
357358
}
358359

@@ -512,7 +513,7 @@ void P25RX::processData(q15_t sample)
512513
reset();
513514
}
514515
else {
515-
// calculateLevels(m_lduStartPtr, P25_PDU_FRAME_LENGTH_SYMBOLS);
516+
// calculateLevels(m_startPtr, P25_PDU_FRAME_LENGTH_SYMBOLS);
516517

517518
DEBUG4("P25RX::processData() sync found in PDU pos/centre/threshold", m_syncPtr, m_centreVal, m_thresholdVal);
518519

p25/P25RX.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ namespace p25
124124
*/
125125
void processVoice(q15_t sample);
126126
/**
127-
* @brief Helper to process PDU P25 samples.
128-
* @param sample
127+
* @brief Helper to write a LDU data frame.
129128
*/
130-
void processData(q15_t sample);
129+
void writeLDUFrame();
131130

132131
/**
133-
* @brief Helper to write a LDU data frame.
132+
* @brief Helper to process PDU P25 samples.
133+
* @param sample
134134
*/
135-
void writeLDUFrame();
135+
void processData(q15_t sample);
136136

137137
/**
138138
* @brief Frame synchronization correlator.

0 commit comments

Comments
 (0)