From 8288d648485082f80c5e291bf5df93d875f361be Mon Sep 17 00:00:00 2001 From: Andy Taylor Date: Tue, 29 Jan 2019 17:05:46 +0000 Subject: [PATCH 1/2] Update YSFGateway.cpp This is not exactly elegant, its not a state issue exactly, just cant read reflector->m_wiresX when there is no reflector... --- YSFGateway/YSFGateway.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/YSFGateway/YSFGateway.cpp b/YSFGateway/YSFGateway.cpp index 295ec9a..8da5b49 100644 --- a/YSFGateway/YSFGateway.cpp +++ b/YSFGateway/YSFGateway.cpp @@ -268,13 +268,22 @@ int CYSFGateway::run() unsigned char ft = fich.getFT(); CYSFReflector* reflector = m_wiresX->getReflector(); - if ( (wiresXCommandPassthrough) && (reflector->m_wiresX) ) { - // Allow WiresX to Pass Through - processDTMF(buffer, dt); - processWiresX(buffer, fi, dt, fn, ft, true); + if ( (wiresXCommandPassthrough) && (reflector) ) { + // Connected to a reflector, figure out what kind it is + if (reflector->m_wiresX) { + // Pass Control Commands (WiresX capable reflector) + processDTMF(buffer, dt); + processWiresX(buffer, fi, dt, fn, ft, true); + } + else { + // Don't Pass Control Commands (Not a WiresX capable reflector) + m_exclude = (dt == YSF_DT_DATA_FR_MODE); + processDTMF(buffer, dt); + processWiresX(buffer, fi, dt, fn, ft, false); + } } else { - // Don't Pass Control Commands + // Don't Pass Control Commands (Not connected to a reflector) m_exclude = (dt == YSF_DT_DATA_FR_MODE); processDTMF(buffer, dt); processWiresX(buffer, fi, dt, fn, ft, false); From 4327b23c918b22fb21a8118c1b388f2413f4e3dc Mon Sep 17 00:00:00 2001 From: Andy Taylor Date: Tue, 29 Jan 2019 17:34:58 +0000 Subject: [PATCH 2/2] Update YSFGateway.cpp replace my code with yours... this seems to work well enough for testing, with one caveat, I need to remove YSF2xxx modes from the Pi-Star host files and modify the dashboard to cope without them in there, not a problem. --- YSFGateway/YSFGateway.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/YSFGateway/YSFGateway.cpp b/YSFGateway/YSFGateway.cpp index 8da5b49..b820cb6 100644 --- a/YSFGateway/YSFGateway.cpp +++ b/YSFGateway/YSFGateway.cpp @@ -268,9 +268,9 @@ int CYSFGateway::run() unsigned char ft = fich.getFT(); CYSFReflector* reflector = m_wiresX->getReflector(); - if ( (wiresXCommandPassthrough) && (reflector) ) { - // Connected to a reflector, figure out what kind it is - if (reflector->m_wiresX) { + if (m_ysfNetwork != NULL && m_linkType == LINK_YSF) { + // Connected to a YSF reflector, figure out what kind it is + if ( (wiresXCommandPassthrough) && (reflector->m_wiresX) ) { // Pass Control Commands (WiresX capable reflector) processDTMF(buffer, dt); processWiresX(buffer, fi, dt, fn, ft, true);