Skip to content

Commit

Permalink
With current firmware, these JNCRadio_VNA_3G, SV4401A, SV6301A device…
Browse files Browse the repository at this point in the history
…s allow 1001 datapoints.

Updated datapoints dropdown to show their respective minimums, the 'typical' 101, device default 501 and maximum 1001 points. Users may choose any other values between min and max not seen in the dropdown list using the custom datapoints option.

These devices now use the factory default 501 datapoints as their initial datapoints value.
  • Loading branch information
t52ta6ek committed Jul 21, 2023
1 parent 21ba0ef commit 975c4bc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/NanoVNASaver/Hardware/JNCRadio_VNA_3G.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ class JNCRadio_VNA_3G(NanoVNA):
name = "JNCRadio_VNA_3G"
screenwidth = 800
screenheight = 480
valid_datapoints = (101, 201, 301, 401, 501)
sweep_points_max = 501
valid_datapoints = (501, 11, 101, 1001)
sweep_points_max = 11
sweep_points_max = 1001

def __init__(self, iface: Interface):
super().__init__(iface)
self.sweep_max_freq_Hz = 3e9

def getScreenshot(self) -> QPixmap:
logger.debug("Capturing screenshot...")
self.serial.timeout=8
if not self.connected():
return QPixmap()
try:
Expand Down
6 changes: 3 additions & 3 deletions src/NanoVNASaver/Hardware/SV4401A.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class SV4401A(NanoVNA):
name = "SV4401A"
screenwidth = 1024
screenheight = 600
valid_datapoints = (101, 301, 501)
sweep_points_max = 101
sweep_points_max = 501
valid_datapoints = (501, 101, 1001)
sweep_points_min = 101
sweep_points_max = 1001

def __init__(self, iface: Interface):
super().__init__(iface)
Expand Down
6 changes: 3 additions & 3 deletions src/NanoVNASaver/Hardware/SV6301A.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class SV6301A(NanoVNA):
name = "SV6301A"
screenwidth = 1024
screenheight = 600
valid_datapoints = (101, 301, 501)
sweep_points_max = 101
sweep_points_max = 501
valid_datapoints = (501, 101, 1001)
sweep_points_min = 101
sweep_points_max = 1001

def __init__(self, iface: Interface):
super().__init__(iface)
Expand Down
1 change: 1 addition & 0 deletions src/NanoVNASaver/Windows/DeviceSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def updateFields(self):

if "Customizable data points" in features:
self.datapoints.clear()
self.custom_points_Eidt.setValidator(QIntValidator(self.app.vna.sweep_points_min,self.app.vna.sweep_points_max))
cur_dps = self.app.vna.datapoints
for d in sorted(self.app.vna.valid_datapoints):
self.datapoints.addItem(str(d))
Expand Down

0 comments on commit 975c4bc

Please sign in to comment.