Repeater: the config checksum of the stats request covers regions
Changelog-cs: Repeater: kontrolní součet konfigurace v požadavku na statistiky teď pokrývá i regiony Changelog-topic: stats-bundle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
86351f2d41
commit
b7129f1df1
6 files changed
+286
-17
No files matched your search
@@ -631,6 +631,20 @@ int MyMesh::handleRequest(ClientInfo *sender, uint32_t sender_timestamp, uint8_t
|
||||
sp.rxps_sleep_us = _prefs.rxps.sleep_us; sp.rxps_level = _prefs.rxps.level;
|
||||
sp.rxps_preamble = _prefs.rxps.preamble;
|
||||
#endif
|
||||
// regions: the live map (a `region` change not yet saved counts too)
|
||||
StatsRegion sr[MAX_REGION_ENTRIES];
|
||||
char sr_none[1] = {0};
|
||||
int nr = region_map.getCount();
|
||||
for (int i = 0; i < nr; i++) {
|
||||
const RegionEntry* e = region_map.getByIdx(i);
|
||||
const RegionEntry* par = e->parent == 0 ? NULL : region_map.findById(e->parent);
|
||||
sr[i].name = e->name;
|
||||
sr[i].parent = e->parent == 0 ? sr_none : (par ? par->name : "?");
|
||||
sr[i].flood = (e->flags & REGION_DENY_FLOOD) ? 0 : 1;
|
||||
}
|
||||
sp.regions = sr; sp.n_regions = (uint8_t)nr;
|
||||
const RegionEntry* home = region_map.getHomeRegion();
|
||||
sp.home = home ? home->name : sr_none;
|
||||
in.prefs_crc = sbPrefsCrc(sp);
|
||||
}
|
||||
int n = sbEncode(in, payload_len >= 2 ? payload[1] : 0, &reply_data[4], SB_PAGE_MAX);
|
||||
|
||||
Reference in new issue
Block a user