From 7536b66aca1b74d9d879bda34dab92f3eed36e4d Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Tue, 14 May 2024 16:02:00 -0700 Subject: [PATCH] Fix quality error messages (#1202) * Handle null snr and qualities * Fix quality message --- files/www/cgi-bin/mesh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/files/www/cgi-bin/mesh b/files/www/cgi-bin/mesh index 72e4e135..3e92778d 100755 --- a/files/www/cgi-bin/mesh +++ b/files/www/cgi-bin/mesh @@ -862,15 +862,25 @@ do elseif track.blocks.dup then c1 = c1 .. " (" .. type .. "blocked dup)" elseif track.blocks.quality then - if not track.ping_quality or track.tx_quality < track.ping_quality then - c1 = c1 .. " (" .. type .. "blocked retries)" + if track.ping_quality then + if track.tx_quality then + if track.tx_quality < track.ping_quality then + c1 = c1 .. " (" .. type .. "blocked retries)" + else + c1 = c1 .. " (" .. type .. "blocked latency)" + end + else + c1 = c1 .. " (" .. type .. "blocked latency)" + end else - c1 = c1 .. " (" .. type .. "blocked latency)" + if track.tx_quality then + c1 = c1 .. " (" .. type .. "blocked retries)" + end end else c1 = c1 .. " (" .. type .. "blocked)" end - if track.snr > 0 then + if track.snr then c4b = track.snr if track.rev_snr then c4b = c4b .. "/" .. track.rev_snr