def _read_config(self): self.objects['configfile'] = pconfig = configfile.PrinterConfig(self) config = pconfig.read_main_config() if self.bglogger is not None: pconfig.log_config(config) # Create printer components for m in [pins, heater, mcu]: m.add_printer_objects(config) for section_config in config.get_prefix_sections(''): self.try_load_module(config, section_config.get_name()) for m in [toolhead]: m.add_printer_objects(config) # Validate that there are no undefined parameters in the config file pconfig.check_unused_options(config)
def _read_config(self): self.objects['configfile'] = pconfig = configfile.PrinterConfig(self) config = pconfig.read_main_config() if self.bglogger is not None: pconfig.log_config(config) # Create printer components for m in [pins, mcu]: m.add_printer_objects(config) for section_config in config.get_prefix_sections(''): self.load_object(config, section_config.get_name(), None) self.parallel_queues['printer'] = multiprocessing.Queue() self.reactor.setup_mp_queues(self.parallel_queues) for section in self.parallel_objects: self._load_parallel_object(section) for m in [toolhead]: m.add_printer_objects(config)
def _read_config(self): self.objects['configfile'] = pconfig = configfile.PrinterConfig(self) config = pconfig.read_main_config() enable_debug = config.getboolean("enable_debug_logging", False) if self.start_args['debuglevel'] != logging.DEBUG: level = logging.DEBUG if enable_debug else logging.INFO logging.getLogger().setLevel(level) if self.bglogger is not None: pconfig.log_config(config) # Create printer components for m in [pins, mcu]: m.add_printer_objects(config) for section_config in config.get_prefix_sections(''): self.load_object(config, section_config.get_name(), None) for m in [toolhead]: m.add_printer_objects(config) # Validate that there are no undefined parameters in the config file pconfig.check_unused_options(config)
def _read_config(self): self.objects['configfile'] = pconfig = configfile.PrinterConfig(self) config = pconfig.read_main_config() if self.bglogger is not None: pconfig.log_config(config) # Create printer components for m in [pins, heater, mcu]: m.add_printer_objects(config) for section_config in config.get_prefix_sections(''): self.try_load_module(config, section_config.get_name()) for m in [toolhead]: m.add_printer_objects(config) # Validate that there are no undefined parameters in the config file pconfig.check_unused_options(config) # Determine which printer objects have state callbacks self.state_cb = [ o.printer_state for o in self.objects.values() if hasattr(o, 'printer_state') ]