Improve D-Star modem overflow logging.

This commit is contained in:
Jonathan Naylor 2016-07-18 17:54:02 +01:00
parent 1a91b26c66
commit c63ce4897e
1 changed files with 8 additions and 1 deletions

View File

@ -390,7 +390,14 @@ void CModem::clock(unsigned int ms)
break;
case MMDVM_NAK:
LogWarning("Received a NAK from the MMDVM, command = 0x%02X, reason = %u", m_buffer[3U], m_buffer[4U]);
if (m_buffer[3U] == MMDVM_DSTAR_HEADER && m_buffer[4U] == 5U)
LogWarning("Received a NAK from the MMDVM, MMDVM_DSTAR_HEADER, data overflow, space = %u", m_dstarSpace);
else if (m_buffer[3U] == MMDVM_DSTAR_DATA && m_buffer[4U] == 5U)
LogWarning("Received a NAK from the MMDVM, MMDVM_DSTAR_DATA, data overflow, space = %u", m_dstarSpace);
else if (m_buffer[3U] == MMDVM_DSTAR_EOT && m_buffer[4U] == 5U)
LogWarning("Received a NAK from the MMDVM, MMDVM_DSTAR_EOT, data overflow, space = %u", m_dstarSpace);
else
LogWarning("Received a NAK from the MMDVM, command = 0x%02X, reason = %u", m_buffer[3U], m_buffer[4U]);
break;
default: