From 7ba936bb96c2661510f2514d03362e8da10c6071 Mon Sep 17 00:00:00 2001 From: kobatan Date: Fri, 18 Mar 2022 09:51:43 +0900 Subject: [PATCH] fix: PXX2 radios were initialising default ownerRegistrationID incorrectly --- radio/src/opentx.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index c192a262c..f8eb98194 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -260,8 +260,11 @@ void memswap(void * a, void * b, uint8_t size) #if defined(PXX2) void setDefaultOwnerId() { + uint8_t ch; for (uint8_t i = 0; i < PXX2_LEN_REGISTRATION_ID; i++) { - g_eeGeneral.ownerRegistrationID[i] = (((uint8_t *)cpu_uid)[4 + i] & 0x3fu); + ch = ((uint8_t *)cpu_uid)[4+i]&0x7f; + if(ch<0x20 || ch==0x7f) ch='-'; + g_eeGeneral.ownerRegistrationID[PXX2_LEN_REGISTRATION_ID-1-i] = ch; } } #endif