From 55f21997aa430596691cedcd937c283aa2a9e39f Mon Sep 17 00:00:00 2001 From: "Valentin V. Bartenev" Date: Sat, 9 May 2026 20:12:03 +0300 Subject: [PATCH] Web: show RX metrics before TX in Packets HUD card For a mesh repeater, a packet must be received before it can be retransmitted, so RX metrics are the primary signal. Reorder the Packets card to reflect this: - Swap meter order: RX Flood Share before TX Flood Share - Swap metric order: Recv before Sent, RX Direct before TX Direct - Reorder floodTx/directTx declarations to match the new order --- src/helpers/web/WebPanelServer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/helpers/web/WebPanelServer.cpp b/src/helpers/web/WebPanelServer.cpp index cf2f678d..d222c56f 100644 --- a/src/helpers/web/WebPanelServer.cpp +++ b/src/helpers/web/WebPanelServer.cpp @@ -1543,27 +1543,27 @@ const char kWebPanelAppHtml[] PROGMEM = R"HTML( `; } function renderPacketsCard(packets) { - const sent = packets.sent || 0; const recv = packets.recv || 0; - const floodTx = packets.flood_tx || 0; - const directTx = packets.direct_tx || 0; + const sent = packets.sent || 0; const floodRx = packets.flood_rx || 0; const directRx = packets.direct_rx || 0; const recvErrors = packets.recv_errors || 0; const totalAttempts = recv + recvErrors; const errorRatePct = pctRatio(recvErrors, totalAttempts); + const floodTx = packets.flood_tx || 0; + const directTx = packets.direct_tx || 0; return `

Packets

- ${renderMeter("TX Flood Share", Math.round(pctRatio(floodTx, sent)) + "%", pctRatio(floodTx, sent), "", false)} ${renderMeter("RX Flood Share", Math.round(pctRatio(floodRx, recv)) + "%", pctRatio(floodRx, recv), "", false)} + ${renderMeter("TX Flood Share", Math.round(pctRatio(floodTx, sent)) + "%", pctRatio(floodTx, sent), "", false)}
${renderMeter("RX Error Rate", Math.round(errorRatePct) + "%", errorRatePct, recvErrors + " errors / " + totalAttempts + " attempts", false)}
- ${renderMetric("Sent", sent)} ${renderMetric("Recv", recv)} - ${renderMetric("TX Direct", directTx)} + ${renderMetric("Sent", sent)} ${renderMetric("RX Direct", directRx)} + ${renderMetric("TX Direct", directTx)} ${renderMetric("Recv Errors", packets.recv_errors || 0)} ${renderMetric("Balance", recv - sent)}