From 47e06a97c03f376f73c209d800f5d71323636d74 Mon Sep 17 00:00:00 2001 From: Andy Taylor Date: Sun, 3 May 2020 13:26:00 +0100 Subject: [PATCH] Update YSFGateway.cpp Improve the 3/5 digit FCS code --- YSFGateway/YSFGateway.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/YSFGateway/YSFGateway.cpp b/YSFGateway/YSFGateway.cpp index 8793a58..2f1e402 100644 --- a/YSFGateway/YSFGateway.cpp +++ b/YSFGateway/YSFGateway.cpp @@ -676,7 +676,8 @@ void CYSFGateway::processDTMF(unsigned char* buffer, unsigned char dt) } else if (raw.length() == 3U) { id += raw; } else if (raw.length() == 5U) { - idShort += raw; + id = idShort; + id += raw; } else { LogWarning("Nonsense from the DTMF decoder - \"%s\"", raw.c_str()); return; @@ -907,7 +908,8 @@ void CYSFGateway::processRemoteCommands() if (raw.length() == 3U) { id += raw; } else if (raw.length() == 5U) { - idShort += raw; + id = idShort; + id += raw; } else { LogWarning("Invalid FCS reflector id - \"%s\"", raw.c_str()); return;