From 153b5de1d43661408af96e6ff8588b6263f4d36c Mon Sep 17 00:00:00 2001 From: Juha-Jarmo Heinonen Date: Mon, 19 Dec 2016 20:35:04 +0200 Subject: [PATCH 1/2] Added /dev/ttyS* into serial ports to find. OctoPrint was unable to find any of the serial ports on my CubieBoard, which are all ttyS devices; this fixes that issue. --- AUTHORS.md | 1 + src/octoprint/util/comm.py | 1 + 2 files changed, 2 insertions(+) diff --git a/AUTHORS.md b/AUTHORS.md index a85ff3f2..4ff4458d 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -74,6 +74,7 @@ date of first contribution): * [Mathias Rangel Wulff](https://github.com/mathiasrw) * [Clemens Niemeyer](https://github.com/clemniem) * ["I-am-me"](https://github.com/I-am-me) + * [J-J Heinonen](https://github.com/jammi) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index dd0ab9c6..71cc3fd5 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -144,6 +144,7 @@ def serialList(): + glob.glob("/dev/tty.usb*") \ + glob.glob("/dev/cu.*") \ + glob.glob("/dev/cuaU*") \ + + glob.glob("/dev/ttyS*") \ + glob.glob("/dev/rfcomm*") additionalPorts = settings().get(["serial", "additionalPorts"]) From 72f3fa6eda99121169b279d79ec28ef936996902 Mon Sep 17 00:00:00 2001 From: Noah Martin Date: Tue, 10 Jan 2017 23:36:55 -0800 Subject: [PATCH 2/2] Changed old comments to not claim a method does more than it really does, because comments are there to clear up confusion, might as well start here. poll_temperature and poll_sd_status are called by a RepeatedTimer now, the methods don't re-enqueue themselves. --- src/octoprint/util/comm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 71cc3fd5..fb1e1118 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1545,7 +1545,7 @@ class MachineCom(object): def _poll_temperature(self): """ - Polls the temperature after the temperature timeout, re-enqueues itself. + Polls the temperature. If the printer is not operational, closing the connection, not printing from sd, busy with a long running command or heating, no poll will be done. @@ -1556,7 +1556,7 @@ class MachineCom(object): def _poll_sd_status(self): """ - Polls the sd printing status after the sd status timeout, re-enqueues itself. + Polls the sd printing status. If the printer is not operational, closing the connection, not printing from sd, busy with a long running command or heating, no poll will be done.