diff --git a/Conf.cpp b/Conf.cpp index 150b258..a454a6e 100644 --- a/Conf.cpp +++ b/Conf.cpp @@ -160,8 +160,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), @@ -695,10 +693,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; @@ -1528,16 +1523,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; diff --git a/Conf.h b/Conf.h index f80ad87..30663ff 100644 --- a/Conf.h +++ b/Conf.h @@ -147,8 +147,6 @@ public: bool getFusionRemoteGateway() const; bool getFusionSelfOnly() const; unsigned int getFusionTXHang() const; - bool getFusionDGIdEnabled() const; - unsigned char getFusionDGId() const; unsigned int getFusionModeHang() const; // The P25 section @@ -453,8 +451,6 @@ private: bool m_fusionRemoteGateway; bool m_fusionSelfOnly; unsigned int m_fusionTXHang; - bool m_fusionDGIdEnabled; - unsigned char m_fusionDGId; unsigned int m_fusionModeHang; bool m_p25Enabled; diff --git a/MMDVM.ini b/MMDVM.ini index 2b5d8f1..ca21105 100644 --- a/MMDVM.ini +++ b/MMDVM.ini @@ -119,7 +119,6 @@ Enable=1 LowDeviation=0 SelfOnly=0 TXHang=4 -#DGID=1 RemoteGateway=0 # ModeHang=10 diff --git a/MMDVMHost.cpp b/MMDVMHost.cpp index 2c712a6..fc74ff3 100644 --- a/MMDVMHost.cpp +++ b/MMDVMHost.cpp @@ -555,8 +555,6 @@ 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"); @@ -564,13 +562,9 @@ int CMMDVMHost::run() 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) { diff --git a/YSFControl.cpp b/YSFControl.cpp index 73c8e8f..9ac7631 100644 --- a/YSFControl.cpp +++ b/YSFControl.cpp @@ -32,8 +32,6 @@ m_display(display), m_duplex(duplex), m_lowDeviation(lowDeviation), m_remoteGateway(remoteGateway), -m_dgIdEnabled(false), -m_dgIdValue(0U), m_queue(5000U, "YSF Control"), m_rfState(RS_RF_LISTENING), m_netState(RS_NET_IDLE), @@ -100,12 +98,6 @@ CYSFControl::~CYSFControl() delete[] m_selfCallsign; } -void CYSFControl::setDGId(bool on, unsigned char value) -{ - m_dgIdEnabled = on; - m_dgIdValue = value; -} - bool CYSFControl::writeModem(unsigned char *data, unsigned int len) { assert(data != NULL); @@ -167,13 +159,6 @@ bool CYSFControl::writeModem(unsigned char *data, unsigned int len) if (valid) m_lastFICH = fich; - // Validate the DG-ID value if enabled - if (m_dgIdEnabled) { - unsigned char value = m_lastFICH.getDGId(); - if (value != m_dgIdValue) - return false; - } - #ifdef notdef // Stop repeater packets coming through, unless we're acting as a remote gateway if (m_remoteGateway) { @@ -258,8 +243,6 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data) CYSFFICH fich = m_lastFICH; - // Remove any DG-ID information - fich.setDGId(0U); fich.encode(data + 2U); data[0U] = TAG_DATA; @@ -272,8 +255,6 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data) #endif if (m_duplex) { - // Add the DG-ID information. - fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U); fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY); fich.setDev(m_lowDeviation); fich.encode(data + 2U); @@ -299,8 +280,6 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data) CYSFFICH fich = m_lastFICH; - // Remove any DG-ID information - fich.setDGId(0U); fich.encode(data + 2U); data[0U] = TAG_EOT; @@ -313,8 +292,6 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data) #endif if (m_duplex) { - // Add the DG-ID information. - fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U); fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY); fich.setDev(m_lowDeviation); fich.encode(data + 2U); @@ -355,8 +332,6 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data) LogDebug("YSF, V Mode 3, seq %u, AMBE FEC %u/720 (%.1f%%)", m_rfFrames % 128, errors, float(errors) / 7.2F); } - // Remove any DG-ID information - fich.setDGId(0U); fich.encode(data + 2U); data[0U] = TAG_DATA; @@ -365,8 +340,6 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data) writeNetwork(data, m_rfFrames % 128U); if (m_duplex) { - // Add the DG-ID information. - fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U); fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY); fich.setDev(m_lowDeviation); fich.encode(data + 2U); @@ -435,8 +408,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data) CYSFFICH fich = m_lastFICH; - // Remove any DG-ID information - fich.setDGId(0U); fich.encode(data + 2U); data[0U] = TAG_DATA; @@ -449,8 +420,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data) #endif if (m_duplex) { - // Add the DG-ID information. - fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U); fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY); fich.setDev(m_lowDeviation); fich.encode(data + 2U); @@ -476,8 +445,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data) CYSFFICH fich = m_lastFICH; - // Remove any DG-ID information - fich.setDGId(0U); fich.encode(data + 2U); data[0U] = TAG_EOT; @@ -490,8 +457,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data) #endif if (m_duplex) { - // Add the DG-ID information. - fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U); fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY); fich.setDev(m_lowDeviation); fich.encode(data + 2U); @@ -552,8 +517,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data) CYSFFICH fich = m_lastFICH; - // Remove any DG-ID information - fich.setDGId(0U); fich.encode(data + 2U); data[0U] = TAG_DATA; @@ -562,8 +525,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data) writeNetwork(data, m_rfFrames % 128U); if (m_duplex) { - // Add the DG-ID information. - fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U); fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY); fich.setDev(m_lowDeviation); fich.encode(data + 2U); @@ -642,7 +603,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data) CYSFFICH fich = m_lastFICH; fich.setFI(YSF_FI_HEADER); - fich.setDGId(0U); fich.encode(buffer + 2U); unsigned char csd1[20U], csd2[20U]; @@ -663,8 +623,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data) writeNetwork(buffer, m_rfFrames % 128U); if (m_duplex) { - // Add the DG-ID information. - fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U); fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY); fich.setDev(m_lowDeviation); fich.encode(buffer + 2U); @@ -682,8 +640,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data) fich = m_lastFICH; - // Remove any DG-ID information - fich.setDGId(0U); fich.encode(data + 2U); data[0U] = TAG_DATA; @@ -692,8 +648,6 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data) writeNetwork(data, m_rfFrames % 128U); if (m_duplex) { - // Add the DG-ID information. - fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U); fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY); fich.setDev(m_lowDeviation); fich.encode(data + 2U); @@ -759,8 +713,6 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data) CYSFFICH fich = m_lastFICH; - // Remove any DG-ID information - fich.setDGId(0U); fich.encode(data + 2U); data[0U] = TAG_DATA; @@ -773,8 +725,6 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data) #endif if (m_duplex) { - // Add the DG-ID information. - fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U); fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY); fich.setDev(m_lowDeviation); fich.encode(data + 2U); @@ -800,8 +750,6 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data) CYSFFICH fich = m_lastFICH; - // Remove any DG-ID information - fich.setDGId(0U); fich.encode(data + 2U); data[0U] = TAG_EOT; @@ -814,8 +762,6 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data) #endif if (m_duplex) { - // Add the DG-ID information. - fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U); fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY); fich.setDev(m_lowDeviation); fich.encode(data + 2U); @@ -852,8 +798,6 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data) CYSFFICH fich = m_lastFICH; - // Remove any DG-ID information - fich.setDGId(0U); fich.encode(data + 2U); data[0U] = TAG_DATA; @@ -862,8 +806,6 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data) writeNetwork(data, m_rfFrames % 128U); if (m_duplex) { - // Add the DG-ID information. - fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U); fich.setMR(m_remoteGateway ? YSF_MR_NOT_BUSY : YSF_MR_BUSY); fich.setDev(m_lowDeviation); fich.encode(data + 2U); @@ -1004,9 +946,6 @@ void CYSFControl::writeNetwork() ::memcpy(m_netDest, "ALL ", YSF_CALLSIGN_LENGTH); } - // Add the DG-ID information. - fich.setDGId(m_dgIdEnabled ? m_dgIdValue : 0U); - if (m_remoteGateway) { fich.setVoIP(false); fich.setMR(YSF_MR_DIRECT); diff --git a/YSFControl.h b/YSFControl.h index eadd40f..ff2d4af 100644 --- a/YSFControl.h +++ b/YSFControl.h @@ -38,8 +38,6 @@ public: 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); @@ -59,8 +57,6 @@ private: bool m_duplex; bool m_lowDeviation; bool m_remoteGateway; - bool m_dgIdEnabled; - unsigned char m_dgIdValue; CRingBuffer m_queue; RPT_RF_STATE m_rfState; RPT_NET_STATE m_netState;