From f506d4310c9837c0936fc52c25a1aa797eb8c999 Mon Sep 17 00:00:00 2001 From: CPD Date: Mon, 17 Mar 2025 09:13:57 +0100 Subject: [PATCH] Add get led_script_type --- cpdctrl_gui/ui/widgets/settings/measurement_settings.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cpdctrl_gui/ui/widgets/settings/measurement_settings.py b/cpdctrl_gui/ui/widgets/settings/measurement_settings.py index fdb1af1..4ecf6c7 100644 --- a/cpdctrl_gui/ui/widgets/settings/measurement_settings.py +++ b/cpdctrl_gui/ui/widgets/settings/measurement_settings.py @@ -107,6 +107,12 @@ class ScriptSelection(QGroupBox): else: return int(self.w_constant_value.value()) + def get_script_type(self): + if self.radio_script_file.isChecked(): + return "file" + else: + return "constant" + class MeasurementSettings(QWidget): """ @@ -163,5 +169,7 @@ class MeasurementSettings(QWidget): return self.w_form.get_value(key) elif key == "led_script": return self.w_led_script.get_script() + elif key == "led_script_type": + return self.w_led_script.get_script_type() else: raise ValueError(f"Unknown key: {key}") \ No newline at end of file