aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2025-03-25 18:46:38 -0400
committerKevin O'Connor <kevin@koconnor.net>2025-03-25 18:46:38 -0400
commit59ebdce605e4da59da066f19c7e7a9581431e6ad (patch)
treeec1e5d629c414eb045b024a41bde4d8cec3927f2 /klippy/extras
parent310747a63684516a010e8dce7a0bf18990aa2b01 (diff)
downloadkutter-59ebdce605e4da59da066f19c7e7a9581431e6ad.tar.gz
kutter-59ebdce605e4da59da066f19c7e7a9581431e6ad.tar.xz
kutter-59ebdce605e4da59da066f19c7e7a9581431e6ad.zip
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras')
-rw-r--r--klippy/extras/output_pin.py1
1 files changed, 1 insertions, 0 deletions
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):