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:
parent
6469cce2bc
commit
1518032606
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue