/m108_support.py Secret
Last active
June 10, 2020 17:39
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 handle_m108(comm_instance, phase, cmd, cmd_type, gcode, *args, **kwargs): | |
if gcode != "M108": | |
return | |
command_to_send = cmd.encode("ascii", errors="replace") | |
if comm_instance.isPrinting() or comm_instance._alwaysSendChecksum: | |
comm_instance._do_increment_and_send_with_checksum(command_to_send) | |
else: | |
comm_instance._do_send_without_checksum(command_to_send) | |
return None, | |
def update_hook(*args, **kwargs): | |
return dict(m108_support=dict(type="jsondata", | |
jsondata="https://gist.githubusercontent.com/foosel/12e89d885c32b3adb81f5a999331f151/raw/version.js", | |
url="https://gist.githubusercontent.com/foosel/12e89d885c32b3adb81f5a999331f151/raw/m108_support.py", | |
method="single_file_plugin")) | |
__plugin_name__ = "Support for M108" | |
__plugin_author__ = "Gina Häußge" | |
__plugin_pythoncompat__ = ">=2.7,<4" | |
__plugin_url__ = "https://gist.github.com/foosel/12e89d885c32b3adb81f5a999331f151" | |
__plugin_hooks__ = { | |
"octoprint.comm.protocol.gcode.queuing": handle_m108, | |
"octoprint.plugin.softwareupdate.check_config": update_hook | |
} |
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
{ | |
"version": "1.0.3" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment