From 0bb17818e1baee8e3ee68d5a6d550c14b85cc8a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 16 Apr 2013 14:45:25 +0200 Subject: [PATCH] Do not convert command to send to upper case after checksum was calculated Removed for the time being until I have a better idea on how allow stuff like "g28 x0 y0" to be autoconverted to "G28 X0 Y0" but autoconvert something like "m117 Some case sensitive text" only to "M117 Some case sensitive text" Should fix #103 (cherry picked from commit 628ffb5) --- octoprint/static/js/ui.js | 9 +++++++++ octoprint/util/comm.py | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/octoprint/static/js/ui.js b/octoprint/static/js/ui.js index bf0831c..1b5095a 100644 --- a/octoprint/static/js/ui.js +++ b/octoprint/static/js/ui.js @@ -1563,6 +1563,15 @@ $(function() { $("#terminal-send").click(function () { var command = $("#terminal-command").val(); + + /* + var re = /^([gm][0-9]+)(\s.*)?/; + var commandMatch = command.match(re); + if (commandMatch != null) { + command = commandMatch[1].toUpperCase() + ((commandMatch[2] !== undefined) ? commandMatch[2] : ""); + } + */ + if (command) { $.ajax({ url: AJAX_BASEURL + "control/command", diff --git a/octoprint/util/comm.py b/octoprint/util/comm.py index 4deb8bf..9ef8893 100644 --- a/octoprint/util/comm.py +++ b/octoprint/util/comm.py @@ -466,7 +466,6 @@ class MachineCom(object): self.close() def _sendCommand(self, cmd): - cmd = cmd.upper() if self._serial is None: return if 'M109' in cmd or 'M190' in cmd: