Skip to content

Commit e138fe7

Browse files
committed
bump v0.3.3
close #12 -- exit when the serial data is zero
1 parent 6e47d41 commit e138fe7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pytes_serial.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
errors_no = 0 # used to count no of errors and to calculate %
3737
errors = 'false'
3838

39-
print('PytesSerial build: v0.3.2_20230129')
39+
print('PytesSerial build: v0.3.3_20230130')
4040

4141
# ------------------------functions area----------------------------
4242
def log (str) :
@@ -83,7 +83,10 @@ def parsing_serial():
8383

8484
decode = 'false'
8585
while True:
86-
line = ser.read()
86+
if ser.in_waiting > 0:
87+
line = ser.read()
88+
else:
89+
break
8790
if line:
8891
#print(line.decode("Ascii"))
8992
#print(line)

0 commit comments

Comments
 (0)