Skip to content
Snippets Groups Projects
Commit 8ba0b22e authored by Michael Pawelzik's avatar Michael Pawelzik
Browse files

name of json file for external environmental sensor configuration changed

in parameter list of method prototype.Measurements logger ip added to parameter list
parent f28feafe
No related branches found
No related tags found
1 merge request!3feat: introduce external sensors
......@@ -63,8 +63,8 @@ class TestStandMainWindow(QMainWindow):
config_data = json.load(f)
# open json file ext_sens_data.joson and load values from file
with open('ext_sensor_names.json', 'r') as f2:
ext_sens_data = json.load(f2)
with open('ext_sensor_param.json', 'r') as f2:
config_ext_sens_data = json.load(f2)
if self.autoNameCheckbox.isChecked():
output_basename = time.strftime("%Y_%m_%d-%H_%M_%S") + "_results"
......@@ -74,9 +74,11 @@ class TestStandMainWindow(QMainWindow):
if not self.check_and_change_dir(config_data['data_folder'] + '/' + output_basename):
self.setEnabled(True)
return
# add ext_sens_data to parameterlist of plot_output method, Michael
# ext_sens_data are the imported values from json file ext_sens_data.json , Michael
meas = prototype.Measurements(config_data['chamber_ip'], config_data['vna_ip'], output_basename,
False, config_data)
False, config_data, config_ext_sens_data, config_data['logger_ip'])
try:
if self.tempSweepButton.isChecked():
temperatures = meas.perform_sweep(self.startParameter.value(), self.stopParameter.value(),
......@@ -91,7 +93,7 @@ class TestStandMainWindow(QMainWindow):
# add ext_sens_data to parameterlist of plot_output method, Michael
# ext_sens_data are the imported values from json file ext_sens_data.json , Michael
prototype.plot_output(output_basename, temp_extensions, True, ext_sens_data, output_basename +
prototype.plot_output(output_basename, temp_extensions, True, config_ext_sens_data, output_basename +
': Temperature sweep ' + str(temperatures[0]) + '--' +
str(temperatures[-1]) + ' degC @ ' + str(self.fixedParameter.value()) + ' % r.h.')
......@@ -108,7 +110,7 @@ class TestStandMainWindow(QMainWindow):
# add ext_sens_data to parameterlist of plot_output method, Michael
# ext_sens_data are the imported values from json file ext_sens_data.json, Michael
prototype.plot_output(output_basename, hum_extensions, True, ext_sens_data, output_basename +
prototype.plot_output(output_basename, hum_extensions, True, config_ext_sens_data, output_basename +
': Humidity sweep ' + str(humidities[0]) + '--' +
str(humidities[-1]) + ' % r.h. @ ' + str(self.fixedParameter.value()) + ' degC')
......@@ -118,7 +120,7 @@ class TestStandMainWindow(QMainWindow):
self.measurementFile.text()))
# add ext_sens_data to parameterlist of plot_output method, Michael
# ext_sens_data are the imported values from json file ext_sens_data.json, Michael
prototype.plot_output(output_basename, range(n_measurements), True, ext_sens_data, output_basename)
prototype.plot_output(output_basename, range(n_measurements), True, config_ext_sens_data, output_basename)
except FileNotFoundError as e:
QtWidgets.QMessageBox.warning(self, 'Warning', str(e))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment