Update YSFGateway.cpp
Improve the 3/5 digit FCS code
This commit is contained in:
parent
dcae858099
commit
47e06a97c0
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue