Skip to content

Commit

Permalink
Update files to remove DG-ID and mantain consistency in code
Browse files Browse the repository at this point in the history
  • Loading branch information
msraya committed Aug 3, 2020
1 parent e01b153 commit 52ca12e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 30 deletions.
17 changes: 1 addition & 16 deletions Conf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ m_fusionLowDeviation(false),
m_fusionRemoteGateway(false),
m_fusionSelfOnly(false),
m_fusionTXHang(4U),
m_fusionDGIdEnabled(false),
m_fusionDGId(0U),
m_fusionModeHang(10U),
m_p25Enabled(false),
m_p25Id(0U),
Expand Down Expand Up @@ -667,10 +665,7 @@ bool CConf::read()
m_fusionEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "LowDeviation") == 0)
m_fusionLowDeviation = ::atoi(value) == 1;
else if (::strcmp(key, "DGID") == 0) {
m_fusionDGIdEnabled = true;
m_fusionDGId = (unsigned int)::atoi(value);
} else if (::strcmp(key, "RemoteGateway") == 0)
else if (::strcmp(key, "RemoteGateway") == 0)
m_fusionRemoteGateway = ::atoi(value) == 1;
else if (::strcmp(key, "SelfOnly") == 0)
m_fusionSelfOnly = ::atoi(value) == 1;
Expand Down Expand Up @@ -1444,16 +1439,6 @@ bool CConf::getFusionSelfOnly() const
return m_fusionSelfOnly;
}

bool CConf::getFusionDGIdEnabled() const
{
return m_fusionDGIdEnabled;
}

unsigned char CConf::getFusionDGId() const
{
return m_fusionDGId;
}

unsigned int CConf::getFusionModeHang() const
{
return m_fusionModeHang;
Expand Down
4 changes: 0 additions & 4 deletions Conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ class CConf
bool getFusionRemoteGateway() const;
bool getFusionSelfOnly() const;
unsigned int getFusionTXHang() const;
bool getFusionDGIdEnabled() const;
unsigned char getFusionDGId() const;
unsigned int getFusionModeHang() const;

// The P25 section
Expand Down Expand Up @@ -421,8 +419,6 @@ class CConf
bool m_fusionRemoteGateway;
bool m_fusionSelfOnly;
unsigned int m_fusionTXHang;
bool m_fusionDGIdEnabled;
unsigned char m_fusionDGId;
unsigned int m_fusionModeHang;

bool m_p25Enabled;
Expand Down
6 changes: 0 additions & 6 deletions MMDVMHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,22 +535,16 @@ int CMMDVMHost::run()
bool remoteGateway = m_conf.getFusionRemoteGateway();
unsigned int txHang = m_conf.getFusionTXHang();
bool selfOnly = m_conf.getFusionSelfOnly();
bool dgIdEnabled = m_conf.getFusionDGIdEnabled();
unsigned char dgId = m_conf.getFusionDGId();
m_ysfRFModeHang = m_conf.getFusionModeHang();

LogInfo("YSF RF Parameters");
LogInfo(" Low Deviation: %s", lowDeviation ? "yes" : "no");
LogInfo(" Remote Gateway: %s", remoteGateway ? "yes" : "no");
LogInfo(" TX Hang: %us", txHang);
LogInfo(" Self Only: %s", selfOnly ? "yes" : "no");
LogInfo(" DG-ID: %s", dgIdEnabled ? "yes" : "no");
if (dgIdEnabled)
LogInfo(" DG-ID Value: %u", dgId);
LogInfo(" Mode Hang: %us", m_ysfRFModeHang);

m_ysf = new CYSFControl(m_callsign, selfOnly, m_ysfNetwork, m_display, m_timeout, m_duplex, lowDeviation, remoteGateway, rssi);
m_ysf->setDGId(dgIdEnabled, dgId);
}

if (m_p25Enabled) {
Expand Down
4 changes: 0 additions & 4 deletions YSFControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ class CYSFControl {
CYSFControl(const std::string& callsign, bool selfOnly, CYSFNetwork* network, CDisplay* display, unsigned int timeout, bool duplex, bool lowDeviation, bool remoteGateway, CRSSIInterpolator* rssiMapper);
~CYSFControl();

void setDGId(bool on, unsigned char value);

bool writeModem(unsigned char* data, unsigned int len);

unsigned int readModem(unsigned char* data);
Expand All @@ -59,8 +57,6 @@ class CYSFControl {
bool m_duplex;
bool m_lowDeviation;
bool m_remoteGateway;
bool m_dgIdEnabled;
unsigned char m_dgIdValue;
CRingBuffer<unsigned char> m_queue;
RPT_RF_STATE m_rfState;
RPT_NET_STATE m_netState;
Expand Down

0 comments on commit 52ca12e

Please sign in to comment.