[fix](trx-rds): stay locked between groups to prevent decoder freeze

After completing a group (Block D), the decoder dropped lock and
reverted to search mode which only uses hard CRC. On weak signals,
Block A frequently has bit errors that OSD could correct but hard
decode cannot, causing the decoder to freeze after 2-3 successful
groups. Stay locked with ExpectBlock::A so the next Block A benefits
from OSD soft decoding.

https://claude.ai/code/session_015Ds9dxpeyFimYHySBuzbFw
Signed-off-by: Claude <noreply@anthropic.com>
This commit is contained in:
Claude
2026-03-27 09:14:33 +00:00
committed by Stan Grams
parent 4da4d8ec66
commit d4d852456f
+10 -3
View File
@@ -268,6 +268,7 @@ enum BlockKind {
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
enum ExpectBlock { enum ExpectBlock {
A,
B, B,
C, C,
D, D,
@@ -549,9 +550,15 @@ impl Candidate {
None None
} }
(ExpectBlock::D, BlockKind::D) => { (ExpectBlock::D, BlockKind::D) => {
self.locked = false; // Stay locked and expect Block A next so the next group's
self.search_bits = 0; // Block A can benefit from OSD soft decoding. Previously
self.search_reg = 0; // the decoder dropped lock here and fell back to search mode
// (hard CRC only), which caused it to freeze after 2-3
// groups on weak signals because Block A could not be
// re-acquired without OSD.
self.expect = ExpectBlock::A;
self.block_reg = 0;
self.block_bits = 0;
self.process_group( self.process_group(
self.block_a, self.block_a,
self.block_b, self.block_b,