diff --git a/AUTHORS.md b/AUTHORS.md index 25fca2f57..5d111ebae 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -146,6 +146,7 @@ date of first contribution): * ["sparxooo"](https://github.com/sparxooo) * ["Stevil Knevil"](https://github.com/StevilKnevil) * [ldursw](https://github.com/ldursw) + * [Ian Wilt](https://github.com/ianwiltdotcom) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/docs/events/index.rst b/docs/events/index.rst index 71a55d68e..87208e6fb 100644 --- a/docs/events/index.rst +++ b/docs/events/index.rst @@ -607,6 +607,10 @@ Eject EStop An ``M112`` was sent to the printer through OctoPrint (not triggered when printing from SD!) +FilamentChange + An ''M600'', ''M701'' or ''M702'' was sent to the printer through OctoPrint (not triggered when printing from SD!) + + PositionUpdate The response to an ``M114`` was received by OctoPrint. The payload contains the current position information parsed from the response and (in the case of the selected tool ``t`` and the current feedrate ``f``) tracked diff --git a/src/octoprint/events.py b/src/octoprint/events.py index eb2e0878e..c29e22f50 100644 --- a/src/octoprint/events.py +++ b/src/octoprint/events.py @@ -106,6 +106,7 @@ class Events(object): REGISTERED_MESSAGE_RECEIVED = "RegisteredMessageReceived" COMMAND_SUPPRESSED = "CommandSuppressed" INVALID_TOOL_REPORTED = "InvalidToolReported" + FILAMENT_CHANGE = "FilamentChange" # Timelapse CAPTURE_START = "CaptureStart" diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 963ebd997..7f69652a0 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -301,6 +301,10 @@ gcodeToEvent = { # motors on/off "M80": Events.POWER_ON, "M81": Events.POWER_OFF, + # filament change + "M600": Events.FILAMENT_CHANGE, + "M701": Events.FILAMENT_CHANGE, + "M702": Events.FILAMENT_CHANGE, }