Use increase in SNR to unblock quality block (#1218)

This commit is contained in:
Tim Wilkinson 2024-05-25 16:51:37 -07:00 committed by GitHub
parent 4598e3515e
commit 78fb72b917
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -530,6 +530,7 @@ function lqm()
rx_bitrate = nil, rx_bitrate = nil,
quality = nil, quality = nil,
quality0_seen = nil, quality0_seen = nil,
quality_block_snr = nil,
last_tx_fail = nil, last_tx_fail = nil,
last_tx_retries = nil, last_tx_retries = nil,
avg_tx = nil, avg_tx = nil,
@ -703,7 +704,7 @@ function lqm()
track.avg_snr = track.snr track.avg_snr = track.snr
end end
else else
track.avg_snr = null track.avg_snr = nil
end end
-- Count number of pending trackers -- Count number of pending trackers
@ -895,6 +896,12 @@ function lqm()
end end
end end
end end
-- If we have a quality block and the snr gets sufficiently better, bump the quality to unblock it and see if things have improved
if oldblocks.quality and track.quality_block_snr and track.avg_snr and track.avg_snr > track.quality_block_snr + config.margin then
track.quality = config.min_quality + config.margin_quality
track.quality0_seen = nil
end
end end
-- Block if quality is poor -- Block if quality is poor
@ -902,6 +909,7 @@ function lqm()
if not oldblocks.quality then if not oldblocks.quality then
if track.quality < config.min_quality then if track.quality < config.min_quality then
track.blocks.quality = true track.blocks.quality = true
track.quality_block_snr = track.avg_snr
end end
else else
if track.quality < config.min_quality + config.margin_quality then if track.quality < config.min_quality + config.margin_quality then