clocksync: Default mcu_freq to 1 instead of 0

This prevents divide by zero errors during stats output if the stats
are generated before a connection completes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-09-27 20:07:46 -04:00
parent 6469cce2bc
commit 1518032606
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ class ClockSync:
self.serial = None
self.status_timer = self.reactor.register_timer(self._status_event)
self.status_cmd = None
self.mcu_freq = 0.
self.mcu_freq = 1.
self.last_clock = 0
self.min_half_rtt = 999999999.9
self.min_half_rtt_time = 0.