Update metadata

This commit is contained in:
CPD 2025-03-10 11:47:29 +01:00
parent 89850c08c8
commit 706ee20c45

@ -61,12 +61,13 @@ class MainWindow(QMainWindow):
layout.addWidget(self.w_leftbox)
metadata_init_dict = AppConfig.MEAS_CFG.get_or("metadata", {})
self.w_metadata = MetadataInput(metadata_init_dict)
self.w_leftbox.addItem(self.w_metadata, "Measurement metadata")
# Measurement settings
self.w_measurement_settings = MeasurementSettings()
self.w_leftbox.addItem(self.w_measurement_settings, "Measurement settings")
self.w_measurement_settings.set_value("interval", AppConfig.MAIN_CFG.get_or("interval", 0.5))
# Measurement metadata
self.w_metadata = MetadataInput(metadata_init_dict)
self.w_leftbox.addItem(self.w_metadata, "Measurement metadata")
# Right: Tabs: Script, Plot
self.w_right_tab = QTabWidget()
@ -234,11 +235,10 @@ class MainWindow(QMainWindow):
max_measurements = self.w_measurement_settings.get_value("max_measurements")
stop_on_script_end = self.w_measurement_settings.get_value("stop_on_script_end")
interval = self.w_measurement_settings.get_value("interval")
auto_add_metadata = self.w_measurement_settings.get_value("auto_add_metadata")
metadata = self.w_metadata.get_dict()
metadata["interval"] = str(interval)
metadata["name"] = measurement_name
metadata["led"] = "led"
metadata["led_script"] = str(script)
self.w_metadata.update_from_dict({
"interval": str(interval),
@ -263,9 +263,10 @@ class MainWindow(QMainWindow):
use_buffer,
max_measurements,
stop_on_script_end,
self.verbose, # verbose
False, # verbose
self.command_queue,
self.data_queue
self.data_queue,
auto_add_metadata,
))
self.proc_measure.start()
self.measurement_timer = QTimer(self)