def __init__(self, port, baudrate, timeout, fs=False):
"""
????? ??????????? ???????? ?????????????? ? ???????????.
:type port: str
:param port: ???? ?????????????? ? ???????????
:type baudrate: int
:param baudrate: ???????? ?????????????? ? ???????????
:type timeout: float
:param timeout: ????? ???????? ?????? ??????????
:type fs: bool
:param fs: ??????? ??????? ?? (?????????? ??????????)
"""
self.port = port
self.serial = serial.Serial(
baudrate=baudrate,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
timeout=timeout,
writeTimeout=timeout
)
self.fs = fs
self.connected = False
评论列表
文章目录