Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (13 sloc) 527 Bytes
# coding=utf-8
def custom_atcommand_handler(comm, phase, command, parameters, tags=None, *args, **kwargs):
if command != "wait":
if tags is None:
tags = set()
if "script:afterPrintPaused" in tags:
# This makes sure we don't run into an infinite loop if the user included @wait in the afterPrintPaused
# GCODE script for whatever reason
comm.setPause(True, tags=tags)
__plugin_name__ = "Custom @ command"
__plugin_hooks__ = {"octoprint.comm.protocol.atcommand.queuing": custom_atcommand_handler}