mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Rationalisation of debugging messages.
This commit is contained in:
27
Modem.cpp
27
Modem.cpp
@@ -61,13 +61,11 @@ const unsigned char MMDVM_YSF_LOST = 0x21U;
|
|||||||
const unsigned char MMDVM_ACK = 0x70U;
|
const unsigned char MMDVM_ACK = 0x70U;
|
||||||
const unsigned char MMDVM_NAK = 0x7FU;
|
const unsigned char MMDVM_NAK = 0x7FU;
|
||||||
|
|
||||||
const unsigned char MMDVM_DUMP = 0xF0U;
|
|
||||||
const unsigned char MMDVM_DEBUG1 = 0xF1U;
|
const unsigned char MMDVM_DEBUG1 = 0xF1U;
|
||||||
const unsigned char MMDVM_DEBUG2 = 0xF2U;
|
const unsigned char MMDVM_DEBUG2 = 0xF2U;
|
||||||
const unsigned char MMDVM_DEBUG3 = 0xF3U;
|
const unsigned char MMDVM_DEBUG3 = 0xF3U;
|
||||||
const unsigned char MMDVM_DEBUG4 = 0xF4U;
|
const unsigned char MMDVM_DEBUG4 = 0xF4U;
|
||||||
const unsigned char MMDVM_DEBUG5 = 0xF5U;
|
const unsigned char MMDVM_DEBUG5 = 0xF5U;
|
||||||
const unsigned char MMDVM_SAMPLES = 0xF8U;
|
|
||||||
|
|
||||||
const unsigned int MAX_RESPONSES = 30U;
|
const unsigned int MAX_RESPONSES = 30U;
|
||||||
|
|
||||||
@@ -386,18 +384,6 @@ void CModem::clock(unsigned int ms)
|
|||||||
LogWarning("Received a NAK from the MMDVM, command = 0x%02X, reason = %u", m_buffer[3U], m_buffer[4U]);
|
LogWarning("Received a NAK from the MMDVM, command = 0x%02X, reason = %u", m_buffer[3U], m_buffer[4U]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MMDVM_DEBUG1:
|
|
||||||
case MMDVM_DEBUG2:
|
|
||||||
case MMDVM_DEBUG3:
|
|
||||||
case MMDVM_DEBUG4:
|
|
||||||
case MMDVM_DEBUG5:
|
|
||||||
printDebug();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MMDVM_SAMPLES:
|
|
||||||
// printSamples();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LogMessage("Unknown message, type: %02X", m_buffer[2U]);
|
LogMessage("Unknown message, type: %02X", m_buffer[2U]);
|
||||||
CUtils::dump("Buffer dump", m_buffer, length);
|
CUtils::dump("Buffer dump", m_buffer, length);
|
||||||
@@ -933,7 +919,6 @@ RESP_TYPE_MMDVM CModem::getResponse(unsigned char *buffer, unsigned int& length)
|
|||||||
case MMDVM_DEBUG3:
|
case MMDVM_DEBUG3:
|
||||||
case MMDVM_DEBUG4:
|
case MMDVM_DEBUG4:
|
||||||
case MMDVM_DEBUG5:
|
case MMDVM_DEBUG5:
|
||||||
case MMDVM_SAMPLES:
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -961,9 +946,19 @@ RESP_TYPE_MMDVM CModem::getResponse(unsigned char *buffer, unsigned int& length)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// CUtils::dump(1U, "Received", buffer, length);
|
switch (buffer[2U]) {
|
||||||
|
case MMDVM_DEBUG1:
|
||||||
|
case MMDVM_DEBUG2:
|
||||||
|
case MMDVM_DEBUG3:
|
||||||
|
case MMDVM_DEBUG4:
|
||||||
|
case MMDVM_DEBUG5:
|
||||||
|
printDebug();
|
||||||
|
return RTM_TIMEOUT;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// CUtils::dump(1U, "Received", buffer, length);
|
||||||
return RTM_OK;
|
return RTM_OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CModem::setMode(unsigned char mode)
|
bool CModem::setMode(unsigned char mode)
|
||||||
|
|||||||
Reference in New Issue
Block a user