Fix repeater build artifacts and recent paging

This commit is contained in:
mikecarper committed 2026-06-24 17:28:19 -07:00
1 parent af131517a7
commit f606ae9aeb
5 files changed
+34 -10

No files matched your search

+3 -1
View File
@@ -1089,7 +1089,9 @@ collect_nrf52_artifacts() {
python3 bin/uf2conv/uf2conv.py ".pio/build/${env_name}/firmware.hex" -c -o ".pio/build/${env_name}/firmware.uf2" -f 0xADA52840 || return $?
copy_build_output ".pio/build/${env_name}/firmware.uf2" "out/${firmware_filename}.uf2" || return $?
copy_build_output ".pio/build/${env_name}/firmware.zip" "out/${firmware_filename}.zip" || return $?
if [ -f ".pio/build/${env_name}/firmware.zip" ]; then
copy_build_output ".pio/build/${env_name}/firmware.zip" "out/${firmware_filename}.zip" || return $?
fi
}
collect_stm32_artifacts() {
+1
View File
@@ -1439,6 +1439,7 @@ set direct.retry.cr 20.0,12.0,6.0,2.0
**Usage:**
- `get recent.repeater`
- `get recent.repeater <page>`
- `get recent.repeaters <page>`
- `set recent.repeater <prefix> [snr_db]`
- `clear recent.repeater`
+1
View File
@@ -122,6 +122,7 @@ Show learned rows:
```text
get recent.repeater
get recent.repeater 2
get recent.repeaters 2
get recent.repeater page 3
```
+1 -2
View File
@@ -3076,8 +3076,7 @@ void MyMesh::handleCommand(uint32_t sender_timestamp, ClientInfo* sender, char *
}
}
} else if (sender_timestamp == 0 && sender == NULL
&& memcmp(command, "get recent.repeater", 19) == 0
&& (command[19] == 0 || command[19] == ' ')) {
&& (strcmp(command, "get recent.repeater") == 0 || strcmp(command, "get recent.repeaters") == 0)) {
printRecentRepeatersSerial();
reply_start[0] = 0;
} else if (sender_timestamp == 0 && strcmp(command, "get acl") == 0) {
+28 -7
View File
@@ -47,6 +47,31 @@ static uint32_t _atoi(const char* sp) {
return n;
}
static bool parseRecentRepeaterGet(const char* config, int& page) {
if (strncmp(config, "recent.repeater", 15) != 0) {
return false;
}
const char* cursor = &config[15];
if (*cursor == 's') {
cursor++;
}
if (*cursor != 0 && *cursor != ' ') {
return false;
}
while (*cursor == ' ') cursor++;
if (strncmp(cursor, "page", 4) == 0 && (cursor[4] == 0 || cursor[4] == ' ')) {
cursor += 4;
while (*cursor == ' ') cursor++;
}
page = 1;
if (*cursor) page = _atoi(cursor);
if (page < 1) page = 1;
return true;
}
static bool isValidName(const char *n) {
while (*n) {
if (*n == '[' || *n == ']' || *n == '\\' || *n == ':' || *n == ',' || *n == '?' || *n == '*') return false;
@@ -1617,6 +1642,7 @@ void CommonCLI::handleSetCmd(uint32_t sender_timestamp, char* command, char* rep
void CommonCLI::handleGetCmd(uint32_t sender_timestamp, char* command, char* reply) {
const char* config = &command[4];
int recent_page = 1;
if (memcmp(config, "dutycycle", 9) == 0) {
float dc = 100.0f / (_prefs->airtime_factor + 1.0f);
int dc_int = (int)dc;
@@ -1735,13 +1761,8 @@ void CommonCLI::handleGetCmd(uint32_t sender_timestamp, char* command, char* rep
formatSnrDbX4(cr8, sizeof(cr8), _prefs->direct_retry_cr8_snr_x4);
sprintf(reply, "> %s,%s,%s,%s", cr4, cr5, cr7, cr8);
}
} else if (memcmp(config, "recent.repeater", 15) == 0) {
int page = 1;
const char* cursor = &config[15];
while (*cursor == ' ') cursor++;
if (*cursor) page = _atoi(cursor);
if (page < 1) page = 1;
_callbacks->formatRecentRepeatersReply(reply, page);
} else if (parseRecentRepeaterGet(config, recent_page)) {
_callbacks->formatRecentRepeatersReply(reply, recent_page);
} else if (memcmp(config, "owner.info", 10) == 0) {
auto start = reply;
*reply++ = '>';