Merge branch 'mqtt' into mqtt_plus

This commit is contained in:
Jonathan Naylor
2023-07-23 15:06:04 +01:00
2 changed files with 28 additions and 25 deletions

View File

@@ -2333,9 +2333,11 @@ bool CModem::readVersion()
switch (m_protocolVersion) {
case 1U:
LogInfo("MMDVM protocol version: 1, description: %.*s", m_length - 4U, m_buffer + 4U);
m_capabilities1 = CAP1_DSTAR | CAP1_DMR | CAP1_YSF | CAP1_P25 | CAP1_NXDN | CAP1_M17;
m_capabilities1 = CAP1_DSTAR | CAP1_DMR | CAP1_YSF | CAP1_P25 | CAP1_NXDN;
m_capabilities2 = CAP2_POCSAG;
return true;
if (::strstr((char*)(m_buffer + 4U), "v1.6.") != NULL)
m_capabilities1 |= CAP1_M17;
break;
case 2U:
LogInfo("MMDVM protocol version: 2, description: %.*s", m_length - 23U, m_buffer + 23U);
@@ -2355,34 +2357,35 @@ bool CModem::readVersion()
}
m_capabilities1 = m_buffer[4U];
m_capabilities2 = m_buffer[5U];
char modeText[100U];
::strcpy(modeText, "Modes:");
if (hasDStar())
::strcat(modeText, " D-Star");
if (hasDMR())
::strcat(modeText, " DMR");
if (hasYSF())
::strcat(modeText, " YSF");
if (hasP25())
::strcat(modeText, " P25");
if (hasNXDN())
::strcat(modeText, " NXDN");
if (hasM17())
::strcat(modeText, " M17");
if (hasFM())
::strcat(modeText, " FM");
if (hasPOCSAG())
::strcat(modeText, " POCSAG");
if (hasAX25())
::strcat(modeText, " AX.25");
LogInfo(modeText);
return true;
break;
default:
LogError("MMDVM protocol version: %u, unsupported by this version of the MMDVM Host", m_protocolVersion);
return false;
}
char modeText[100U];
::strcpy(modeText, "Modes:");
if (hasDStar())
::strcat(modeText, " D-Star");
if (hasDMR())
::strcat(modeText, " DMR");
if (hasYSF())
::strcat(modeText, " YSF");
if (hasP25())
::strcat(modeText, " P25");
if (hasNXDN())
::strcat(modeText, " NXDN");
if (hasM17())
::strcat(modeText, " M17");
if (hasFM())
::strcat(modeText, " FM");
if (hasPOCSAG())
::strcat(modeText, " POCSAG");
if (hasAX25())
::strcat(modeText, " AX.25");
LogInfo(modeText);
return true;
}
}

View File

@@ -19,6 +19,6 @@
#if !defined(VERSION_H)
#define VERSION_H
const char* VERSION = "20230706";
const char* VERSION = "20230723";
#endif