def __init__(self): self._logger = mrb_logger( "octoprint.plugins.mrbeam.iobeam.temperaturemanager") self.temperature = None self.temperature_ts = time.time() self.temperature_max = _mrbeam_plugin_implementation.laserCutterProfileManager.get_current_or_default( )['laser']['max_temperature'] self.hysteresis_temperature = _mrbeam_plugin_implementation.laserCutterProfileManager.get_current_or_default( )['laser']['hysteresis_temperature'] self.cooling_duration = _mrbeam_plugin_implementation.laserCutterProfileManager.get_current_or_default( )['laser']['cooling_duration'] self.mode_time_based = self.cooling_duration > 0 self.temp_timer = None self.is_cooling_since = 0 self.dev_mode = _mrbeam_plugin_implementation._settings.get_boolean( ['dev', 'iobeam_disable_warnings']) self._shutting_down = False self._subscribe() self._start_temp_timer() msg = "TemperatureManager initialized. temperature_max: {max}, {key}: {value}".format( max=self.temperature_max, key="cooling_duration" if self.mode_time_based else "hysteresis_temperature", value=self.cooling_duration if self.mode_time_based else self.hysteresis_temperature) self._logger.info(msg)
def __init__(self, plugin, event_bus, plugin_manager, file_manager, settings, printer): self._plugin = plugin self._event_bus = event_bus self._plugin_manager = plugin_manager self._file_manager = file_manager self._settings = settings self._printer = printer self._logger = mrb_logger( "octoprint.plugins.mrbeam.iobeam.onebutton_handler") self._subscribe() self.ready_to_laser_ts = -1 self.ready_to_laser_flag = False self.ready_to_laser_file = None self.ready_to_laser_timer = None self.print_started = -1 self.pause_laser_ts = -1 self.pause_need_to_release = False self.pause_safety_timeout_timer = None self.shutdown_command = self._get_shutdown_command() self.shutdown_state = self.SHUTDOWN_STATE_NONE self.shutdown_prepare_was_initiated_during_pause_saftey_timeout = None self.behave_cooling_state = False
def __init__(self): self._logger = mrb_logger( "octoprint.plugins.mrbeam.iobeam.dustmanager") self._dust = None self._dust_ts = time.time() self._shutting_down = False self._trail_extraction = None self._dust_timer = None self._dust_timer_interval = self.DEFAULT_DUST_TIMER_INTERVAL self._auto_timer = None self._command_response = None self._command_event = threading.Event() self.dev_mode = _mrbeam_plugin_implementation._settings.get_boolean( ['dev', 'iobeam_disable_warnings']) self._subscribe() self._start_dust_timer() self._stop_dust_extraction_thread() self.extraction_limit = _mrbeam_plugin_implementation.laserCutterProfileManager.get_current_or_default( )['dust']['extraction_limit'] self.auto_mode_time = _mrbeam_plugin_implementation.laserCutterProfileManager.get_current_or_default( )['dust']['auto_mode_time'] self._logger.debug("initialized!")
def __init__(self): self._current = None self.settings = settings() self._folder = self.settings.getBaseFolder( "printerProfiles") + "/lasercutterprofiles" if not os.path.exists(self._folder): os.makedirs(self._folder) self._logger = mrb_logger("octoprint.plugins.mrbeam.profile")
def __init__(self, event_bus, printer): CommandTrigger.__init__(self, printer) self._event_bus = event_bus self._logger = mrb_logger("octoprint.plugins.mrbeam.led_events") self._subscriptions = {} self._initSubscriptions()
def __init__(self, plugin, event_bus, plugin_manager): self._plugin = plugin self._event_bus = event_bus self._plugin_manager = plugin_manager self._logger = mrb_logger( "octoprint.plugins.mrbeam.iobeam.interlockhandler") self._subscribe()
def __init__(self, event_bus, settings): self._event_bus = event_bus self._settings = settings self._logger = mrb_logger("octoprint.plugins.mrbeam.analyticshandler") analyticsfolder = os.path.join(self._settings.getBaseFolder("base"), self._settings.get(["analyticsfolder"])) if not os.path.isdir(analyticsfolder): os.makedirs(analyticsfolder) self._jsonfile = os.path.join(analyticsfolder, "analytics_log.json") self._initjsonfile() self._subscribe()
def __init__(self, event_bus, plugin_manager): self._event_bus = event_bus self._settings = _mrbeam_plugin_implementation._settings self._plugin_manager = plugin_manager self._logger = mrb_logger("octoprint.plugins.mrbeam.iobeam.lidhandler") self.lidClosed = True self.camEnabled = self._settings.get(["cam", "enabled"]) self._photo_creator = None self.image_correction_enabled = self._settings.get( ['cam', 'image_correction_enabled']) if self.camEnabled: imagePath = self._settings.getBaseFolder( "uploads") + '/' + self._settings.get(["cam", "localFilePath"]) self._photo_creator = PhotoCreator(self._plugin_manager, imagePath, self.image_correction_enabled) self._subscribe()
def __init__(self, fileManager, analysisQueue, printerProfileManager): Printer.__init__(self, fileManager, analysisQueue, printerProfileManager) self._logger = mrb_logger("octoprint.plugins.mrbeam.printer") self._stateMonitor = LaserStateMonitor( interval=0.5, on_update=self._sendCurrentDataCallbacks, on_add_temperature=self._sendAddTemperatureCallbacks, on_add_log=self._sendAddLogCallbacks, on_add_message=self._sendAddMessageCallbacks, on_get_progress=self._updateProgressDataCallback) self._stateMonitor.reset(state={ "text": self.get_state_string(), "flags": self._getStateFlags() }, job_data={ "file": { "name": None, "size": None, "origin": None, "date": None }, "estimatedPrintTime": None, "lastPrintTime": None, "filament": { "length": None, "volume": None } }, progress={ "completion": None, "filepos": None, "printTime": None, "printTimeLeft": None }, current_z=None)
def __init__(self, event_bus, socket_file=None): self._event_bus = event_bus self._logger = mrb_logger("octoprint.plugins.mrbeam.iobeam") self._shutdown_signaled = False self._isConnected = False self._my_socket = None self._errors = 0 self._callbacks = dict() self._callbacks_lock = RWLock() self.dev_mode = _mrbeam_plugin_implementation._settings.get_boolean( ['dev', 'iobeam_disable_warnings']) self.iobeam_version = None self._connectionException = None self._interlocks = dict() self._subscribe() self._initWorker(socket_file) self.processing_times_log = collections.deque( [], self.PROCESSING_TIMES_LOG_LENGTH)
def _logger(self): return mrb_logger("octoprint.plugins.mrbeam.software_update_information")