示例#1
0
    def init(self):
        with self.serial_lock:
            self.serial = serial.Serial(find_device(self.args["device"]), 115200)

            # Don't know why this is needed
            attr = termios.tcgetattr(self.serial.fd)
            termios.tcsetattr(self.serial.fd, termios.TCSANOW, attr)
示例#2
0
 def init(self):
     with self.serial_lock:
         self.serial = serial.Serial(find_device(self.args["device"]), self.args["baudrate"])
示例#3
0
    def init(self):
        with self.serial_lock:
            self.serial = serial.Serial(find_device(self.args["device"]), self.args["baudrate"])

            self.last_recv = 0
            self.poll()