def start(self): # if self.managers: from pychron.initializer import Initializer dp = DevicePreferences() afh = self.application.preferences.get('pychron.hardware.auto_find_handle') awh = self.application.preferences.get('pychron.hardware.auto_write_handle') if afh is not None: toBool = lambda x: True if x == 'True' else False dp.serial_preference.auto_find_handle = toBool(afh) dp.serial_preference.auto_write_handle = toBool(awh) ini = Initializer(device_prefs=dp) for m in self.managers: ini.add_initialization(m) # any loaded managers will be registered as services if not ini.run(application=self.application): self.application.exit() return # create the hardware server rhm = self.application.get_service(RemoteHardwareManager) bind_preference(rhm, 'enable_hardware_server', 'pychron.hardware.enable_hardware_server') bind_preference(rhm, 'enable_directory_server', 'pychron.hardware.enable_directory_server') rhm.bootstrap()
def start(self): # if self.managers: from pychron.initializer import Initializer dp = DevicePreferences() afh = self.application.preferences.get( 'pychron.hardware.auto_find_handle') awh = self.application.preferences.get( 'pychron.hardware.auto_write_handle') if afh is not None: toBool = lambda x: True if x == 'True' else False dp.serial_preference.auto_find_handle = toBool(afh) dp.serial_preference.auto_write_handle = toBool(awh) ini = Initializer(device_prefs=dp) for m in self.managers: ini.add_initialization(m) # any loaded managers will be registered as services if not ini.run(application=self.application): self.application.exit() return # create the hardware server rhm = self.application.get_service(RemoteHardwareManager) bind_preference(rhm, 'enable_hardware_server', 'pychron.hardware.enable_hardware_server') bind_preference(rhm, 'enable_directory_server', 'pychron.hardware.enable_directory_server') rhm.bootstrap()
return 'Diode Manager' def _control_module_manager_default(self): v = VueMetrixManager() # control = self.control_module) return v if __name__ == '__main__': from pychron.core.helpers.logger_setup import logging_setup from pychron.initializer import Initializer logging_setup('fusions diode') f = FusionsDiodeManager() f.use_video = True f.record_brightness = True ini = Initializer() a = dict(manager=f, name='FusionsDiode') ini.add_initialization(a) ini.run() # f.bootstrap() f.configure_traits() #======================= EOF ============================ # def get_laser_amps(self): # ''' # ''' # return self.control_module.read_laser_amps() # # def get_laser_current(self): # '''
def _control_module_manager_default(self): v = VueMetrixManager() # control = self.control_module) return v if __name__ == '__main__': from pychron.core.helpers.logger_setup import logging_setup from pychron.initializer import Initializer logging_setup('fusions diode') f = FusionsDiodeManager() f.use_video = True f.record_brightness = True ini = Initializer() a = dict(manager=f, name='FusionsDiode') ini.add_initialization(a) ini.run() # f.bootstrap() f.configure_traits() #======================= EOF ============================ # def get_laser_amps(self): # ''' # ''' # return self.control_module.read_laser_amps() # # def get_laser_current(self): # '''