mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-04 14:07:36 +00:00
modified: Conf.cpp
modified: Conf.h modified: MMDVMHost.cpp modified: Modem.cpp modified: Modem.h modified: SerialController.cpp modified: SerialController.h
This commit is contained in:
parent
0cf59963dd
commit
40db88d5f8
7 changed files with 86 additions and 12 deletions
16
Conf.cpp
16
Conf.cpp
|
|
@ -87,6 +87,8 @@ m_dmrIdLookupTime(0U),
|
|||
m_nxdnIdLookupFile(),
|
||||
m_nxdnIdLookupTime(0U),
|
||||
m_modemPort(),
|
||||
m_modemProtocol("uart"),
|
||||
m_modemAddress(0x22),
|
||||
m_modemRXInvert(false),
|
||||
m_modemTXInvert(false),
|
||||
m_modemPTTInvert(false),
|
||||
|
|
@ -405,6 +407,10 @@ bool CConf::read()
|
|||
} else if (section == SECTION_MODEM) {
|
||||
if (::strcmp(key, "Port") == 0)
|
||||
m_modemPort = value;
|
||||
else if (::strcmp(key, "Protocol") == 0)
|
||||
m_modemProtocol = value;
|
||||
else if (::strcmp(key, "Address") == 0)
|
||||
m_modemAddress = (unsigned int)::strtoul(value, NULL, 16);
|
||||
else if (::strcmp(key, "RXInvert") == 0)
|
||||
m_modemRXInvert = ::atoi(value) == 1;
|
||||
else if (::strcmp(key, "TXInvert") == 0)
|
||||
|
|
@ -913,6 +919,16 @@ std::string CConf::getModemPort() const
|
|||
return m_modemPort;
|
||||
}
|
||||
|
||||
std::string CConf::getModemProtocol() const
|
||||
{
|
||||
return m_modemProtocol;
|
||||
}
|
||||
|
||||
unsigned int CConf::getModemAddress() const
|
||||
{
|
||||
return m_modemAddress;
|
||||
}
|
||||
|
||||
bool CConf::getModemRXInvert() const
|
||||
{
|
||||
return m_modemRXInvert;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue