urgh
This commit is contained in:
@@ -18,7 +18,7 @@ class SerialReader:
|
|||||||
def start(self) -> None:
|
def start(self) -> None:
|
||||||
self._run_event.set()
|
self._run_event.set()
|
||||||
if self.__thread is None or not self.__thread.is_alive():
|
if self.__thread is None or not self.__thread.is_alive():
|
||||||
self.__thread = Thread(target=self.__read, daemon=True)
|
self.__thread = Thread(target=self._read, daemon=True)
|
||||||
self.__thread.start()
|
self.__thread.start()
|
||||||
|
|
||||||
def stop(self) -> None:
|
def stop(self) -> None:
|
||||||
@@ -37,7 +37,7 @@ class SerialReader:
|
|||||||
line = self.serial.readline()
|
line = self.serial.readline()
|
||||||
if line:
|
if line:
|
||||||
data = line.decode('utf-8', errors='ignore')
|
data = line.decode('utf-8', errors='ignore')
|
||||||
self.__notify(data)
|
self._notify(data)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user