Commit b6c01059 authored by kliment's avatar kliment

Merge pull request #582 from fjriosp/master

FIX: Unable to connect on Debian testing
parents 87cb9419 676583d8
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
__version__ = "2014.08.01" __version__ = "2014.08.01"
from serial import Serial, SerialException from serial import Serial, SerialException, PARITY_ODD, PARITY_NONE
from select import error as SelectError from select import error as SelectError
from threading import Thread, Lock from threading import Thread, Lock
from Queue import Queue, Empty as QueueEmpty from Queue import Queue, Empty as QueueEmpty
...@@ -189,7 +189,11 @@ class printcore(): ...@@ -189,7 +189,11 @@ class printcore():
try: try:
self.printer = Serial(port = self.port, self.printer = Serial(port = self.port,
baudrate = self.baud, baudrate = self.baud,
timeout = 0.25) timeout = 0.25,
parity = PARITY_ODD)
self.printer.close()
self.printer.parity = PARITY_NONE
self.printer.open()
except SerialException as e: except SerialException as e:
self.logError(_("Could not connect to %s at baudrate %s:") % (self.port, self.baud) + self.logError(_("Could not connect to %s at baudrate %s:") % (self.port, self.baud) +
"\n" + _("Serial error: %s") % e) "\n" + _("Serial error: %s") % e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment