feat(mesh): track actually-forwarded packet count, show in Diagnostics

allowPacketForward() only gates permission; the packet can still be
dropped afterward (hasSeen(), path-size limit). Add Mesh::n_forwarded,
incremented at the 3 ACTION_RETRANSMIT_DELAYED return sites, so the
Diagnostics screen can confirm a repeater is actually relaying traffic
rather than just being configured to.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-06-18 23:20:23 +02:00
parent 72bc4ee895
commit d1d64dc612
3 changed files with 14 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ class DiagnosticsScreen : public UIScreen {
int _scroll = 0;
struct Row { const char* label; char value[20]; };
static const int MAX_ROWS = 12;
static const int MAX_ROWS = 13;
Row _rows[MAX_ROWS];
int _row_count = 0;
@@ -76,6 +76,9 @@ class DiagnosticsScreen : public UIScreen {
addRxTxRow("Ack/Path", rte_rx, rte_tx);
addRxTxRow("Other", oth_rx, oth_tx);
snprintf(buf, sizeof(buf), "%lu", (unsigned long)the_mesh.getNumForwarded());
addRow("Forwarded", buf);
uint32_t heap_free, heap_total;
DeviceDiag::getHeapStats(heap_free, heap_total);
if (heap_total > 0) snprintf(buf, sizeof(buf), "%lu/%luKB", (unsigned long)(heap_free / 1024), (unsigned long)(heap_total / 1024));