Optionally suppress location information info being sent to the masters.

This commit is contained in:
Jonathan Naylor 2017-09-16 14:33:04 +01:00
parent ee2b701bb8
commit 9289d48939
4 changed files with 32 additions and 0 deletions

View file

@ -968,6 +968,7 @@ bool CDMRGateway::createDMRNetwork1()
unsigned int local = m_conf.getDMRNetwork1Local();
unsigned int id = m_conf.getDMRNetwork1Id();
std::string password = m_conf.getDMRNetwork1Password();
bool location = m_conf.getDMRNetwork1Location();
bool debug = m_conf.getDMRNetwork1Debug();
m_dmr1Name = m_conf.getDMRNetwork1Name();
@ -983,6 +984,7 @@ bool CDMRGateway::createDMRNetwork1()
LogInfo(" Local: %u", local);
else
LogInfo(" Local: random");
LogInfo(" Location Data: %s", location ? "yes" : "no");
m_dmrNetwork1 = new CDMRNetwork(address, port, local, id, password, m_dmr1Name, debug);
@ -998,6 +1000,9 @@ bool CDMRGateway::createDMRNetwork1()
unsigned char config[400U];
unsigned int len = m_repeater->getConfig(config);
if (!location)
::memcpy(config + 30U, "0.00000000.000000", 17U);
m_dmrNetwork1->setConfig(config, len);
bool ret = m_dmrNetwork1->open();
@ -1090,6 +1095,7 @@ bool CDMRGateway::createDMRNetwork2()
unsigned int local = m_conf.getDMRNetwork2Local();
unsigned int id = m_conf.getDMRNetwork2Id();
std::string password = m_conf.getDMRNetwork2Password();
bool location = m_conf.getDMRNetwork2Location();
bool debug = m_conf.getDMRNetwork2Debug();
m_dmr2Name = m_conf.getDMRNetwork2Name();
@ -1105,6 +1111,7 @@ bool CDMRGateway::createDMRNetwork2()
LogInfo(" Local: %u", local);
else
LogInfo(" Local: random");
LogInfo(" Location Data: %s", location ? "yes" : "no");
m_dmrNetwork2 = new CDMRNetwork(address, port, local, id, password, m_dmr2Name, debug);
@ -1120,6 +1127,9 @@ bool CDMRGateway::createDMRNetwork2()
unsigned char config[400U];
unsigned int len = m_repeater->getConfig(config);
if (!location)
::memcpy(config + 30U, "0.00000000.000000", 17U);
m_dmrNetwork2->setConfig(config, len);
bool ret = m_dmrNetwork2->open();