mirror of https://github.com/Desuuuu/klipper.git
clocksync: Don't update prev_est on min rtt updates
Average frequency changes over the longer interval on a sample that causes a minimum rtt update. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
ba837c2641
commit
6f65ba9214
|
@ -83,7 +83,8 @@ class ClockSync:
|
|||
clock_fast = False
|
||||
new_time = sent_time + self.min_half_rtt
|
||||
if clock_fast != self.last_clock_fast:
|
||||
self.prev_est = self.clock_est
|
||||
if sent_time > self.min_half_rtt_time:
|
||||
self.prev_est = self.clock_est
|
||||
self.last_clock_fast = clock_fast
|
||||
new_freq = (clock - self.prev_est[1]) / (new_time - self.prev_est[0])
|
||||
self.serial.set_clock_est(
|
||||
|
|
Loading…
Reference in New Issue