mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 23:08:11 +00:00
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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user