clocksync: Start with adjusted_freq of 1.0

Avoid setting adjusted_freq to 0.0 as that can cause divide by zero
failures at startup.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-10-13 21:07:32 -04:00
parent e0f275cddf
commit 77fea562c4
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ class SecondarySync(ClockSync):
def __init__(self, reactor, main_sync):
ClockSync.__init__(self, reactor)
self.main_sync = main_sync
self.clock_adj = (0., 0.)
self.clock_adj = (0., 1.)
def connect(self, serial):
ClockSync.connect(self, serial)
self.clock_adj = (0., self.mcu_freq)