From 7fc9ba7d3a2bce4714fac698d0474e49b2e0e868 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 30 Mar 2017 12:51:10 -0400 Subject: [PATCH] mcu: Log the mcu clock each time print_time is synchronized Signed-off-by: Kevin O'Connor --- klippy/mcu.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/klippy/mcu.py b/klippy/mcu.py index 4d444f4c8..530da1185 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -570,7 +570,10 @@ class MCU: return MCU_adc(self, pin) # Clock syncing def set_print_start_time(self, eventtime): - est_mcu_time = self.serial.get_clock(eventtime) / self._mcu_freq + clock = self.serial.get_clock(eventtime) + logging.info("Synchronizing mcu clock at %.6f to %d" % ( + eventtime, clock)) + est_mcu_time = clock / self._mcu_freq self._print_start_time = est_mcu_time def get_print_buffer_time(self, eventtime, print_time): if self.is_shutdown: