fix up priority of decoding; attempt to better sync header during non-voice and non-data streams;

pull/4/head 2023-03-22
Bryan Biedenkapp 3 years ago
parent 880dca6062
commit 54fed406d1

@ -201,14 +201,10 @@ void P25RX::processBit(bool bit)
}
}
if (m_state == P25RXS_VOICE) {
m_lostCount = MAX_SYNC_FRAMES;
processVoice(bit);
}
if (m_state == P25RXS_DATA) {
m_lostCount = MAX_SYNC_FRAMES;
processData(bit);
if (m_state == P25RXS_SYNC) {
// only search for a sync in the right place +-2 bits
if (m_dataPtr >= (P25_SYNC_LENGTH_BITS - 2U) && m_dataPtr <= (P25_SYNC_LENGTH_BITS + 2U)) {
correlateSync();
}
// since we aren't processing voice or data -- simply wait till we've reached the end pointer
@ -224,6 +220,18 @@ void P25RX::processBit(bool bit)
reset();
}
}
else {
if (m_state == P25RXS_VOICE) {
m_lostCount = MAX_SYNC_FRAMES;
processVoice(bit);
}
if (m_state == P25RXS_DATA) {
m_lostCount = MAX_SYNC_FRAMES;
processData(bit);
}
}
}
/// <summary>
/// Helper to process LDU P25 bits.

Loading…
Cancel
Save

Powered by TurnKey Linux.