mcu: Log the mcu clock each time print_time is synchronized

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-03-30 12:51:10 -04:00
parent 63b6bab5c3
commit 7fc9ba7d3a
1 changed files with 4 additions and 1 deletions

View File

@ -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: