mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-05 06:25:24 +00:00
Fixing occasional MMDVMHost crash when receiving P25 RF data with high BER (RS decoder fix)
This commit is contained in:
parent
5ca81f288b
commit
738cc467ee
2 changed files with 4 additions and 3 deletions
|
|
@ -241,7 +241,7 @@ bool CRS241213::decode(unsigned char* data)
|
|||
if (q == 0) { //it is a root
|
||||
//store root (index-form) and error location number
|
||||
root[count] = i;
|
||||
locn[count] = i - 1;
|
||||
locn[count] = i - 40;
|
||||
//if wehave max possible roots, abort search to save time
|
||||
count = count + 1;
|
||||
|
||||
|
|
@ -317,7 +317,8 @@ bool CRS241213::decode(unsigned char* data)
|
|||
|
||||
// apply error to data
|
||||
if (num1 != 0) {
|
||||
HB[locn[j]] = HB[locn[j]] ^ (rsGFexp[(rsGFlog[num1] + rsGFlog[num2] + 63 - rsGFlog[den]) % 63]);
|
||||
if(locn[j] < 24)
|
||||
HB[locn[j]] = HB[locn[j]] ^ (rsGFexp[(rsGFlog[num1] + rsGFlog[num2] + 63 - rsGFlog[den]) % 63]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue