Skip to content

Commit

Permalink
Merge pull request #430 from NanoVNA-Saver/Development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
zarath committed Sep 21, 2021
2 parents ebfa3a9 + 4b705d0 commit 1c28b72
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
6 changes: 3 additions & 3 deletions NanoVNASaver/Charts/Capacitance.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
class CapacitanceChart(FrequencyChart):
def __init__(self, name=""):
super().__init__(name)
self.leftMargin = 30
self.leftMargin = 45
self.dim.width = 250
self.dim.height = 250
self.minDisplayValue = 0
Expand Down Expand Up @@ -121,7 +121,7 @@ def drawValues(self, qp: QtGui.QPainter):
self.span = span

target_ticks = math.floor(self.dim.height / 60)
fmt = Format(max_nr_digits=1)
fmt = Format(max_nr_digits=3)
for i in range(target_ticks):
val = minValue + (i / target_ticks) * span
try:
Expand Down Expand Up @@ -258,7 +258,7 @@ def drawValues(self, qp: QtGui.QPainter):
self.span = span

target_ticks = math.floor(self.dim.height / 60)
fmt = Format(max_nr_digits=1)
fmt = Format(max_nr_digits=3)
for i in range(target_ticks):
val = minValue + (i / target_ticks) * span
y = self.topMargin + round((self.maxValue - val) / self.span * self.dim.height)
Expand Down
4 changes: 2 additions & 2 deletions NanoVNASaver/Charts/Inductance.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
class InductanceChart(FrequencyChart):
def __init__(self, name=""):
super().__init__(name)
self.leftMargin = 30
self.leftMargin = 45
self.dim.width = 250
self.dim.height = 250
self.minDisplayValue = 0
Expand Down Expand Up @@ -120,7 +120,7 @@ def drawValues(self, qp: QtGui.QPainter):
self.span = span

target_ticks = math.floor(self.dim.height / 60)
fmt = Format(max_nr_digits=1)
fmt = Format(max_nr_digits=3)
for i in range(target_ticks):
val = minValue + (i / target_ticks) * span
y = self.topMargin + round((self.maxValue - val) / self.span * self.dim.height)
Expand Down
2 changes: 1 addition & 1 deletion NanoVNASaver/Charts/RI.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def drawValues(self, qp: QtGui.QPainter):
# We want one horizontal tick per 50 pixels, at most
horizontal_ticks = math.floor(self.dim.height/50)

fmt = Format(max_nr_digits=4)
fmt = Format(max_nr_digits=3)
for i in range(horizontal_ticks):
y = self.topMargin + round(i * self.dim.height / horizontal_ticks)
qp.setPen(QtGui.QPen(Chart.color.foreground))
Expand Down
9 changes: 6 additions & 3 deletions NanoVNASaver/Windows/TDR.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# A python program to view and export Touchstone data from a NanoVNA
# Copyright (C) 2019, 2020 Rune B. Broberg
# Copyright (C) 2020,2021 NanoVNA-Saver Authors
# Copyright (C) 2020, 2021 NanoVNA-Saver Authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -62,11 +62,14 @@ def __init__(self, app: QtWidgets.QWidget):
self.tdr_velocity_dropdown.addItem("RG-8/U PE 50\N{OHM SIGN} (Belden 8237) (0.66)", 0.66)
self.tdr_velocity_dropdown.addItem("RG-8/U Foam (Belden 8214) (0.78)", 0.78)
self.tdr_velocity_dropdown.addItem("RG-8/U (Belden 9913) (0.84)", 0.84)
# Next one added by EKZ, KC3KZ, from measurement of actual cable
self.tdr_velocity_dropdown.addItem("RG-8/U (Shireen RFC®400 Low Loss) (0.86)", 0.86)
self.tdr_velocity_dropdown.addItem("RG-8X (Belden 9258) (0.82)", 0.82)
# Added by EKZ, KC3KZ, from measurement of actual cable
# Next three added by EKZ, KC3KZ, from measurement of actual cable
self.tdr_velocity_dropdown.addItem("RG-8X (Wireman \"Super 8\" CQ106) (0.81)", 0.81)
self.tdr_velocity_dropdown.addItem("RG-8X (Wireman \"MINI-8 Lo-Loss\" CQ118) (0.82)", 0.82)
self.tdr_velocity_dropdown.addItem("RG-58 (Wireman \"CQ 58 Lo-Loss Flex\" CQ129FF) (0.79)", 0.79)
self.tdr_velocity_dropdown.addItem(
"RG-58 (Wireman \"CQ 58 Lo-Loss Flex\" CQ129FF) (0.79)", 0.79)
self.tdr_velocity_dropdown.addItem(
"RG-11/U 75\N{OHM SIGN} Foam HDPE (Belden 9292) (0.84)", 0.84)
self.tdr_velocity_dropdown.addItem("RG-58/U 52\N{OHM SIGN} PE (Belden 9201) (0.66)", 0.66)
Expand Down
1 change: 1 addition & 0 deletions test/test_sitools.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import unittest
from math import inf
from decimal import Decimal # Needed for test_representation()

# Import targets to be tested
from NanoVNASaver.SITools import Format, Value
Expand Down

0 comments on commit 1c28b72

Please sign in to comment.