slotUI/freeslot.py

changeset 57
c2e2695c92fe
parent 50
84b8ab4cd79e
child 77
cede78304992
equal deleted inserted replaced
56:a20f59a3016c 57:c2e2695c92fe
25 25
26 def connect(self): 26 def connect(self):
27 if self.connected: 27 if self.connected:
28 return True 28 return True
29 try: 29 try:
30 self.com = serial.Serial(self.device, baudrate=self.speed, xonxoff=0, timeout=1) 30 self.com = serial.Serial(self.device, baudrate=self.speed,
31 xonxoff=0, timeout=0.1)
31 except serial.SerialException, err: 32 except serial.SerialException, err:
32 print err 33 print err
33 sys.exit(1) 34 sys.exit(1)
34 self.connected = True 35 self.connected = True
35 return True 36 return True

mercurial