Skip to content

Commit

Permalink
Merge branch 'devel' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
foosel committed May 31, 2021
2 parents 4357354 + e915ecb commit 6763368
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 2 additions & 0 deletions octoprint_firmware_check/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = """
Expand All @@ -42,6 +43,7 @@
"firmware-unsafe": FirmwareUnsafeChecks.as_dict(),
"firmware-broken": FirmwareBrokenChecks.as_dict(),
"firmware-development": FirmwareDevelopmentChecks.as_dict(),
"firmware-hostcommands": FirmwareHostcommandsChecks.as_dict(),
}


Expand Down
34 changes: 34 additions & 0 deletions octoprint_firmware_check/checks/firmware_hostcommands.py
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6763368

Please sign in to comment.