2 Commits
0.1.7 ... 0.1.8

Author SHA1 Message Date
2a779c9489 bump version to 0.1.8 2018-04-25 14:36:24 +10:00
b5693e2e34 fix regex not matching properly for low digit count values of S
see issue #9
2018-04-25 14:35:06 +10:00
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ class FanSliderPlugin(octoprint.plugin.StartupPlugin,
def rewrite_m106(self, comm_instance, phase, cmd, cmd_type, gcode, *args, **kwargs): def rewrite_m106(self, comm_instance, phase, cmd, cmd_type, gcode, *args, **kwargs):
if gcode and gcode.startswith('M106'): if gcode and gcode.startswith('M106'):
fanPwm = re.search("S(\d+.\d+)", cmd) fanPwm = re.search("S(\d+\.?\d*)", cmd)
if fanPwm and fanPwm.group(1): if fanPwm and fanPwm.group(1):
fanPwm = fanPwm.group(1) fanPwm = fanPwm.group(1)
if Decimal(fanPwm) < self.minPWM and Decimal(fanPwm) != 0: if Decimal(fanPwm) < self.minPWM and Decimal(fanPwm) != 0:

View File

@ -14,7 +14,7 @@ plugin_package = "octoprint_fanspeedslider"
plugin_name = "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 # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.1.7" plugin_version = "0.1.8"
# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module # module