diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-09-27 20:07:46 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-09-27 20:07:46 -0400 |
commit | 15180326063e216993da913f793f8fbc961d5f63 (patch) | |
tree | 86733e41d45038fbcb826376c1bb42d9f2f29175 | |
parent | 6469cce2bca855d52f44dd596941423a674af8df (diff) | |
download | kutter-15180326063e216993da913f793f8fbc961d5f63.tar.gz kutter-15180326063e216993da913f793f8fbc961d5f63.tar.xz kutter-15180326063e216993da913f793f8fbc961d5f63.zip |
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>
-rw-r--r-- | klippy/clocksync.py | 2 |
1 files changed, 1 insertions, 1 deletions
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. |