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 1/3] 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: From 957213321ee2840a8e8201cf037f177c09b8d655 Mon Sep 17 00:00:00 2001 From: Lars Norpchen Date: Thu, 9 May 2013 08:07:33 -0700 Subject: [PATCH 2/3] Print 'unknown G/M code' warnings to console once --- octoprint/util/gcodeInterpreter.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/octoprint/util/gcodeInterpreter.py b/octoprint/util/gcodeInterpreter.py index 797d954..48a8399 100644 --- a/octoprint/util/gcodeInterpreter.py +++ b/octoprint/util/gcodeInterpreter.py @@ -72,6 +72,8 @@ class gcode(object): pathType = 'CUSTOM'; startCodeDone = False currentLayer = [] + unknownGcodes={} + unknownMcodes={} currentPath = gcodePath('move', pathType, layerThickness, pos.copy()) currentPath.list[0].e = totalExtrusion currentPath.list[0].extrudeAmountMultiply = extrudeAmountMultiply @@ -220,7 +222,9 @@ class gcode(object): if z is not None: posOffset.z = pos.z - z else: - print "Unknown G code:" + str(G) + if G not in unknownGcodes: + print "Unknown G code:" + str(G) + unknownGcodes[G] = True else: M = self.getCodeInt(line, 'M') if M is not None: @@ -267,7 +271,9 @@ class gcode(object): if s != None: extrudeAmountMultiply = s / 100.0 else: - print "Unknown M code:" + str(M) + if M not in unknownMcodes: + print "Unknown M code:" + str(M) + unknownMcodes[M] = True self.layerList.append(currentLayer) self.extrusionAmount = maxExtrusion self.totalMoveTimeMinute = totalMoveTimeMinute From b61db6dc0f9a7e58f688b64bbee614ee679af454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marlon=20W=C3=BCnnemann?= Date: Thu, 16 May 2013 16:43:09 +0300 Subject: [PATCH 3/3] jQuery over SSL and GoogleCDN Issue #127 --- octoprint/templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octoprint/templates/index.html b/octoprint/templates/index.html index ed22f68..8f89a78 100644 --- a/octoprint/templates/index.html +++ b/octoprint/templates/index.html @@ -535,7 +535,7 @@ {% include 'settings.html' %} {% include 'dialogs.html' %} - +