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

@ -114,7 +114,7 @@ typedef unsigned long long ulong64_t;
#define FORCE_UHF_INTERAL_L #define FORCE_UHF_INTERAL_L
// Alternate P25 Deviation Levels // Alternate P25 Deviation Levels
//#define P25_ALTERNATE_DEV_LEVEL // #define P25_ALTERNATE_DEV_LEVEL
// Pass RSSI information to the host // Pass RSSI information to the host
// #define SEND_RSSI_DATA // #define SEND_RSSI_DATA

@ -201,14 +201,10 @@ void P25RX::processBit(bool bit)
} }
} }
if (m_state == P25RXS_VOICE) { if (m_state == P25RXS_SYNC) {
m_lostCount = MAX_SYNC_FRAMES; // only search for a sync in the right place +-2 bits
processVoice(bit); if (m_dataPtr >= (P25_SYNC_LENGTH_BITS - 2U) && m_dataPtr <= (P25_SYNC_LENGTH_BITS + 2U)) {
} correlateSync();
if (m_state == P25RXS_DATA) {
m_lostCount = MAX_SYNC_FRAMES;
processData(bit);
} }
// since we aren't processing voice or data -- simply wait till we've reached the end pointer // since we aren't processing voice or data -- simply wait till we've reached the end pointer
@ -223,6 +219,18 @@ void P25RX::processBit(bool bit)
serial.writeP25Data(frame, (m_endPtr / 8U) + 1U); serial.writeP25Data(frame, (m_endPtr / 8U) + 1U);
reset(); 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> /// <summary>

Loading…
Cancel
Save

Powered by TurnKey Linux.