mcu: Calculate homing rest_ticks via standard print_time_to_clock() call

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-03-06 16:33:54 -05:00
parent a61d483e21
commit 62fcc5a56f
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class MCU_endstop:
def home_start(self, print_time, sample_time, sample_count, rest_time,
triggered=True):
clock = self._mcu.print_time_to_clock(print_time)
rest_ticks = int(rest_time * self._mcu.get_adjusted_freq())
rest_ticks = self._mcu.print_time_to_clock(print_time+rest_time) - clock
self._next_query_print_time = print_time + self.RETRY_QUERY
self._min_query_time = self._reactor.monotonic()
self._last_sent_time = 0.