kopia lustrzana https://github.com/NanoVNA-Saver/nanovna-saver
Making the calibration window a little less tall.
rodzic
e1c5360c62
commit
c4dcc27706
|
@ -96,14 +96,19 @@ class CalibrationWindow(QtWidgets.QWidget):
|
|||
calibration_control_layout.addRow(self.btn_automatic)
|
||||
self.btn_automatic.clicked.connect(self.automaticCalibration)
|
||||
|
||||
apply_reset_layout = QtWidgets.QHBoxLayout()
|
||||
|
||||
btn_apply = QtWidgets.QPushButton("Apply")
|
||||
calibration_control_layout.addRow(btn_apply)
|
||||
btn_apply.clicked.connect(self.calculate)
|
||||
|
||||
btn_reset = QtWidgets.QPushButton("Reset")
|
||||
calibration_control_layout.addRow(btn_reset)
|
||||
btn_reset.clicked.connect(self.reset)
|
||||
|
||||
apply_reset_layout.addWidget(btn_apply)
|
||||
apply_reset_layout.addWidget(btn_reset)
|
||||
|
||||
calibration_control_layout.addRow(apply_reset_layout)
|
||||
|
||||
left_layout.addWidget(calibration_control_group)
|
||||
|
||||
calibration_notes_group = QtWidgets.QGroupBox("Notes")
|
||||
|
@ -117,10 +122,14 @@ class CalibrationWindow(QtWidgets.QWidget):
|
|||
file_layout = QtWidgets.QFormLayout(file_box)
|
||||
btn_save_file = QtWidgets.QPushButton("Save calibration")
|
||||
btn_save_file.clicked.connect(lambda: self.saveCalibration())
|
||||
file_layout.addRow(btn_save_file)
|
||||
btn_load_file = QtWidgets.QPushButton("Load calibration")
|
||||
btn_load_file.clicked.connect(lambda: self.loadCalibration())
|
||||
file_layout.addRow(btn_load_file)
|
||||
|
||||
save_load_layout = QtWidgets.QHBoxLayout()
|
||||
save_load_layout.addWidget(btn_save_file)
|
||||
save_load_layout.addWidget(btn_load_file)
|
||||
|
||||
file_layout.addRow(save_load_layout)
|
||||
|
||||
left_layout.addWidget(file_box)
|
||||
|
||||
|
@ -164,12 +173,12 @@ class CalibrationWindow(QtWidgets.QWidget):
|
|||
self.cal_load_box.setDisabled(True)
|
||||
self.load_resistance = QtWidgets.QLineEdit("50")
|
||||
self.load_inductance = QtWidgets.QLineEdit("0")
|
||||
self.load_capacitance = QtWidgets.QLineEdit("0")
|
||||
self.load_capacitance.setDisabled(True) # Not yet implemented
|
||||
# self.load_capacitance = QtWidgets.QLineEdit("0")
|
||||
# self.load_capacitance.setDisabled(True) # Not yet implemented
|
||||
self.load_length = QtWidgets.QLineEdit("0")
|
||||
cal_load_form.addRow("Resistance (\N{OHM SIGN})", self.load_resistance)
|
||||
cal_load_form.addRow("Inductance (H(e-12))", self.load_inductance)
|
||||
cal_load_form.addRow("Capacitance (F(e-12))", self.load_capacitance)
|
||||
# cal_load_form.addRow("Capacitance (F(e-12))", self.load_capacitance)
|
||||
cal_load_form.addRow("Offset Delay (ps)", self.load_length)
|
||||
|
||||
self.cal_through_box = QtWidgets.QGroupBox("Through")
|
||||
|
@ -270,7 +279,7 @@ class CalibrationWindow(QtWidgets.QWidget):
|
|||
|
||||
self.app.settings.setValue("LoadR", self.load_resistance.text())
|
||||
self.app.settings.setValue("LoadL", self.load_inductance.text())
|
||||
self.app.settings.setValue("LoadC", self.load_capacitance.text())
|
||||
# self.app.settings.setValue("LoadC", self.load_capacitance.text())
|
||||
self.app.settings.setValue("LoadDelay", self.load_length.text())
|
||||
|
||||
self.app.settings.setValue("ThroughDelay", self.through_length.text())
|
||||
|
@ -305,7 +314,7 @@ class CalibrationWindow(QtWidgets.QWidget):
|
|||
|
||||
self.load_resistance.setText(str(self.app.settings.value("LoadR", 50)))
|
||||
self.load_inductance.setText(str(self.app.settings.value("LoadL", 0)))
|
||||
self.load_capacitance.setText(str(self.app.settings.value("LoadC", 0)))
|
||||
# self.load_capacitance.setText(str(self.app.settings.value("LoadC", 0)))
|
||||
self.load_length.setText(str(self.app.settings.value("LoadDelay", 0)))
|
||||
|
||||
self.through_length.setText(str(self.app.settings.value("ThroughDelay", 0)))
|
||||
|
@ -464,7 +473,7 @@ class CalibrationWindow(QtWidgets.QWidget):
|
|||
try:
|
||||
self.app.calibration.loadR = self.getFloatValue(self.load_resistance.text())
|
||||
self.app.calibration.loadL = self.getFloatValue(self.load_inductance.text())/10**12
|
||||
self.app.calibration.loadC = self.getFloatValue(self.load_capacitance.text()) / 10 ** 12
|
||||
# self.app.calibration.loadC = self.getFloatValue(self.load_capacitance.text()) / 10 ** 12
|
||||
self.app.calibration.loadLength = self.getFloatValue(self.load_length.text())/10**12
|
||||
self.app.calibration.useIdealLoad = False
|
||||
except ValueError:
|
||||
|
|
Ładowanie…
Reference in New Issue