From c3eaac41ce8c44f47b24af17bd609e38e3d94c48 Mon Sep 17 00:00:00 2001 From: narspt Date: Wed, 26 Feb 2020 07:43:04 +0000 Subject: [PATCH 1/2] Tag XLX reflectors as Wires-X capable, allowing passthrough --- YSFGateway/YSFReflectors.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/YSFGateway/YSFReflectors.cpp b/YSFGateway/YSFReflectors.cpp index 58e06df..103f39f 100644 --- a/YSFGateway/YSFReflectors.cpp +++ b/YSFGateway/YSFReflectors.cpp @@ -139,7 +139,11 @@ bool CYSFReflectors::load() refl->m_port = (unsigned int)::atoi(p5); refl->m_count = std::string(p6); refl->m_type = YT_YSF; - refl->m_wiresX = false; + + if (refl->m_name.compare(0, 3, "XLX") == 0) + refl->m_wiresX = true; + else + refl->m_wiresX = false; refl->m_name.resize(16U, ' '); refl->m_desc.resize(14U, ' '); From 05897e38787b048497bb5dc8dfd13e77fea054b7 Mon Sep 17 00:00:00 2001 From: narspt Date: Wed, 26 Feb 2020 12:46:00 +0000 Subject: [PATCH 2/2] simplify code --- YSFGateway/YSFReflectors.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/YSFGateway/YSFReflectors.cpp b/YSFGateway/YSFReflectors.cpp index 103f39f..62ffa5d 100644 --- a/YSFGateway/YSFReflectors.cpp +++ b/YSFGateway/YSFReflectors.cpp @@ -139,11 +139,7 @@ bool CYSFReflectors::load() refl->m_port = (unsigned int)::atoi(p5); refl->m_count = std::string(p6); refl->m_type = YT_YSF; - - if (refl->m_name.compare(0, 3, "XLX") == 0) - refl->m_wiresX = true; - else - refl->m_wiresX = false; + refl->m_wiresX = (refl->m_name.compare(0, 3, "XLX") == 0); refl->m_name.resize(16U, ' '); refl->m_desc.resize(14U, ' ');