From 628ffb5600d0b3e7394635bbf8c30b7094f1e1fd 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 --- 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 2ccb7be..0e632f4 100644 --- a/octoprint/static/js/ui.js +++ b/octoprint/static/js/ui.js @@ -1798,6 +1798,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: