adjust lcd timing function

This commit is contained in:
Siwat Sirichai 2022-11-11 22:32:00 +07:00
parent e4821b3c6f
commit d6029b8cb8
1 changed files with 2 additions and 1 deletions

View File

@ -51,10 +51,11 @@ class nextion:
def __serial_reader(self) -> None:
ser = self.device
while True:
if self.allow_serial_read:
while self.allow_serial_read:
buffer_length = ser.in_waiting
if buffer_length > 0:
self.handle_serial(self.read_serial())
sleep(0.05)
def read_serial(self) -> list:
ser = self.device