* new NodePrefs for companion

This commit is contained in:
Scott Powell
2026-07-17 16:05:10 +10:00
parent 85285c6cbc
commit f515716032
7 changed files with 155 additions and 57 deletions
+17
View File
@@ -140,6 +140,23 @@ void ConfigSerializer::writeComma() {
}
}
#include <Utils.h>
void ConfigSerializer::def(const char* key, void* value, size_t len) {
if (_context->op() == OP::WRITE) {
writeComma();
_context->file()->print(key);
_context->file()->print(":\"");
mesh::Utils::printHex(*_context->file(), (uint8_t*) value, len);
_context->file()->print("\"");
} else {
if (_context->keyMatch(_depth, key)) {
memset(value, 0, len);
mesh::Utils::fromHex((uint8_t *)value, len, _context->getToken());
}
}
}
void ConfigSerializer::def(const char* key, char* value, size_t max_len) {
if (_context->op() == OP::WRITE) {
writeComma();