mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Add daemonisation under Linux and other enhancements (from Simon G7RZU)
This commit is contained in:
8
Conf.cpp
8
Conf.cpp
@@ -51,6 +51,7 @@ m_timeout(120U),
|
||||
m_duplex(true),
|
||||
m_modeHang(10U),
|
||||
m_display(),
|
||||
m_daemon(false),
|
||||
m_rxFrequency(0U),
|
||||
m_txFrequency(0U),
|
||||
m_power(0U),
|
||||
@@ -191,6 +192,8 @@ bool CConf::read()
|
||||
m_modeHang = (unsigned int)::atoi(value);
|
||||
else if (::strcmp(key, "Display") == 0)
|
||||
m_display = value;
|
||||
else if (::strcmp(key, "Daemon") == 0)
|
||||
m_daemon = ::atoi(value) == 1;
|
||||
} else if (section == SECTION_INFO) {
|
||||
if (::strcmp(key, "TXFrequency") == 0)
|
||||
m_txFrequency = (unsigned int)::atoi(value);
|
||||
@@ -400,6 +403,11 @@ std::string CConf::getDisplay() const
|
||||
return m_display;
|
||||
}
|
||||
|
||||
bool CConf::getDaemon() const
|
||||
{
|
||||
return m_daemon;
|
||||
}
|
||||
|
||||
unsigned int CConf::getRxFrequency() const
|
||||
{
|
||||
return m_rxFrequency;
|
||||
|
||||
Reference in New Issue
Block a user