diff --git a/YSFGateway/Conf.cpp b/YSFGateway/Conf.cpp index 8225847..4ad3813 100644 --- a/YSFGateway/Conf.cpp +++ b/YSFGateway/Conf.cpp @@ -60,6 +60,7 @@ m_aprsEnabled(false), m_aprsServer(), m_aprsPort(0U), m_aprsPassword(), +m_aprsDescription(), m_networkEnabled(false), m_networkPort(0U), m_networkHosts(), @@ -170,6 +171,8 @@ bool CConf::read() m_aprsPort = (unsigned int)::atoi(value); else if (::strcmp(key, "Password") == 0) m_aprsPassword = value; + else if (::strcmp(key, "Description") == 0) + m_aprsDescription = value; } else if (section == SECTION_NETWORK) { if (::strcmp(key, "Enable") == 0) m_networkEnabled = ::atoi(value) == 1; @@ -314,6 +317,11 @@ std::string CConf::getAPRSPassword() const return m_aprsPassword; } +std::string CConf::getAPRSDescription() const +{ + return m_aprsDescription; +} + bool CConf::getNetworkEnabled() const { return m_networkEnabled; diff --git a/YSFGateway/Conf.h b/YSFGateway/Conf.h index 4644e32..71cfde2 100644 --- a/YSFGateway/Conf.h +++ b/YSFGateway/Conf.h @@ -60,6 +60,7 @@ public: std::string getAPRSServer() const; unsigned int getAPRSPort() const; std::string getAPRSPassword() const; + std::string getAPRSDescription() const; // The Network section bool getNetworkEnabled() const; @@ -101,6 +102,7 @@ private: std::string m_aprsServer; unsigned int m_aprsPort; std::string m_aprsPassword; + std::string m_aprsDescription; bool m_networkEnabled; unsigned int m_networkPort; diff --git a/YSFGateway/YSFGateway.cpp b/YSFGateway/YSFGateway.cpp index 80d388c..0648fa6 100644 --- a/YSFGateway/YSFGateway.cpp +++ b/YSFGateway/YSFGateway.cpp @@ -501,6 +501,7 @@ void CYSFGateway::createGPS() std::string hostname = m_conf.getAPRSServer(); unsigned int port = m_conf.getAPRSPort(); std::string password = m_conf.getAPRSPassword(); + std::string desc = m_conf.getAPRSDescription(); m_gps = new CGPS(m_callsign, m_suffix, password, hostname, port); @@ -509,7 +510,6 @@ void CYSFGateway::createGPS() float latitude = m_conf.getLatitude(); float longitude = m_conf.getLongitude(); int height = m_conf.getHeight(); - std::string desc = m_conf.getDescription(); m_gps->setInfo(txFrequency, rxFrequency, latitude, longitude, height, desc); diff --git a/YSFGateway/YSFGateway.ini b/YSFGateway/YSFGateway.ini index e913845..28043da 100644 --- a/YSFGateway/YSFGateway.ini +++ b/YSFGateway/YSFGateway.ini @@ -31,6 +31,7 @@ Enable=0 Server=euro.aprs2.net Port=14580 Password=9999 +Description=APRS Description [Network] Enable=1