diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-05-02 11:08:02 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-05-02 11:08:02 -0400 |
commit | f4429a54a9bf4a72acc809103996f14f0040b75a (patch) | |
tree | 361c1ca158d6b2ad88b14116921e3e45e9898670 /klippy/clocksync.py | |
parent | 07e8011f51667c2b61676b2c77a510569cbf1ec6 (diff) | |
download | kutter-f4429a54a9bf4a72acc809103996f14f0040b75a.tar.gz kutter-f4429a54a9bf4a72acc809103996f14f0040b75a.tar.xz kutter-f4429a54a9bf4a72acc809103996f14f0040b75a.zip |
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/clocksync.py')
-rw-r--r-- | klippy/clocksync.py | 3 |
1 files changed, 2 insertions, 1 deletions
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') |