Reset outgoing DG-IDs to zero for compatibility reasons.

This commit is contained in:
Jonathan Naylor 2020-08-20 09:23:14 +01:00
parent 70f956a0df
commit e6a196f3a7
9 changed files with 16 additions and 11 deletions

View file

@ -370,8 +370,13 @@ int CDGIdGateway::run()
if (currentDGId != 0U && dgIdNetwork[currentDGId] != NULL) {
// Only allow the wanted modes through
if ((dgIdNetwork[currentDGId]->m_modes & dt) != 0U)
dgIdNetwork[currentDGId]->write(currentDGId, buffer);
if ((dgIdNetwork[currentDGId]->m_modes & dt) != 0U) {
// Set the DG-ID to zero for compatibility
fich.setDGId(0U);
fich.encode(buffer + 35U);
dgIdNetwork[currentDGId]->write(currentDGId, dt, buffer);
}
inactivityTimer.setTimeout(dgIdNetwork[currentDGId]->m_rfHangTime);
inactivityTimer.start();
@ -396,7 +401,7 @@ int CDGIdGateway::run()
fich.setDGId(i);
fich.encode(buffer + 35U);
rptNetwork.write(0U, buffer);
rptNetwork.write(0U, 0U, buffer);
inactivityTimer.setTimeout(dgIdNetwork[i]->m_netHangTime);
inactivityTimer.start();