Merge branch 'SimpleDMR' into AX25_FM

This commit is contained in:
Jonathan Naylor
2020-10-30 13:57:58 +00:00
8 changed files with 39 additions and 12 deletions

View File

@@ -124,6 +124,7 @@ m_dstarEnabled(false),
m_dstarModule("C"),
m_dstarSelfOnly(false),
m_dstarBlackList(),
m_dstarWhiteList(),
m_dstarAckReply(true),
m_dstarAckTime(750U),
m_dstarAckMessage(false),
@@ -571,6 +572,18 @@ bool CConf::read()
}
p = ::strtok(NULL, ",\r\n");
}
} else if (::strcmp(key, "WhiteList") == 0) {
char* p = ::strtok(value, ",\r\n");
while (p != NULL) {
if (::strlen(p) > 0U) {
for (unsigned int i = 0U; p[i] != 0; i++)
p[i] = ::toupper(p[i]);
std::string callsign = std::string(p);
callsign.resize(DSTAR_LONG_CALLSIGN_LENGTH, ' ');
m_dstarWhiteList.push_back(callsign);
}
p = ::strtok(NULL, ",\r\n");
}
} else if (::strcmp(key, "AckReply") == 0)
m_dstarAckReply = ::atoi(value) == 1;
else if (::strcmp(key, "AckTime") == 0)
@@ -1318,6 +1331,11 @@ std::vector<std::string> CConf::getDStarBlackList() const
return m_dstarBlackList;
}
std::vector<std::string> CConf::getDStarWhiteList() const
{
return m_dstarWhiteList;
}
bool CConf::getDStarAckReply() const
{
return m_dstarAckReply;