From f4429a54a9bf4a72acc809103996f14f0040b75a Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 2 May 2020 11:08:02 -0400 Subject: [PATCH] clocksync: Don't filter any of the initial syncronization clock messages Add a 50ms delay from the initial clock measurement to the first get_clock query. Disable the prediction_variance filter on each get_clock query so that none of those measurements are ignored. Signed-off-by: Kevin O'Connor --- klippy/clocksync.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/klippy/clocksync.py b/klippy/clocksync.py index f2228b37..ccead0f6 100644 --- a/klippy/clocksync.py +++ b/klippy/clocksync.py @@ -39,9 +39,10 @@ class ClockSync: self.prediction_variance = (.001 * self.mcu_freq)**2 # Enable periodic get_clock timer for i in range(8): + self.reactor.pause(self.reactor.monotonic() + 0.050) + self.last_prediction_time = -9999. params = serial.send_with_response('get_clock', 'clock') self._handle_clock(params) - self.reactor.pause(self.reactor.monotonic() + 0.050) self.get_clock_cmd = serial.get_msgparser().create_command('get_clock') self.cmd_queue = serial.alloc_command_queue() serial.register_response(self._handle_clock, 'clock')