Detect DAC overflows.

This commit is contained in:
Jonathan Naylor
2016-06-09 19:51:23 +01:00
parent ee93e4ce43
commit 89fa0a0c8d
3 changed files with 13 additions and 19 deletions

View File

@@ -362,6 +362,8 @@ void CYSFControl::writeNetwork()
m_networkWatchdog.start();
bool gateway = ::memcmp(data + 4U, "GATEWAY ", YSF_CALLSIGN_LENGTH) == 0;
if (!m_netTimeoutTimer.isRunning()) {
if (::memcmp(data + 14U, " ", YSF_CALLSIGN_LENGTH) != 0)
::memcpy(m_netSource, data + 14U, YSF_CALLSIGN_LENGTH);
@@ -403,7 +405,7 @@ void CYSFControl::writeNetwork()
m_netFrames++;
bool end = data[34U] == 0x01U;
bool end = (data[34U] & 0x01U) == 0x01U;
data[33U] = end ? TAG_EOT : TAG_DATA;
data[34U] = 0x00U;