-
-
Save foosel/9ca02e8a3ea0cb748f4b220981eab12d 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 | |
from __future__ import absolute_import | |
def convert_TF_SD(comm, line, *args, **kwargs): | |
if "TF" not in line: | |
return line | |
return line.replace("TF","SD") | |
__plugin_name__ = "Convert TF to SD" | |
__plugin_version__ = "1.0.2" | |
__plugin_author__ = "@b-morgan" | |
__plugin_description__ = "Convert TF to SD in printer responses" | |
__plugin_pythoncompat__ = ">=2.7,<4" | |
__plugin_hooks__ = { | |
"octoprint.comm.protocol.gcode.received": (convert_TF_SD, 1) | |
} |
Done, and upped the version to 1.0.2
Whenever I use this script, my ender 3 pro gives an "SSCB~1.GCO 4480601" error and OctoPrint disconnects. Any solution besides setting OctoPrint to ignore errors?
The only thing this script does is replace two characters from the printer to OctoPrint. So whatever is going on there, it's either unrelated to the plugin or something really really weird and your should open a Get Help thread on the forums.
Question: Are file names from the SD card supposed to be truncated? Local gcode files show the full name, whereas ones from the SD card are shortened.
Yes, and that is even in the FAQ ;) Please reach out on the forums.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@foosel you may want to adjust the ordering on this. Ran into an issue on the discord. This seemed to have fixed it.
https://gist.githubusercontent.com/kantlivelong/bd79e474ecd86959549c12201288b7fb/raw/2d073b56775a9bc96b18c1b21918b746a1204faa/convert_TF_SD.py