diff --git a/amodem/config.py b/amodem/config.py index 6311077..2d4246f 100644 --- a/amodem/config.py +++ b/amodem/config.py @@ -17,6 +17,7 @@ class Configuration(object): # receiver config skip_start = 0.1 + timeout = 60.0 def __init__(self, **kwargs): self.__dict__.update(**kwargs) diff --git a/amodem/detect.py b/amodem/detect.py index e8dba4d..4f14050 100644 --- a/amodem/detect.py +++ b/amodem/detect.py @@ -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):