Skip to content

Instantly share code, notes, and snippets.

@foosel
Last active February 10, 2021 22:36
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foosel/77e4792921db744a157764f66d1d72a5 to your computer and use it in GitHub Desktop.
Save foosel/77e4792921db744a157764f66d1d72a5 to your computer and use it in GitHub Desktop.
OctoPrint plugin that rewrites received wait responses to echo:busy processing for broken firmware misunderstanding when wait should be used. Place in ~/.octoprint/plugins
# coding=utf-8
import logging
def rewrite_wait_to_busy(comm_instance, line, *args, **kwargs):
if line == "wait" or line.startswith("wait"):
return "echo:busy processing"
else:
return line
__plugin_name__ = "Rewrite wait to busy"
__plugin_description__ = "Rewrites received wait responses to echo:busy processing for broken firmware misunderstanding when wait should be used"
__plugin_author__ = "Gina Häußge"
__plugin_hooks__ = {
"octoprint.comm.protocol.gcode.received": rewrite_wait_to_busy
}
@sense4t
Copy link

sense4t commented Jul 25, 2020

Many thanks ! That little plugin helped me getting my Tronxy X5SA 24V to work with Octoprint (as far as i can see so far by printing the test-cube)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment