From 47cfcd7b122464fa8d895295b193e1bff3983a91 Mon Sep 17 00:00:00 2001 From: Salandora Date: Mon, 26 May 2014 10:45:55 +0200 Subject: [PATCH 1/2] Event Progress bugfix --- src/octoprint/events.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/octoprint/events.py b/src/octoprint/events.py index 6b332454..638713dc 100644 --- a/src/octoprint/events.py +++ b/src/octoprint/events.py @@ -330,8 +330,8 @@ class CommandTrigger(GenericEventListener): if "job" in currentData.keys() and currentData["job"] is not None: params["__filename"] = currentData["job"]["file"]["name"] if "progress" in currentData.keys() and currentData["progress"] is not None \ - and "progress" in currentData["progress"].keys() and currentData["progress"]["progress"] is not None: - params["__progress"] = str(round(currentData["progress"]["progress"] * 100)) + and "completion" in currentData["progress"].keys() and currentData["progress"]["completion"] is not None: + params["__progress"] = str(round(currentData["progress"]["completion"] * 100)) # now add the payload keys as well if isinstance(payload, dict): From 3d6cb623f0c5f0f94068f3272992aba7a8912b55 Mon Sep 17 00:00:00 2001 From: Salandora Date: Mon, 26 May 2014 10:46:47 +0200 Subject: [PATCH 2/2] Autodetect Baudrate bugfix --- src/octoprint/util/comm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 1c0f49d9..23706171 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -944,7 +944,7 @@ class MachineCom(object): try: self._log("Connecting to: %s" % self._port) if self._baudrate == 0: - self._serial = serial.Serial(str(self._port), 115200, timeout=0.1, writeTimeout=10000) + self._serial = serial.Serial(str(self._port), 115200, timeout=settings().getFloat(["serial", "timeout", "connection"]), writeTimeout=10000) else: self._serial = serial.Serial(str(self._port), self._baudrate, timeout=settings().getFloat(["serial", "timeout", "connection"]), writeTimeout=10000) except: