* new CLI commands: region, region load, region save, region get, region allow

This commit is contained in:
Scott Powell 2025-11-03 22:53:14 +11:00
parent f797744f7c
commit ecd30f4d36
5 changed files with 219 additions and 22 deletions

View file

@ -91,14 +91,16 @@ void loop() {
if (c != '\n') {
command[len++] = c;
command[len] = 0;
Serial.print(c);
}
Serial.print(c);
if (c == '\r') break;
}
if (len == sizeof(command)-1) { // command buffer full
command[sizeof(command)-1] = '\r';
}
if (len > 0 && command[len - 1] == '\r') { // received complete line
Serial.print('\n');
command[len - 1] = 0; // replace newline with C string null terminator
char reply[160];
the_mesh.handleCommand(0, command, reply); // NOTE: there is no sender_timestamp via serial!