typing and defaults
This commit is contained in:
parent
994080e574
commit
776c9cc491
@ -82,12 +82,13 @@ class AD9361DacStepFactor(IntEnum):
|
||||
|
||||
class Charon:
|
||||
FREQUENCY_OFFSET = 1e6
|
||||
DEFAULT_IP = "192.168.2.1"
|
||||
|
||||
calibration: rf.calibration.Calibration | None = None
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
ip: str = "192.168.2.1",
|
||||
ip: str = DEFAULT_IP,
|
||||
frequency: npt.ArrayLike = np.linspace(1e9, 2e9, 3),
|
||||
ports: Tuple[int] = (1,),
|
||||
):
|
||||
@ -202,7 +203,7 @@ class Charon:
|
||||
(value & 0x3) | (vref.value << 2) | (step_factor << 4),
|
||||
)
|
||||
|
||||
def _get_dac_code(self, channel: int) -> Tuple[float, AD9361DacVref, AD9361DacStepFactor]:
|
||||
def _get_dac_code(self, channel: Literal[1, 2]) -> Tuple[float, AD9361DacVref, AD9361DacStepFactor]:
|
||||
word = self.ctrl.reg_read(AD9361Register.__getitem__(f"AUXDAC{channel}_WORD"))
|
||||
config = self.ctrl.reg_read(AD9361Register.__getitem__(f"AUXDAC{channel}_CONFIG"))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user