mirror of
https://github.com/romanz/amodem.git
synced 2026-04-20 21:26:39 +08:00
Move import ECC to calling function.
This commit is contained in:
2
recv.py
2
recv.py
@@ -7,7 +7,6 @@ logging.basicConfig(level=0, format='%(message)s')
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
import sigproc
|
||||
import ecc
|
||||
from common import *
|
||||
|
||||
COHERENCE_THRESHOLD = 0.9
|
||||
@@ -164,6 +163,7 @@ def main(t, x):
|
||||
if data_bits is None:
|
||||
log.info('Cannot demodulate symbols!')
|
||||
else:
|
||||
import ecc
|
||||
data = iterate(data_bits, bufsize=8, advance=8, func=to_bytes)
|
||||
data = ''.join(c for _, c in data)
|
||||
data = ecc.decode(data)
|
||||
|
||||
Reference in New Issue
Block a user