Improve repeater reliability and build tooling

This commit is contained in:
mikecarper
2026-07-13 01:03:27 -07:00
parent 2b4aed4ef1
commit da00a00436
31 changed files with 1079 additions and 229 deletions
+3 -1
View File
@@ -120,6 +120,7 @@ bool Utils::isHexChar(char c) {
}
bool Utils::fromHex(uint8_t* dest, int dest_size, const char *src_hex) {
if (dest == NULL || src_hex == NULL || dest_size < 0) return false;
int len = strlen(src_hex);
if (len != dest_size*2) return false; // incorrect length
@@ -127,6 +128,7 @@ bool Utils::fromHex(uint8_t* dest, int dest_size, const char *src_hex) {
while (dp - dest < dest_size) {
char ch = *src_hex++;
char cl = *src_hex++;
if (!isHexChar(ch) || !isHexChar(cl)) return false;
*dp++ = (hexVal(ch) << 4) | hexVal(cl);
}
return true;
@@ -150,4 +152,4 @@ int Utils::parseTextParts(char* text, const char* parts[], int max_num, char sep
return num;
}
}
}