msgblock: Add clock estimation helper functions

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-02-15 19:18:51 -05:00
parent f938caa0d2
commit 620f77ddb7
7 changed files with 65 additions and 22 deletions

View file

@ -200,9 +200,9 @@ class SerialReader:
self.serialqueue = self.ffi_main.gc(
self.ffi_lib.serialqueue_alloc(self.serial_dev.fileno(), 'f', 0),
self.ffi_lib.serialqueue_free)
def set_clock_est(self, freq, last_time, last_clock):
def set_clock_est(self, freq, conv_time, conv_clock, last_clock):
self.ffi_lib.serialqueue_set_clock_est(
self.serialqueue, freq, last_time, last_clock)
self.serialqueue, freq, conv_time, conv_clock, last_clock)
def disconnect(self):
if self.serialqueue is not None:
self.ffi_lib.serialqueue_exit(self.serialqueue)