Merge pull request #481 from Salandora/bugFixes

Bug fixes
This commit is contained in:
Gina Häußge 2014-07-31 10:10:21 +02:00
commit 5e8a04e54d
2 changed files with 3 additions and 3 deletions

View file

@ -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):

View file

@ -959,7 +959,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: