Fix quality error messages (#1202)

* Handle null snr and qualities

* Fix quality message
This commit is contained in:
Tim Wilkinson 2024-05-14 16:02:00 -07:00 committed by GitHub
parent 3d3dbc5040
commit 7536b66aca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 4 deletions

View File

@ -862,15 +862,25 @@ do
elseif track.blocks.dup then
c1 = c1 .. "&nbsp;<small>(" .. type .. "blocked dup)</small>"
elseif track.blocks.quality then
if not track.ping_quality or track.tx_quality < track.ping_quality then
c1 = c1 .. "&nbsp;<small>(" .. type .. "blocked retries)</small>"
if track.ping_quality then
if track.tx_quality then
if track.tx_quality < track.ping_quality then
c1 = c1 .. "&nbsp;<small>(" .. type .. "blocked retries)</small>"
else
c1 = c1 .. "&nbsp;<small>(" .. type .. "blocked latency)</small>"
end
else
c1 = c1 .. "&nbsp;<small>(" .. type .. "blocked latency)</small>"
end
else
c1 = c1 .. "&nbsp;<small>(" .. type .. "blocked latency)</small>"
if track.tx_quality then
c1 = c1 .. "&nbsp;<small>(" .. type .. "blocked retries)</small>"
end
end
else
c1 = c1 .. "&nbsp;<small>(" .. type .. "blocked)</small>"
end
if track.snr > 0 then
if track.snr then
c4b = track.snr
if track.rev_snr then
c4b = c4b .. "/" .. track.rev_snr