Set the FICH on received network data.

This commit is contained in:
Jonathan Naylor 2016-05-17 06:30:59 +01:00
parent ac4d8af0d2
commit 7ad26a18f2
2 changed files with 15 additions and 2 deletions

View file

@ -171,7 +171,9 @@ bool CDStarControl::writeModem(unsigned char *data)
m_rfHeader = header;
m_holdoffTimer.stop();
if (m_netState == RS_NET_IDLE)
m_holdoffTimer.stop();
m_ackTimer.stop();
m_rfBits = 1U;

View file

@ -77,11 +77,13 @@ bool CYSFControl::writeModem(unsigned char *data)
if (fi == YSF_FI_TERMINATOR)
return false;
if (m_netState == RS_NET_IDLE)
m_holdoffTimer.stop();
m_rfFrames = 0U;
m_rfErrs = 0U;
m_rfBits = 1U;
m_rfTimeoutTimer.start();
m_holdoffTimer.stop();
m_payload.reset();
m_rfState = RS_RF_AUDIO;
#if defined(DUMP_YSF)
@ -352,6 +354,15 @@ void CYSFControl::writeNetwork()
m_netFrames++;
CYSFFICH fich;
bool valid = fich.decode(data + 2U);
if (valid) {
// XXX Should set the downlink callsign
fich.setVoIP(true);
fich.setMR(YSF_MR_NOT_BUSY);
fich.encode(data + 2U);
}
writeQueueNet(data);
if (data[0U] == TAG_EOT) {