Update NanoVNA_V2.py

Only warn if first read didn't get the full dataset
pull/324/head
Holger Müller 2020-08-23 18:41:38 +02:00 zatwierdzone przez GitHub
rodzic 13bfe102b7
commit d8ad21dc54
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -144,7 +144,7 @@ class NanoVNA_V2(VNA):
# serial .read() will try to read nBytes bytes in timeout secs
arr = self.serial.read(nBytes)
if nBytes != len(arr) :
logger.error("expected %d bytes, got %d",
logger.warning("expected %d bytes, got %d",
nBytes, len(arr))
# the way to retry on timeout is keep the data already read
# then try to read the rest of the data into the array