kopia lustrzana https://github.com/NanoVNA-Saver/nanovna-saver
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
rodzic
0c8d636632
commit
264f8d16ca
|
@ -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)
|
||||
|
|
Ładowanie…
Reference in New Issue