fake_trx/clck_gen.py: reset the clck_src when calling stop()

Change-Id: I1043f71a2cbe856a0cb605db8a7feab9defa6afd
This commit is contained in:
Vadim Yanitskiy 2017-12-09 01:24:05 +07:00
parent 05ff6b0667
commit 26ecb9460e
1 changed files with 4 additions and 0 deletions

View File

@ -51,6 +51,7 @@ class CLCKGen:
def __init__(self, clck_links, clck_start = 0, ind_period = 102):
self.clck_links = clck_links
self.ind_period = ind_period
self.clck_start = clck_start
self.clck_src = clck_start
# Calculate counter time
@ -68,6 +69,9 @@ class CLCKGen:
self.timer.cancel()
self.timer = None
# Reset the clock source
self.clck_src = self.clck_start
def send_clck_ind(self):
# Keep clock cycle
if self.clck_src % self.GSM_SUPERFRAME >= 0: