From 2ecaaae2a9780ab910ba2b261e8007dc73fc3ae2 Mon Sep 17 00:00:00 2001 From: pablorevilla-meshtastic Date: Sun, 24 May 2026 11:01:45 -0700 Subject: [PATCH] more changes --- meshview/templates/reliability.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meshview/templates/reliability.html b/meshview/templates/reliability.html index be947f9..8cc5475 100644 --- a/meshview/templates/reliability.html +++ b/meshview/templates/reliability.html @@ -482,6 +482,11 @@ function formatAverageHopCount(value) { return value - lower === 0.5 ? lower : Math.round(value); } +function formatAverageHopCountWithActual(value) { + if (value === null || value === undefined || !Number.isFinite(value)) return "—"; + return `${formatAverageHopCount(value)} (${value.toFixed(1)})`; +} + function reliabilityBucketFor(row) { return reliabilityBuckets.find(bucket => bucket.matches(row)) || null; } @@ -561,7 +566,7 @@ function renderReliabilityMap(gatewayRows, nodesById) { icon: reachMapIcon(`${Math.round(row.percent)}%`, bucket.color), }).bindPopup(` ${nodeLink(row.nodeId, nodesById)}
- Reliability: ${row.percent.toFixed(1)}% · Avg. hops ${formatAverageHopCount(row.avgHopCount)}
+ Reliability: ${row.percent.toFixed(1)}% · Avg. hops ${formatAverageHopCountWithActual(row.avgHopCount)}
Heard: (${reportResults.length}) - ${formatAverageHopCount(row.avgHopCount)} + ${formatAverageHopCountWithActual(row.avgHopCount)} ${row.percent.toFixed(1)}% `).join("")