diff --git a/src/Utils.py b/src/Utils.py index ae5d519caf8a6d8efc3948cb0883f6c0b22a082b..5910f115d6d3d6c899e5f7f69ae4cce5b06f9234 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -36,7 +36,7 @@ def set_SPA_for_measure(ms2830a, config_file, manual_command): # BW ms2830a.do_set_resolutionBW(config_file["resolution_bandwith"]) # 1Mhz log_list.append("Resolution Bandwith: " + str(ms2830a.do_get_resolutionBW())) - ms2830a.do_set_videoBW(100) + ms2830a.do_set_videoBW(config_file["video_bandwith"]) log_list.append("Video bandwith:" + str(ms2830a.do_get_videoBW())) # AMPLITUDE diff --git a/src/gui.py b/src/gui.py index c97a0c98afe827bba141fccb391820e63a6caa7c..10cf674322efc5d3e16cae6c709806f46b0642e0 100644 --- a/src/gui.py +++ b/src/gui.py @@ -92,7 +92,7 @@ class UserInterface: ############################# # TABS CREATION ############################# - connect_tab.connect(self, self.TNotebook1, config_interface, config_file) + connect_tab.connect(self, self.TNotebook1, config_interface) configuration_tab.configuration(self, self.TNotebook1, config_interface, config_file) measure_tab.measure(self,self.TNotebook1) diff --git a/src/tabs/configuration_tab.py b/src/tabs/configuration_tab.py index 11ef6b4c4a1ac19f41e7ae8e7a2a6d16f5073c6c..a139e3304e7142f02b88cdbd75248060d470c0e6 100644 --- a/src/tabs/configuration_tab.py +++ b/src/tabs/configuration_tab.py @@ -150,6 +150,8 @@ def configuration(self, TNotebook1, config_interface, config_file): def set_conf(): try: + config_file = Utils.read_config_file("../config/config_MS2830A.json") + config_interface = Utils.read_config_file("../config/config_interface.json") self.instr = SPA.Anritsu_MS2830A("Anritsu_MS2830A",config_interface[self.selected_interface.get()]) log_list = Utils.set_SPA_for_measure(self.instr, config_file, self.Entry10.get()) self.Text1.insert(tk.END, "\nConfiguration\n") diff --git a/src/tabs/connect_tab.py b/src/tabs/connect_tab.py index 6eb2bb77f8ebc64450c31cfa25c5e0395d2d5732..01a3f660cc82009d8336501446310b1f084c8f11 100644 --- a/src/tabs/connect_tab.py +++ b/src/tabs/connect_tab.py @@ -15,7 +15,7 @@ from tkinter import ttk import Utils import logging -def connect(self, TNotebook1, config_interface, config_file): +def connect(self, TNotebook1, config_interface): ################################## # TAB 1 #