|
@@ -22,10 +22,10 @@ import time
|
|
|
from struct import pack, unpack_from
|
|
|
|
|
|
from time import sleep
|
|
|
-from typing import List
|
|
|
-from Serial import Interface
|
|
|
-from Calibration import Calibration
|
|
|
-from RFTools import Datapoint
|
|
|
+from typing import Dict, List
|
|
|
+from .Serial import Interface
|
|
|
+from .Calibration import Calibration
|
|
|
+from .RFTools import Datapoint
|
|
|
|
|
|
__all__ = ['NanoVNA_V2_H4']
|
|
|
|
|
@@ -104,7 +104,7 @@ class NanoVNA_V2_H4:
|
|
|
|
|
|
def __init__(self, iface: Interface = None):
|
|
|
self.iface = iface
|
|
|
- self.iface.open()
|
|
|
+ #self.iface.open()
|
|
|
|
|
|
if platform.system() != "Windows":
|
|
|
tty.setraw(self.iface.fd)
|
|
@@ -165,6 +165,10 @@ class NanoVNA_V2_H4:
|
|
|
self.iface.open()
|
|
|
return self.iface.isOpen()
|
|
|
|
|
|
+ def get_info(self):
|
|
|
+ reg = self.read_registers()
|
|
|
+ info = Dict()
|
|
|
+
|
|
|
def _read_register(self, reg_name: str):
|
|
|
if reg_name not in _NANOVNA_V2_REGS:
|
|
|
raise ValueError(
|