mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-23 00:35:53 +08:00
Fix silly sequence number bug.
This commit is contained in:
@@ -222,8 +222,6 @@ bool CDStarControl::writeModem(unsigned char *data)
|
||||
if (m_rfN == 0U)
|
||||
CSync::addDStarSync(data + 1U);
|
||||
|
||||
m_rfN = (m_rfN + 1U) % 21U;
|
||||
|
||||
LogDebug("D-Star, audio sequence no. %u, errs: %u/48", m_rfN, errors);
|
||||
|
||||
if (m_net)
|
||||
@@ -233,6 +231,8 @@ bool CDStarControl::writeModem(unsigned char *data)
|
||||
blankDTMF(data + 1U);
|
||||
writeQueueDataRF(data);
|
||||
}
|
||||
|
||||
m_rfN = (m_rfN + 1U) % 21U;
|
||||
} else if (m_rfState == RS_RF_LATE_ENTRY) {
|
||||
// The sync is regenerated by the modem so can do exact match
|
||||
if (::memcmp(data + 1U + DSTAR_VOICE_FRAME_LENGTH_BYTES, DSTAR_SYNC_BYTES, DSTAR_DATA_FRAME_LENGTH_BYTES) == 0) {
|
||||
@@ -321,8 +321,6 @@ bool CDStarControl::writeModem(unsigned char *data)
|
||||
m_rfErrs += errors;
|
||||
m_rfBits += 48U;
|
||||
|
||||
m_rfN = (m_rfN + 1U) % 21U;
|
||||
|
||||
LogDebug("D-Star, audio sequence no. %u, errs: %u/48", m_rfN, errors);
|
||||
|
||||
if (m_net)
|
||||
@@ -335,6 +333,8 @@ bool CDStarControl::writeModem(unsigned char *data)
|
||||
|
||||
m_rfState = RS_RF_AUDIO;
|
||||
|
||||
m_rfN = (m_rfN + 1U) % 21U;
|
||||
|
||||
if (m_netState == RS_NET_IDLE)
|
||||
m_display->writeDStar((char*)my1, (char*)my2, (char*)your);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user