detect: move TIMEOUT to config module

This commit is contained in:
Roman Zeyde
2015-04-23 09:43:58 +03:00
parent fce906df0a
commit f476055cf2
2 changed files with 2 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ class Configuration(object):
# receiver config
skip_start = 0.1
timeout = 60.0
def __init__(self, **kwargs):
self.__dict__.update(**kwargs)

View File

@@ -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):