From cc5838ad49dceec8e6fec131d52b738bd78533fd Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Thu, 21 Feb 2019 18:07:25 +0100 Subject: [PATCH] REGISTER Fix --- radio/src/opentx.cpp | 2 +- radio/src/opentx.h | 2 +- radio/src/strhelpers.cpp | 12 ++++++------ radio/src/telemetry/telemetry.cpp | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 02e7fcfca..0e6429cf0 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -303,7 +303,7 @@ void generalDefault() #endif for (uint8_t i=0; i= 'a') return 'a' - c - 1; if (c >= 'A') return c - 'A' + 1; - if (c >= '0') return -(c - '0' + 27); + if (c >= '0') return c - '0' + 27; if (c == '-') return 38; if (c == '.') return 39; if (c == ',') return 40; @@ -78,14 +78,14 @@ int zchar2str(char * dest, const char * src, int size) return size+1; } -int cmpStrWithZchar(char * charString, char * zcharString, int size) +bool cmpStrWithZchar(const char * charString, const char * zcharString, int size) { - for(int i=0; i < size; i++) { - if((uint8_t)char2zchar(charString[i]) != (uint8_t)zcharString[i]) { - return 1; + for (int i=0; i