Compare commits

...

3 Commits

Author SHA1 Message Date
5634e7e2a0 „octoprint_fanspeedslider/__init__.py“ ändern 2020-10-26 17:23:53 +00:00
ntoff
b810440070 bump version 0.2.1
changelog: 0.2.1 Fixes missing variable init #11
2019-01-05 04:38:41 +10:00
ntoff
fb697050cb init self.lockfan
how do I keep forgetting these things?
2018-12-30 23:03:22 +10:00
2 changed files with 5 additions and 3 deletions

View File

@ -12,7 +12,8 @@ class FanSliderPlugin(octoprint.plugin.StartupPlugin,
def __init__(self):
self.minPWM=0,
self.maxPWM=255
self.maxPWM=255,
self.lockfan=False
def on_after_startup(self):
self.get_settings_updates()
@ -108,7 +109,7 @@ class FanSliderPlugin(octoprint.plugin.StartupPlugin,
self._logger.info("fan pwm value " + str(fanPwm) + " is above threshold, decreasing to " + str(self.maxPWM) + " (" + str(self.maxSpeed) + "%)")
cmd = "M106 S" + str(self.maxPWM)
return cmd,
elif self.lockfan and gcode and gcode.startswith(('M106', 'M107')):
elif gcode and gcode.startswith(('M106', 'M107')) and self.lockfan:
self._logger.info("A cooling fan control command was seen, but fanspeedslider is locked. Control command " + str(cmd) + " removed from queue.")
return None,
@ -130,6 +131,7 @@ class FanSliderPlugin(octoprint.plugin.StartupPlugin,
)
__plugin_name__ = "Fan Speed Control"
__plugin_pythoncompat__ = ">=2.7,<4"
def __plugin_load__():
global __plugin_implementation__

View File

@ -14,7 +14,7 @@ plugin_package = "octoprint_fanspeedslider"
plugin_name = "OctoPrint-FanSpeedSlider"
# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.2.0"
plugin_version = "0.2.1"
# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module