Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
5634e7e2a0 | |||
|
b810440070 | ||
|
fb697050cb |
@ -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__
|
||||
|
2
setup.py
2
setup.py
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user