Merge branch 'SimpleDMR' into AX25_FM

This commit is contained in:
Jonathan Naylor
2020-09-03 12:10:01 +01:00
43 changed files with 414 additions and 1498 deletions

View File

@@ -60,7 +60,6 @@ enum SECTION {
SECTION_OLED,
SECTION_LCDPROC,
SECTION_LOCK_FILE,
SECTION_GPSD,
SECTION_REMOTE_CONTROL
};
@@ -75,12 +74,6 @@ m_daemon(false),
m_rxFrequency(0U),
m_txFrequency(0U),
m_power(0U),
m_latitude(0.0F),
m_longitude(0.0F),
m_height(0),
m_location(),
m_description(),
m_url(),
m_logDisplayLevel(0U),
m_logFileLevel(0U),
m_logFilePath(),
@@ -309,10 +302,8 @@ m_lcdprocUTC(false),
m_lcdprocDimOnIdle(false),
m_lockFileEnabled(false),
m_lockFileName(),
m_gpsdEnabled(false),
m_gpsdAddress(),
m_gpsdPort(),
m_remoteControlEnabled(false),
m_remoteControlAddress("127.0.0.1"),
m_remoteControlPort(0U)
{
}
@@ -399,8 +390,6 @@ bool CConf::read()
section = SECTION_LCDPROC;
else if (::strncmp(buffer, "[Lock File]", 11U) == 0)
section = SECTION_LOCK_FILE;
else if (::strncmp(buffer, "[GPSD]", 6U) == 0)
section = SECTION_GPSD;
else if (::strncmp(buffer, "[Remote Control]", 16U) == 0)
section = SECTION_REMOTE_CONTROL;
else
@@ -457,18 +446,6 @@ bool CConf::read()
m_rxFrequency = (unsigned int)::atoi(value);
else if (::strcmp(key, "Power") == 0)
m_power = (unsigned int)::atoi(value);
else if (::strcmp(key, "Latitude") == 0)
m_latitude = float(::atof(value));
else if (::strcmp(key, "Longitude") == 0)
m_longitude = float(::atof(value));
else if (::strcmp(key, "Height") == 0)
m_height = ::atoi(value);
else if (::strcmp(key, "Location") == 0)
m_location = value;
else if (::strcmp(key, "Description") == 0)
m_description = value;
else if (::strcmp(key, "URL") == 0)
m_url = value;
} else if (section == SECTION_LOG) {
if (::strcmp(key, "FilePath") == 0)
m_logFilePath = value;
@@ -1033,13 +1010,6 @@ bool CConf::read()
m_lockFileEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "File") == 0)
m_lockFileName = value;
} else if (section == SECTION_GPSD) {
if (::strcmp(key, "Enable") == 0)
m_gpsdEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "Address") == 0)
m_gpsdAddress = value;
else if (::strcmp(key, "Port") == 0)
m_gpsdPort = value;
} else if (section == SECTION_REMOTE_CONTROL) {
if (::strcmp(key, "Enable") == 0)
m_remoteControlEnabled = ::atoi(value) == 1;
@@ -1098,36 +1068,6 @@ unsigned int CConf::getPower() const
return m_power;
}
float CConf::getLatitude() const
{
return m_latitude;
}
float CConf::getLongitude() const
{
return m_longitude;
}
int CConf::getHeight() const
{
return m_height;
}
std::string CConf::getLocation() const
{
return m_location;
}
std::string CConf::getDescription() const
{
return m_description;
}
std::string CConf::getURL() const
{
return m_url;
}
unsigned int CConf::getLogDisplayLevel() const
{
return m_logDisplayLevel;
@@ -2268,26 +2208,16 @@ std::string CConf::getLockFileName() const
return m_lockFileName;
}
bool CConf::getGPSDEnabled() const
{
return m_gpsdEnabled;
}
std::string CConf::getGPSDAddress() const
{
return m_gpsdAddress;
}
std::string CConf::getGPSDPort() const
{
return m_gpsdPort;
}
bool CConf::getRemoteControlEnabled() const
{
return m_remoteControlEnabled;
}
std::string CConf::getRemoteControlAddress() const
{
return m_remoteControlAddress;
}
unsigned int CConf::getRemoteControlPort() const
{
return m_remoteControlPort;