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,6 +83,7 @@ class ClockSync:
|
||||||
clock_fast = False
|
clock_fast = False
|
||||||
new_time = sent_time + self.min_half_rtt
|
new_time = sent_time + self.min_half_rtt
|
||||||
if clock_fast != self.last_clock_fast:
|
if clock_fast != self.last_clock_fast:
|
||||||
|
if sent_time > self.min_half_rtt_time:
|
||||||
self.prev_est = self.clock_est
|
self.prev_est = self.clock_est
|
||||||
self.last_clock_fast = clock_fast
|
self.last_clock_fast = clock_fast
|
||||||
new_freq = (clock - self.prev_est[1]) / (new_time - self.prev_est[0])
|
new_freq = (clock - self.prev_est[1]) / (new_time - self.prev_est[0])
|
||||||
|
|
Loading…
Reference in New Issue