From 15180326063e216993da913f793f8fbc961d5f63 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 27 Sep 2017 20:07:46 -0400 Subject: [PATCH] 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 --- klippy/clocksync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klippy/clocksync.py b/klippy/clocksync.py index 345700f7..dc63761b 100644 --- a/klippy/clocksync.py +++ b/klippy/clocksync.py @@ -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.