From 62215e8ce0bf5c38934756f612eb0345429fe0b9 Mon Sep 17 00:00:00 2001 From: ptrkrysik Date: Thu, 30 Oct 2014 08:59:38 +0100 Subject: changed name of a variable to better reflect it role in clock_offset_control --- python/receiver/clock_offset_control.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/receiver/clock_offset_control.py b/python/receiver/clock_offset_control.py index 506b0fd..41c54a0 100644 --- a/python/receiver/clock_offset_control.py +++ b/python/receiver/clock_offset_control.py @@ -44,7 +44,7 @@ class clock_offset_control(gr.basic_block): self.counter = 0 self.last_state = "" self.timer = Timer(0.5, self.timed_reset) - self.last_ppm = -1e6 + self.last_ppm_estimate = -1e6 def process_measurement(self,msg): if pmt.is_tuple(msg): @@ -76,10 +76,10 @@ class clock_offset_control(gr.basic_block): if self.counter == 5: self.counter = 0 - if abs(self.last_ppm-self.ppm_estimate) > 0.1: + if abs(self.last_ppm_estimate-self.ppm_estimate) > 0.1: msg_ppm = pmt.from_double(ppm) self.message_port_pub(pmt.intern("ppm"), msg_ppm) - self.last_ppm = self.ppm_estimate + self.last_ppm_estimate = self.ppm_estimate else: self.counter=self.counter+1 elif state == "sync_loss": -- cgit v1.2.3