示例#1
0
 def __init__(self,notebook,settings,restart=False):
     Tab.__init__(self,notebook,settings,restart)
     self.connection_table = settings['connection_table']
     
     # Create the variables we need
     self._AO = {}
     self._DO = {}
     self._DDS = {}
     self._image = {}
     
     self._final_values = {}
     self._last_programmed_values = {}
     self._last_remote_values = {}
     self._primary_worker = None
     self._secondary_workers = []
     self._can_check_remote_values = False
     self._changed_radio_buttons = {}
     
     # Call the initialise GUI function
     self.initialise_GUI() 
     self.restore_save_data(self.settings['saved_data'] if 'saved_data' in self.settings else {})
     self.initialise_workers()
     self._last_programmed_values = self.get_front_panel_values()
     if self._can_check_remote_values:
         self.statemachine_timeout_add(30000,self.check_remote_values)     
     else:       
         # If we can check remote values, then no need to call program manual as 
         # the remote device will either be programmed correctly, or will need an 
         # inconsistency between local and remote values resolved
         self.program_device()
示例#2
0
 def update_from_settings(self,settings):
     Tab.update_from_settings(self, settings)
     self.restore_save_data(settings['saved_data'])
 
     self.settings = settings
     for output in [self._AO, self._DO, self._image]:
         for name,channel in output.items():
             if not channel._locked:
                 channel._update_from_settings(settings)
                 
     for name,channel in self._DDS.items():
         for subchnl_name in channel._sub_channel_list:
             if hasattr(channel,subchnl_name):
                 subchnl = getattr(channel,subchnl_name)
                 if not subchnl._locked:
                     subchnl._update_from_settings(settings)
 def close_tab(self, *args, **kwargs):
     # disconnect method from button. This will allow the button to be garbage collected when it is shortly deleted
     self.flash_fpga_button.clicked.disconnect(self.flash_fpga)
     return Tab.close_tab(self, *args, **kwargs)