improve detection of NanoVNA-H devices

some devices respond to CR with two lines "?" followed by "ch> "

Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
pull/415/head
Martin 2021-07-01 18:50:37 +02:00
rodzic 0c8d636632
commit 264f8d16ca
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -140,6 +140,8 @@ def detect_version(serial_port: serial.Serial) -> str:
# -H versions
if data.startswith("\r\nch> "):
return "vh"
if data.startswith("\r\n?\r\nch> "):
return "vh"
if data.startswith("2"):
return "v2"
logger.debug("Retry detection: %s", i + 1)