diff --git a/charon_vna/vna.py b/charon_vna/vna.py index 1a1954e..bdd9e36 100644 --- a/charon_vna/vna.py +++ b/charon_vna/vna.py @@ -137,7 +137,7 @@ class Charon: self.ctrl = ctx.find_device("ad9361-phy") # raw ad9361 register accesss: # https://ez.analog.com/linux-software-drivers/f/q-a/120853/control-fmcomms3-s-gpo-with-python - # https://www.analog.com/media/cn/technical-documentation/user-guides/ad9364_register_map_reference_manual_ug-672.pdf # noqa: E501 + # https://www.analog.com/media/cn/technical-documentation/user-guides/ad9364_register_map_reference_manual_ug-672.pdf self.ctrl.reg_write(AD9361Register.EXTERNAL_LNA_CONTROL, 0x90) # bit 7: AuxDAC Manual, bit 4: GPO Manual self.ctrl.reg_write(AD9361Register.AUXDAC_ENABLE_CONTROL, 0x3F) @@ -205,7 +205,12 @@ class Charon: # https://www.analog.com/media/cn/technical-documentation/user-guides/ad9364_register_map_reference_manual_ug-672.pdf # page 13 - # vout = 0.97 * vref + (0.000738 + 9e-6 * (vref * 1.6 - 2)) * auxdac_word[9:0] * step_factor - 0.3572 * step_factor + 0.05 + # vout = ( + # 0.97 * vref + # + (0.000738 + 9e-6 * (vref * 1.6 - 2)) * auxdac_word[9:0] * step_factor + # - 0.3572 * step_factor + # + 0.05 + # ) # vout ~= (vref - 0.3572 * step_factor) + 0.000738 * auxdac_word[9:0] * step_factor # which gives a 1.5V swing with step_factor == 2 and 0.75V swing with step_factor == 1 # vref basically just changes the minimum voltage with negligible impact on output scaling @@ -308,7 +313,7 @@ class Charon: def capture( self, - callback: Callable[int, int] | None = None, + callback: Callable[[int, int], None] | None = None, *, measurements: List[Tuple[int, int]] = None, ):