Handle Icom format data transmissions as well as the data bit in my

system.
This commit is contained in:
Jonathan Naylor
2018-05-17 20:32:00 +01:00
parent d60bdc3d6d
commit 56bf6a9aff
6 changed files with 61 additions and 9 deletions
+22
View File
@@ -326,6 +326,23 @@ void CNXDNReflector::run()
std::string callsign = lookup->find(srcId);
LogMessage("Transmission from %s at NXCore to %s%u", callsign.c_str(), grp ? "TG " : "", dstId);
nxCoreActive = true;
}
}
if ((buffer[0U] & 0xF0U) == 0x90U && buffer[2U] == 0x09U) {
bool tempGrp = (buffer[4U] & 0x20U) == 0x20U;
unsigned short tempSrcId = (buffer[5U] << 8) | buffer[6U];
unsigned short tempDstId = (buffer[7U] << 8) | buffer[8U];
if (tempGrp && tempDstId == tg) {
// Save the grp, src and dest for use in the NXDN Protocol messages
grp = tempGrp;
srcId = tempSrcId;
dstId = tempDstId;
std::string callsign = lookup->find(srcId);
LogMessage("Transmission from %s at NXCore to %s%u", callsign.c_str(), grp ? "TG " : "", dstId);
nxCoreActive = true;
}
}
@@ -345,6 +362,11 @@ void CNXDNReflector::run()
nxCoreActive = false;
watchdogTimer.stop();
}
if ((buffer[0U] & 0xF0U) == 0x90U && buffer[2U] == 0x08U) {
LogMessage("Received end of transmission");
nxCoreActive = false;
watchdogTimer.stop();
}
}
}
}