From 22a71f0f527d99e65c4fa8a4f28504445af20597 Mon Sep 17 00:00:00 2001 From: Cort Buffington Date: Wed, 7 Sep 2016 20:03:47 -0500 Subject: [PATCH] Completed! --- RS129.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RS129.py b/RS129.py index d64ac0a..816743b 100644 --- a/RS129.py +++ b/RS129.py @@ -96,7 +96,7 @@ def RS129_encode(_msg): return [parity[2], parity[1], parity[0]] # Apply DMR XOR MASK -def xor_mask(_parity): +def RS129_mask(_parity): xor = [0,0,0] for i in range(len(_parity)): xor[i] = _parity[i] ^ MASK[i] @@ -106,8 +106,8 @@ def xor_mask(_parity): def DMR_RS129_LC_FEC(_message): bin_message = bytearray(_message) parity = RS129_encode(bin_message) - xor_parity = xor_mask(parity) - return chr(xor_parity[0]) + chr(xor_parity[1]) + chr(xor_parity[2]) + masked_parity = RS129_mask(parity) + return chr(masked_parity[0]) + chr(masked_parity[1]) + chr(masked_parity[2]) # For testing the code