aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2023-11-28 12:49:53 -0500
committerKevin O'Connor <kevin@koconnor.net>2023-12-07 17:09:26 -0500
commit99d7af87fd7cd74b9a6eab355eb71327ed3b8256 (patch)
tree55a4546916d3ba440909fd1ffd4be6d02b8458c2 /klippy/extras
parentc491ea669f8b189f72824b9d20f005fb6e86afe7 (diff)
downloadkutter-99d7af87fd7cd74b9a6eab355eb71327ed3b8256.tar.gz
kutter-99d7af87fd7cd74b9a6eab355eb71327ed3b8256.tar.xz
kutter-99d7af87fd7cd74b9a6eab355eb71327ed3b8256.zip
pwm_tool: Notify the toolhead that the move_queue needs to be flushed
Call toolhead.note_kinematic_activity() on each pin update to ensure that those updates will be flushed properly. This fixes "Timer too close" errors on SET_PIN commands that are issued when the toolhead is idle. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras')
-rw-r--r--klippy/extras/pwm_tool.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/klippy/extras/pwm_tool.py b/klippy/extras/pwm_tool.py
index c012bb31..e3a7377c 100644
--- a/klippy/extras/pwm_tool.py
+++ b/klippy/extras/pwm_tool.py
@@ -143,6 +143,8 @@ class PrinterOutputPin:
self.mcu_pin.set_pwm(print_time, value)
self.last_value = value
self.last_print_time = print_time
+ toolhead = self.printer.lookup_object('toolhead')
+ toolhead.note_kinematic_activity(print_time)
cmd_SET_PIN_help = "Set the value of an output pin"
def cmd_SET_PIN(self, gcmd):
# Read requested value