def __init__(self, port, baud_rate, byte_size=serial.EIGHTBITS, parity=serial.PARITY_NONE, stop_bit=serial.STOPBITS_ONE):
# initialize the connection and if anything ok open the port
self.__main_conn = serial.Serial(port, baud_rate, bytesize=byte_size, parity=parity, stopbits=stop_bit)
# Queue
self.dataQueue = queue.Queue()
self.checkStatusQueue = queue.Queue()
# Define Variables
self.out = ''
self.__flag_out = True
评论列表
文章目录