* initial wiring/routing of CLI commands to companion (either via app/serial interface, or remotely via txt message)

This commit is contained in:
Scott Powell
2026-08-21 20:55:57 +10:00
parent e0031870f6
commit afb969ccca
8 changed files with 101 additions and 26 deletions
+9
View File
@@ -203,6 +203,15 @@ bool Utils::isHexChar(char c) {
return c == '0' || hexVal(c) > 0;
}
bool Utils::isZeroes(const uint8_t* buf, size_t len) {
while (len > 0) {
if (*buf != 0) return false;
buf++;
len--;
}
return true;
}
bool Utils::fromHex(uint8_t* dest, int dest_size, const char *src_hex) {
int len = strlen(src_hex);
if (len != dest_size*2) return false; // incorrect length