From 124d96a1458e3391a0d03218112b26dd4a3f7523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 26 May 2021 19:30:56 +0200 Subject: [PATCH 1/2] :sparkles: Add check for missing HOST_ACTION_COMMANDS support See also MarlinFirmware/Marlin#21987 Cc @apbarratt --- octoprint_firmware_check/__init__.py | 2 ++ .../checks/firmware_hostcommands.py | 34 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 octoprint_firmware_check/checks/firmware_hostcommands.py diff --git a/octoprint_firmware_check/__init__.py b/octoprint_firmware_check/__init__.py index 43c5228..1d9cde0 100644 --- a/octoprint_firmware_check/__init__.py +++ b/octoprint_firmware_check/__init__.py @@ -18,6 +18,7 @@ from .checks import Severity from .checks.firmware_broken import FirmwareBrokenChecks from .checks.firmware_development import FirmwareDevelopmentChecks +from .checks.firmware_hostcommands import FirmwareHostcommandsChecks from .checks.firmware_unsafe import FirmwareUnsafeChecks TERMINAL_WARNING = """ @@ -42,6 +43,7 @@ "firmware-unsafe": FirmwareUnsafeChecks.as_dict(), "firmware-broken": FirmwareBrokenChecks.as_dict(), "firmware-development": FirmwareDevelopmentChecks.as_dict(), + "firmware-hostcommands": FirmwareHostcommandsChecks.as_dict(), } diff --git a/octoprint_firmware_check/checks/firmware_hostcommands.py b/octoprint_firmware_check/checks/firmware_hostcommands.py new file mode 100644 index 0000000..74c0556 --- /dev/null +++ b/octoprint_firmware_check/checks/firmware_hostcommands.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +from __future__ import absolute_import, division, print_function, unicode_literals + +__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" +__copyright__ = "Copyright (C) 2021 The OctoPrint Project - Released under terms of the AGPLv3 License" + +from flask_babel import gettext + +from . import NegativeCapCheck, Severity + + +class FirmwareHostcommandsChecks(object): + @classmethod + def as_dict(cls): + return { + "checks": (FirmwareHostcommandsCapCheck(),), + "message": gettext( + "Your printer's firmware supports host action commands, but they are " + "disabled. The firmware will not inform OctoPrint about job pause & " + "cancellations, filament runouts, and similar firmware-side events. If " + "you want this functionality, you need to change your firmware's " + "configuration." + ), + "severity": Severity.INFO, + } + + +class FirmwareHostcommandsCapCheck(NegativeCapCheck): + """ + Firmware reporting disabled HOST_ACTION_COMMANDS capability + """ + + name = "capability" + CAP = "HOST_ACTION_COMMANDS" From e915ecb5b008599fe11ec458bc3b662e720a8211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 31 May 2021 11:17:34 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=96=20Preparing=20release=20of=202?= =?UTF-8?q?021.5.31?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4bc6d3d..43c816a 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ plugin_name = "OctoPrint-FirmwareCheck" # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module -plugin_version = "2021.2.4" +plugin_version = "2021.5.31" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module