mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Remove sync sample dumping.
This commit is contained in:
46
Modem.cpp
46
Modem.cpp
@@ -72,8 +72,7 @@ const unsigned char MMDVM_NAK = 0x7FU;
|
|||||||
|
|
||||||
const unsigned char MMDVM_SERIAL = 0x80U;
|
const unsigned char MMDVM_SERIAL = 0x80U;
|
||||||
|
|
||||||
const unsigned char MMDVM_SAMPLES = 0xEFU;
|
const unsigned char MMDVM_SAMPLES = 0xF0U;
|
||||||
const unsigned char MMDVM_SYNC_SAMPLES = 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;
|
||||||
@@ -480,10 +479,6 @@ void CModem::clock(unsigned int ms)
|
|||||||
dumpSamples();
|
dumpSamples();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MMDVM_SYNC_SAMPLES:
|
|
||||||
printSyncSamples();
|
|
||||||
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, m_length);
|
CUtils::dump("Buffer dump", m_buffer, m_length);
|
||||||
@@ -1300,43 +1295,6 @@ void CModem::printDebug()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CModem::printSyncSamples()
|
|
||||||
{
|
|
||||||
const char* mode = NULL;
|
|
||||||
switch (m_buffer[3U]) {
|
|
||||||
case MODE_DSTAR:
|
|
||||||
mode = "D-Star";
|
|
||||||
break;
|
|
||||||
case MODE_DMR:
|
|
||||||
mode = "DMR";
|
|
||||||
break;
|
|
||||||
case MODE_P25:
|
|
||||||
mode = "P25";
|
|
||||||
break;
|
|
||||||
case MODE_YSF:
|
|
||||||
mode = "YSF";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
mode = "???";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
char samples[250U];
|
|
||||||
samples[0U] = '\0';
|
|
||||||
|
|
||||||
unsigned char n = (m_length - 4U) / 2U;
|
|
||||||
|
|
||||||
for (unsigned char i = 0U; i < n; i++) {
|
|
||||||
unsigned char index = i * 2U + 4U;
|
|
||||||
|
|
||||||
short val = (m_buffer[index + 0U] << 8) | m_buffer[index + 1U];
|
|
||||||
|
|
||||||
::sprintf(samples + ::strlen(samples), " %d", val - 2048);
|
|
||||||
}
|
|
||||||
|
|
||||||
LogMessage("Debug: Sync Samples dump: %s:%s", mode, samples);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CModem::dumpSamples()
|
void CModem::dumpSamples()
|
||||||
{
|
{
|
||||||
if (m_samplesDir.empty())
|
if (m_samplesDir.empty())
|
||||||
@@ -1347,7 +1305,7 @@ void CModem::dumpSamples()
|
|||||||
|
|
||||||
struct tm* tm = ::localtime(&now);
|
struct tm* tm = ::localtime(&now);
|
||||||
|
|
||||||
char* mode = NULL;
|
const char* mode = NULL;
|
||||||
switch (m_buffer[5U]) {
|
switch (m_buffer[5U]) {
|
||||||
case MODE_DSTAR:
|
case MODE_DSTAR:
|
||||||
mode = "DStar";
|
mode = "DStar";
|
||||||
|
|||||||
Reference in New Issue
Block a user