Don't try to correct >1 error in DF11.
We already do this check when scoring a message for the demodulator, but there are other paths that can feed us a message so also do the check in the main decode path.
This commit is contained in:
parent
f19eee898b
commit
54677f3ae0
7
mode_s.c
7
mode_s.c
|
@ -465,6 +465,13 @@ int decodeModesMessage(struct modesMessage *mm, unsigned char *msg)
|
||||||
if (!ei) {
|
if (!ei) {
|
||||||
return -2; // couldn't fix it
|
return -2; // couldn't fix it
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// see crc.c comments: we do not attempt to fix
|
||||||
|
// more than single-bit errors, as two-bit
|
||||||
|
// errors are ambiguous in DF11.
|
||||||
|
if (ei->errors > 1)
|
||||||
|
return -2; // can't correct errors
|
||||||
|
|
||||||
mm->correctedbits = ei->errors;
|
mm->correctedbits = ei->errors;
|
||||||
modesChecksumFix(msg, ei);
|
modesChecksumFix(msg, ei);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue