output_pin: fix time difference calculation

Signed-off-by: Pascal Pieper <accounts@pascalpieper.de>
This commit is contained in:
Pascal Pieper 2021-08-08 22:35:34 +02:00 committed by KevinOConnor
parent df98470659
commit 73a7840697
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ class PrinterOutputPin:
systime = self.reactor.monotonic() systime = self.reactor.monotonic()
print_time = self.mcu_pin.get_mcu().estimated_print_time(systime) print_time = self.mcu_pin.get_mcu().estimated_print_time(systime)
time_diff = print_time - (self.last_print_time + self.resend_interval) time_diff = (self.last_print_time + self.resend_interval) - print_time
if time_diff > 0.: if time_diff > 0.:
# Reschedule for resend time # Reschedule for resend time
return systime + time_diff return systime + time_diff