From 59ebdce605e4da59da066f19c7e7a9581431e6ad Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 25 Mar 2025 18:46:38 -0400 Subject: output_pin: Fix handling of template rendering errors Make sure to assign 'value' on a rendering error to avoid an internal error. Signed-off-by: Kevin O'Connor --- klippy/extras/output_pin.py | 1 + 1 file changed, 1 insertion(+) (limited to 'klippy/extras') diff --git a/klippy/extras/output_pin.py b/klippy/extras/output_pin.py index 24d27a62..dc9959ce 100644 --- a/klippy/extras/output_pin.py +++ b/klippy/extras/output_pin.py @@ -228,6 +228,7 @@ class PrinterOutputPin: value = float(text) except ValueError as e: logging.exception("output_pin template render error") + value = 0. self.gcrq.send_async_request(value) cmd_SET_PIN_help = "Set the value of an output pin" def cmd_SET_PIN(self, gcmd): -- cgit v1.2.3-70-g09d2