From: Antonio Ospite Date: Sat, 2 Jan 2016 15:19:16 +0000 (+0100) Subject: CallDistanceTransceiver.py: use the modulator member in test_send_receive() X-Git-Url: https://git.ao2.it/SaveMySugar/python3-savemysugar.git/commitdiff_plain/78fd1e817fd08b35b4e04d3315374c9c9bc0d898?ds=inline CallDistanceTransceiver.py: use the modulator member in test_send_receive() --- diff --git a/src/savemysugar/CallDistanceTransceiver.py b/src/savemysugar/CallDistanceTransceiver.py index 4a7e139..588c985 100755 --- a/src/savemysugar/CallDistanceTransceiver.py +++ b/src/savemysugar/CallDistanceTransceiver.py @@ -427,21 +427,24 @@ def test_send_receive(): def get_response(self, response): # pylint: disable=unused-argument - setup_time = random.uniform(self.transceiver.call_setup_time_min, - self.transceiver.call_setup_time_max) + setup_time = random.uniform(self.transceiver.modulator.period_min, + self.transceiver.modulator.period_max) if self.ring_count == 0: # dummy ring pass elif self.ring_count == 1: # received a '.' - time.sleep(setup_time + self.transceiver.dot_time.dist) + dot_time = self.transceiver.modulator.dot_time.dist + time.sleep(setup_time + dot_time) elif self.ring_count == 2: # received a '/' - time.sleep(setup_time + self.transceiver.wordspace_time.dist) + wordspace_time = self.transceiver.modulator.wordspace_time.dist + time.sleep(setup_time + wordspace_time) else: # received an 'EOM' - time.sleep(setup_time + self.transceiver.eom_time.dist) + eom_time = self.transceiver.modulator.eom_time.dist + time.sleep(setup_time + eom_time) self.ring_count += 1 self.ring_count %= 4