mirror of
https://github.com/romanz/amodem.git
synced 2026-02-24 16:18:12 +08:00
detect: move TIMEOUT to config module
This commit is contained in:
@@ -17,6 +17,7 @@ class Configuration(object):
|
||||
|
||||
# receiver config
|
||||
skip_start = 0.1
|
||||
timeout = 60.0
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self.__dict__.update(**kwargs)
|
||||
|
||||
@@ -19,15 +19,13 @@ class Detector(object):
|
||||
SEARCH_WINDOW = int(0.1 * CARRIER_DURATION)
|
||||
START_PATTERN_LENGTH = SEARCH_WINDOW // 4
|
||||
|
||||
TIMEOUT = 10.0 # [seconds]
|
||||
|
||||
def __init__(self, config, pylab):
|
||||
self.freq = config.Fc
|
||||
self.omega = 2 * np.pi * self.freq / config.Fs
|
||||
self.Nsym = config.Nsym
|
||||
self.Tsym = config.Tsym
|
||||
self.maxlen = config.baud # 1 second of symbols
|
||||
self.max_offset = self.TIMEOUT * config.Fs
|
||||
self.max_offset = config.timeout * config.Fs
|
||||
self.plt = pylab
|
||||
|
||||
def _wait(self, samples):
|
||||
|
||||
Reference in New Issue
Block a user