From cccf74bcf8c2a8fb5f5748186db6869f945d05d2 Mon Sep 17 00:00:00 2001 From: Bryan Mayland Date: Tue, 12 May 2020 15:32:16 +0100 Subject: [PATCH] Do not uppercase user-supplied gcode --- octoprint_enclosure/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/octoprint_enclosure/__init__.py b/octoprint_enclosure/__init__.py index f01f06c..6aff8a1 100644 --- a/octoprint_enclosure/__init__.py +++ b/octoprint_enclosure/__init__.py @@ -100,7 +100,7 @@ class EnclosurePlugin(octoprint.plugin.StartupPlugin, octoprint.plugin.TemplateP for command in command_string.split(' '): index = command.upper().find(gcode.upper()) if not index == -1: - return command.replace(gcode, '').upper() + return command.replace(gcode, '') return -1 # ~~ StartupPlugin mixin @@ -1261,8 +1261,8 @@ class EnclosurePlugin(octoprint.plugin.StartupPlugin, octoprint.plugin.TemplateP item['time'] = time_now for line in self._settings.get(["filament_sensor_gcode"]).split('\n'): if line: - self._printer.commands(line.strip().upper()) - self._logger.info("Sending GCODE command: %s", line.strip().upper()) + self._printer.commands(line.strip()) + self._logger.info("Sending GCODE command: %s", line.strip()) time.sleep(0.2) for notification in self.notifications: if notification['filamentChange']: @@ -1378,8 +1378,8 @@ class EnclosurePlugin(octoprint.plugin.StartupPlugin, octoprint.plugin.TemplateP def send_gcode_command(self, command): for line in command.split('\n'): if line: - self._printer.commands(line.strip().upper()) - self._logger.info("Sending GCODE command: %s", line.strip().upper()) + self._printer.commands(line.strip()) + self._logger.info("Sending GCODE command: %s", line.strip()) time.sleep(0.2) def handle_printer_action(self, channel): @@ -1890,4 +1890,4 @@ def __plugin_load__(): __plugin_hooks__ = { "octoprint.comm.protocol.gcode.queuing" : __plugin_implementation__.hook_gcode_queuing, "octoprint.plugin.softwareupdate.check_config": __plugin_implementation__.get_update_information - } \ No newline at end of file + }