Merge pull request #430 from NanoVNA-Saver/Development

Development
pull/446/head
Holger Müller 2021-09-21 07:52:18 +02:00 zatwierdzone przez GitHub
commit 1c28b721ba
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
5 zmienionych plików z 13 dodań i 9 usunięć

Wyświetl plik

@ -34,7 +34,7 @@ logger = logging.getLogger(__name__)
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
@ -121,7 +121,7 @@ class CapacitanceChart(FrequencyChart):
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:
@ -258,7 +258,7 @@ class InductanceChart(FrequencyChart):
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)

Wyświetl plik

@ -33,7 +33,7 @@ logger = logging.getLogger(__name__)
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
@ -120,7 +120,7 @@ class InductanceChart(FrequencyChart):
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)

Wyświetl plik

@ -230,7 +230,7 @@ class RealImaginaryChart(FrequencyChart):
# 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))

Wyświetl plik

@ -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
@ -62,11 +62,14 @@ class TDRWindow(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)

Wyświetl plik

@ -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