From 90a1edbbcfb2dc5ebe4620aa159f3c52a275ac42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sun, 9 Jun 2013 16:33:59 +0200 Subject: [PATCH] Testing out a space between the N-prefix and the command --- octoprint/util/comm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/octoprint/util/comm.py b/octoprint/util/comm.py index a03f5c3..26baa65 100644 --- a/octoprint/util/comm.py +++ b/octoprint/util/comm.py @@ -900,8 +900,8 @@ class MachineCom(object): def _doSendWithChecksum(self, cmd, lineNumber): self._logger.debug("Sending cmd '%s' with lineNumber %r" % (cmd, lineNumber)) - checksum = reduce(lambda x,y:x^y, map(ord, "N%d%s" % (lineNumber, cmd))) - commandToSend = "N%d%s*%d" % (lineNumber, cmd, checksum) + checksum = reduce(lambda x,y:x^y, map(ord, "N%d %s" % (lineNumber, cmd))) + commandToSend = "N%d %s*%d" % (lineNumber, cmd, checksum) self._doSendWithoutChecksum(commandToSend) def _doSendWithoutChecksum(self, cmd):