From 00706dec21446b6e4a869dced320c931bbc08d79 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 27 Mar 2021 14:50:32 -0400 Subject: [PATCH] output_pin: Fix bug in setting of self.resend_interval Only set resend_interval if a mcu_duration is specified. This fixes a bug introduced in commit 861144d8. Signed-off-by: Kevin O'Connor --- klippy/extras/output_pin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/klippy/extras/output_pin.py b/klippy/extras/output_pin.py index 3d6a6772..b59611fb 100644 --- a/klippy/extras/output_pin.py +++ b/klippy/extras/output_pin.py @@ -41,7 +41,8 @@ class PrinterOutputPin: minval=0.500, maxval=MAX_SCHEDULE_TIME) self.mcu_pin.setup_max_duration(max_mcu_duration) - self.resend_interval = max_mcu_duration - RESEND_HOST_TIME + if max_mcu_duration: + self.resend_interval = max_mcu_duration - RESEND_HOST_TIME self.last_value = config.getfloat( 'value', 0., minval=0., maxval=self.scale) / self.scale