From 52a995402441863c1a701eb55c40a7882ee4fff1 Mon Sep 17 00:00:00 2001 From: make-ing Date: Mon, 26 Oct 2015 16:37:04 +0100 Subject: [PATCH] changed back to \n and fixed acc bug --- src/octoprint/util/comm_acc2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/octoprint/util/comm_acc2.py b/src/octoprint/util/comm_acc2.py index 84ff666e..8de3482f 100644 --- a/src/octoprint/util/comm_acc2.py +++ b/src/octoprint/util/comm_acc2.py @@ -167,11 +167,11 @@ class MachineCom(object): return elif self._cmd is None: self._cmd = self._commandQueue.get() - if sum([len(x) for x in self._acc_line_buffer]) + len(self._cmd) +2 < self.RX_BUFFER_SIZE-1: + if sum([len(x) for x in self._acc_line_buffer]) + len(self._cmd) +1 < self.RX_BUFFER_SIZE-1: self._log("Send: %s" % self._cmd) - self._acc_line_buffer.append(self._cmd) + self._acc_line_buffer.append(self._cmd + '\n') try: - self._serial.write(self._cmd + '\r\n') + self._serial.write(self._cmd + '\n') self._process_command_phase("sent", self._cmd) self._cmd = None self._send_event.set()