Startup project

pull/34/head
Carl Tremblay 2019-10-09 00:38:20 -04:00
rodzic 193cd150c6
commit 47b0bd3649
9 zmienionych plików z 437 dodań i 12 usunięć

Wyświetl plik

@ -64,11 +64,11 @@ class CalibrationWindow(QtWidgets.QWidget):
btn_cal_short = QtWidgets.QPushButton("Short") btn_cal_short = QtWidgets.QPushButton("Short")
btn_cal_short.clicked.connect(self.saveShort) btn_cal_short.clicked.connect(self.saveShort)
self.cal_short_label = QtWidgets.QLabel("Uncalibrated") self.cal_short_label = QtWidgets.QLabel("Uncalibrated")
btn_cal_open = QtWidgets.QPushButton("Open") btn_cal_open = QtWidgets.QPushButton("Open")
btn_cal_open.clicked.connect(self.saveOpen) btn_cal_open.clicked.connect(self.saveOpen)
self.cal_open_label = QtWidgets.QLabel("Uncalibrated") self.cal_open_label = QtWidgets.QLabel("Uncalibrated")
btn_cal_load = QtWidgets.QPushButton("Load") btn_cal_load = QtWidgets.QPushButton("Load")
btn_cal_load.clicked.connect(self.saveLoad) btn_cal_load.clicked.connect(self.saveLoad)
self.cal_load_label = QtWidgets.QLabel("Uncalibrated") self.cal_load_label = QtWidgets.QLabel("Uncalibrated")
@ -176,7 +176,7 @@ class CalibrationWindow(QtWidgets.QWidget):
self.cal_through_box.setDisabled(True) self.cal_through_box.setDisabled(True)
self.through_length = QtWidgets.QLineEdit("0") self.through_length = QtWidgets.QLineEdit("0")
cal_through_form.addRow("Offset Delay (ps)", self.through_length) cal_through_form.addRow("Offset Delay (ps)", self.through_length)
cal_standard_layout.addWidget(self.cal_short_box) cal_standard_layout.addWidget(self.cal_short_box)
cal_standard_layout.addWidget(self.cal_open_box) cal_standard_layout.addWidget(self.cal_open_box)
cal_standard_layout.addWidget(self.cal_load_box) cal_standard_layout.addWidget(self.cal_load_box)
@ -308,9 +308,9 @@ class CalibrationWindow(QtWidgets.QWidget):
self.load_length.setText(str(self.app.settings.value("LoadDelay", 0))) self.load_length.setText(str(self.app.settings.value("LoadDelay", 0)))
self.through_length.setText(str(self.app.settings.value("ThroughDelay", 0))) self.through_length.setText(str(self.app.settings.value("ThroughDelay", 0)))
self.app.settings.endArray() self.app.settings.endArray()
def deleteCalibrationStandard(self): def deleteCalibrationStandard(self):
if self.cal_standard_save_selector.currentData() == -1: if self.cal_standard_save_selector.currentData() == -1:
return return
@ -382,7 +382,7 @@ class CalibrationWindow(QtWidgets.QWidget):
for i in range(len(names)): for i in range(len(names)):
self.app.settings.setArrayIndex(i) self.app.settings.setArrayIndex(i)
self.app.settings.setValue("Name", names[i]) self.app.settings.setValue("Name", names[i])
self.app.settings.setValue("ShortL0", shortL0[i]) self.app.settings.setValue("ShortL0", shortL0[i])
self.app.settings.setValue("ShortL1", shortL1[i]) self.app.settings.setValue("ShortL1", shortL1[i])
self.app.settings.setValue("ShortL2", shortL2[i]) self.app.settings.setValue("ShortL2", shortL2[i])
@ -394,7 +394,7 @@ class CalibrationWindow(QtWidgets.QWidget):
self.app.settings.setValue("OpenC2", openC2[i]) self.app.settings.setValue("OpenC2", openC2[i])
self.app.settings.setValue("OpenC3", openC3[i]) self.app.settings.setValue("OpenC3", openC3[i])
self.app.settings.setValue("OpenDelay", openDelay[i]) self.app.settings.setValue("OpenDelay", openDelay[i])
self.app.settings.setValue("LoadR", loadR[i]) self.app.settings.setValue("LoadR", loadR[i])
self.app.settings.setValue("LoadL", loadL[i]) self.app.settings.setValue("LoadL", loadL[i])
self.app.settings.setValue("LoadC", loadC[i]) self.app.settings.setValue("LoadC", loadC[i])

Wyświetl plik

@ -168,7 +168,7 @@ class Marker(QtCore.QObject):
def getGroupBox(self): def getGroupBox(self):
return self.group_box return self.group_box
def resetLabels(self): def resetLabels(self):
self.frequency_label.setText("") self.frequency_label.setText("")
self.impedance_label.setText("") self.impedance_label.setText("")

Wyświetl plik

@ -187,7 +187,7 @@ class NanoVNASaver(QtWidgets.QWidget):
self.sweepCenterInput.textEdited.connect(self.updateStartEnd) self.sweepCenterInput.textEdited.connect(self.updateStartEnd)
sweep_input_right_layout.addRow(QtWidgets.QLabel("Center"), self.sweepCenterInput) sweep_input_right_layout.addRow(QtWidgets.QLabel("Center"), self.sweepCenterInput)
self.sweepSpanInput = QtWidgets.QLineEdit("") self.sweepSpanInput = QtWidgets.QLineEdit("")
self.sweepSpanInput.setAlignment(QtCore.Qt.AlignRight) self.sweepSpanInput.setAlignment(QtCore.Qt.AlignRight)
self.sweepSpanInput.textEdited.connect(self.updateStartEnd) self.sweepSpanInput.textEdited.connect(self.updateStartEnd)
@ -1188,7 +1188,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
self.btn_foreground_picker.clicked.connect(lambda: self.setColor("foreground", QtWidgets.QColorDialog.getColor(self.foregroundColor, options=QtWidgets.QColorDialog.ShowAlphaChannel))) self.btn_foreground_picker.clicked.connect(lambda: self.setColor("foreground", QtWidgets.QColorDialog.getColor(self.foregroundColor, options=QtWidgets.QColorDialog.ShowAlphaChannel)))
color_options_layout.addRow("Chart foreground", self.btn_foreground_picker) color_options_layout.addRow("Chart foreground", self.btn_foreground_picker)
self.btn_text_picker = QtWidgets.QPushButton("") self.btn_text_picker = QtWidgets.QPushButton("")
self.btn_text_picker.setFixedWidth(20) self.btn_text_picker.setFixedWidth(20)
self.btn_text_picker.clicked.connect(lambda: self.setColor("text", QtWidgets.QColorDialog.getColor(self.textColor, options=QtWidgets.QColorDialog.ShowAlphaChannel))) self.btn_text_picker.clicked.connect(lambda: self.setColor("text", QtWidgets.QColorDialog.getColor(self.textColor, options=QtWidgets.QColorDialog.ShowAlphaChannel)))
@ -1265,7 +1265,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
chart01_selection.setCurrentIndex(selections.index(self.app.settings.value("Chart01", "S11 Return Loss"))) chart01_selection.setCurrentIndex(selections.index(self.app.settings.value("Chart01", "S11 Return Loss")))
chart01_selection.currentTextChanged.connect(lambda: self.changeChart(0, 1, chart01_selection.currentText())) chart01_selection.currentTextChanged.connect(lambda: self.changeChart(0, 1, chart01_selection.currentText()))
charts_layout.addWidget(chart01_selection, 0, 1) charts_layout.addWidget(chart01_selection, 0, 1)
chart02_selection = QtWidgets.QComboBox() chart02_selection = QtWidgets.QComboBox()
chart02_selection.addItems(selections) chart02_selection.addItems(selections)
chart02_selection.setCurrentIndex(selections.index(self.app.settings.value("Chart02", "None"))) chart02_selection.setCurrentIndex(selections.index(self.app.settings.value("Chart02", "None")))

Wyświetl plik

@ -271,7 +271,9 @@ class SweepWorker(QtCore.QRunnable):
def readSegment(self, start, stop): def readSegment(self, start, stop):
logger.debug("Setting sweep range to %d to %d", start, stop) logger.debug("Setting sweep range to %d to %d", start, stop)
self.app.setSweep(start, stop) self.app.setSweep(start, stop)
sleep(1) # TODO This long delay seems to fix the weird data transitions we were seeing by getting partial
sleep(0.3) # TODO This is fixed in 0.2.3 firmware
#sleep(1) # TODO This long delay seems to fix the weird data transitions we were seeing by getting partial
# sweeps. Clearly something needs to be done, maybe at firmware level, to address this fully. # sweeps. Clearly something needs to be done, maybe at firmware level, to address this fully.
# Let's check the frequencies first: # Let's check the frequencies first:

Wyświetl plik

@ -0,0 +1,207 @@
/*
background foncer 343334
background 545254
background shadow 464446
graph background b5b4b5
graph background bevel c6c4c6
Light Blue 53d1ea
Light Green 00d074
Light Yellow eae7ac
Light Red e1442az
Light Gray c6c3c5
https://www.atlassian.com/git/tutorials/saving-changes/git-stash
to install right version of qtmodern librairy pip3 install git+https://github.com/gmarull/qtmodern.git
*/
QLineEdit {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
}
QGroupBox {
color: #eae7ac;
font-weight: bold;
}
[cssClass="dialog"] {
border-radius: 12px;
border-style: solid;
border-color: red;
border-width: 4px 4px 4px 4px;
}
[cssClass="mainWindow"] {
color: #53d1ea;
}
[cssClass="Marker-1"] {
color: #e1442a;
font-weight: bold;
}
[cssClass="Marker-2"] {
color: #53d1ea;
font-weight: bold;
}
[cssClass="Marker-3"] {
color: #00d074;
font-weight: bold;
}
[cssClass="frequency_label"] {
background-color: #c6c3c5;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="marker_label"] {
background-color: #c6c3c5;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="impedance_label"] {
background-color: #53d1ea;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="parallel_r_label"] {
background-color: #53d1ea;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="parallel_x_label"] {
background-color: #53d1ea;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="returnloss_label"] {
background-color: #eae7ac;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="vswr_label"] {
background-color: #eae7ac;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="inductance_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="capacitance_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="gain_label"] {
background-color: #00d074;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s11_phase_label"] {
background-color: #00d074;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s21_phase_label"] {
background-color: #00d074;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="quality_factor_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s11_min_swr_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s11_min_rl_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s21_min_gain_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s21_max_gain_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s11_control_box"] {
color: #eae7ac;
font-weight: bold;
}
[cssClass="s21_control_box"] {
color: #eae7ac;
font-weight: bold;
}
[cssClass="tdr_result_label"] {
color: #00d074;
font-weight: bold;
}

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 162 KiB

Wyświetl plik

@ -0,0 +1,215 @@
/* # NanoVNASaver - a python program to view and export Touchstone data from a NanoVNA
# Copyright (C) 2019. Rune B. Broberg
# Author Carl Tremblay -Cinosh07 AKA VA2SAJ
# 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. */
/*
Light Blue 53d1ea
Light Green 00d074
Light Yellow eae7ac
Light Red e1442a
Light Gray c6c3c5
https://www.atlassian.com/git/tutorials/saving-changes/git-stash
to install right version of qtmodern librairy pip3 install git+https://github.com/gmarull/qtmodern.git
*/
QLineEdit {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
}
QGroupBox {
color: #000000;
font-weight: bold;
}
[cssClass="dialog"] {
border-radius: 12px;
border-style: solid;
border-color: red;
border-width: 4px 4px 4px 4px;
}
[cssClass="mainWindow"] {
color: #53d1ea;
}
[cssClass="Marker-1"] {
color: #e1442a;
font-weight: bold;
}
[cssClass="Marker-2"] {
color: #53d1ea;
font-weight: bold;
}
[cssClass="Marker-3"] {
color: #00d074;
font-weight: bold;
}
[cssClass="frequency_label"] {
background-color: #c6c3c5;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="marker_label"] {
background-color: #c6c3c5;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="impedance_label"] {
background-color: #53d1ea;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="parallel_r_label"] {
background-color: #53d1ea;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="parallel_x_label"] {
background-color: #53d1ea;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="returnloss_label"] {
background-color: #eae7ac;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="vswr_label"] {
background-color: #eae7ac;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="inductance_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="capacitance_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="gain_label"] {
background-color: #00d074;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s11_phase_label"] {
background-color: #00d074;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s21_phase_label"] {
background-color: #00d074;
color: #000000;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="quality_factor_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s11_min_swr_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s11_min_rl_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s21_min_gain_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s21_max_gain_label"] {
background-color: #000000;
color: #e1442a;
border: 2px groove #232223;
margin: 2px;
font-weight: bold;
}
[cssClass="s11_control_box"] {
color: #000000;
font-weight: bold;
}
[cssClass="s21_control_box"] {
color: #000000;
font-weight: bold;
}
[cssClass="tdr_result_label"] {
color: #000000;
font-weight: bold;
}

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 691 KiB

Wyświetl plik

@ -9,6 +9,7 @@ verify_ssl = true
pyserial = "*" pyserial = "*"
pyqt5 = "*" pyqt5 = "*"
numpy = "*" numpy = "*"
qtmodern = { git = 'https://github.com/gmarull/qtmodern.git', ref = '0.1.4', editable = false }
[requires] [requires]
python_version = "3.7" python_version = "3.7"