Allow for optional seperate (and longer) CW Ids.

This commit is contained in:
Jonathan Naylor
2017-04-10 17:55:53 +01:00
parent dd2db36409
commit 99d57bf102
5 changed files with 25 additions and 5 deletions

View File

@@ -76,6 +76,7 @@ m_logFilePath(),
m_logFileRoot(),
m_cwIdEnabled(false),
m_cwIdTime(10U),
m_cwIdCallsign(),
m_dmrIdLookupFile(),
m_dmrIdLookupTime(0U),
m_modemPort(),
@@ -252,7 +253,7 @@ bool CConf::read()
// Convert the callsign to upper case
for (unsigned int i = 0U; value[i] != 0; i++)
value[i] = ::toupper(value[i]);
m_callsign = value;
m_cwIdCallsign = m_callsign = value;
} else if (::strcmp(key, "Timeout") == 0)
m_timeout = (unsigned int)::atoi(value);
else if (::strcmp(key, "Duplex") == 0)
@@ -300,7 +301,14 @@ bool CConf::read()
m_cwIdEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "Time") == 0)
m_cwIdTime = (unsigned int)::atoi(value);
} else if (section == SECTION_DMRID_LOOKUP) {
else if (::strcmp(key, "Callsign") == 0) {
// Convert the callsign to upper case
for (unsigned int i = 0U; value[i] != 0; i++)
value[i] = ::toupper(value[i]);
m_cwIdCallsign = value;
}
}
else if (section == SECTION_DMRID_LOOKUP) {
if (::strcmp(key, "File") == 0)
m_dmrIdLookupFile = value;
else if (::strcmp(key, "Time") == 0)
@@ -675,6 +683,11 @@ unsigned int CConf::getCWIdTime() const
return m_cwIdTime;
}
std::string CConf::getCWIdCallsign() const
{
return m_cwIdCallsign;
}
std::string CConf::getDMRIdLookupFile() const
{
return m_dmrIdLookupFile;