slotUI/freeslot.py

changeset 150
cc8721bd2c03
parent 145
80be5eb283d3
equal deleted inserted replaced
149:1c3425af9aa0 150:cc8721bd2c03
26 26
27 def connect(self): 27 def connect(self):
28 if self.connected: 28 if self.connected:
29 return True 29 return True
30 try: 30 try:
31 self.com = serial.Serial(self.device, baudrate=self.speed, 31 self.com = serial.Serial(self.device, baudrate=self.speed,
32 xonxoff=0, timeout=0.1) 32 xonxoff=0, timeout=0.1)
33 except serial.SerialException, err: 33 except serial.SerialException, err:
34 print err 34 print err
35 sys.exit(1) 35 sys.exit(1)
36 self.connected = True 36 self.connected = True

mercurial