-
-
Save jneilliii/b6206ffa48a52e2904d551d9c1484567 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
import octoprint.plugin | |
import re | |
class PrusaXLTempFixPlugin(octoprint.plugin.StartupPlugin, octoprint.plugin.RestartNeedingPlugin): | |
def __init__(self): | |
self.prusa_regex = re.compile(r"C:-30.00/0.00 ") | |
def gcode_callback(self, comm, line, *args, **kwargs): | |
if not self.prusa_regex.match(line): | |
return line | |
line = self.prusa_regex.sub('', line) | |
return line | |
__plugin_name__ = "Prusa XL Temp Fix" | |
__plugin_pythoncompat__ = ">=3,<4" | |
__plugin_version__ = "0.1.0" | |
__plugin_implementation__ = PrusaXLTempFixPlugin() | |
__plugin_hooks__ = { | |
"octoprint.comm.protocol.gcode.received": __plugin_implementation__.gcode_callback | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment