From 46f0e41bd3d0980b9062795c89f541c11dc5c841 Mon Sep 17 00:00:00 2001 From: "Shell M. Shrader" Date: Mon, 13 Dec 2021 15:54:58 -0500 Subject: [PATCH] fixes #23 --- octoprint_bettergrblsupport/__init__.py | 7 ++++--- setup.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/octoprint_bettergrblsupport/__init__.py b/octoprint_bettergrblsupport/__init__.py index ea9cd1f..36141a0 100644 --- a/octoprint_bettergrblsupport/__init__.py +++ b/octoprint_bettergrblsupport/__init__.py @@ -434,9 +434,10 @@ def hook_gcode_sending(self, comm_instance, phase, cmd, cmd_type, gcode, *args, return self.helloCommand - # suppress comments - if cmd.upper().lstrip().startswith(';') or cmd.upper().lstrip().startswith('('): - self._logger.debug('Ignoring comment [%s]', cmd) + # suppress comments and extraneous commands that may cause wayward + # grbl instances to error out + if cmd.upper().lstrip().startswith(tuple([';', '(', '%'])): + self._logger.debug('Ignoring extraneous [%s]', cmd) return (None, ) # suppress reset line #s diff --git a/setup.py b/setup.py index 12e9de3..c3c3716 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ plugin_name = "Better Grbl Support" # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module -plugin_version = "1.7.6dev1" +plugin_version = "1.7.6dev2" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module