From 0e71971e668c13520c5bfc5552921445877488b4 Mon Sep 17 00:00:00 2001 From: ntoff Date: Sat, 11 Nov 2017 21:31:05 +1000 Subject: [PATCH] add percentage to logger message add a more "human readable" percentage value to the logged fan speed (if modified) --- octoprint_fanspeedslider/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/octoprint_fanspeedslider/__init__.py b/octoprint_fanspeedslider/__init__.py index 09d104b..2ea42de 100644 --- a/octoprint_fanspeedslider/__init__.py +++ b/octoprint_fanspeedslider/__init__.py @@ -50,11 +50,11 @@ class FanSliderPlugin(octoprint.plugin.StartupPlugin, if fanPwm and fanPwm.group(1): fanPwm = fanPwm.group(1) if Decimal(fanPwm) < self.minPWM and Decimal(fanPwm) != 0: - self._logger.info("fan pwm value " + str(fanPwm) + " is below threshold, increasing to " + str(self.minPWM)) + self._logger.info("fan pwm value " + str(fanPwm) + " is below threshold, increasing to " + str(self.minPWM) + " (" + str(self.minSpeed) + "%)") cmd = "M106 S" + str(self.minPWM) return cmd, elif Decimal(fanPwm) > self.maxPWM: - self._logger.info("fan pwm value " + str(fanPwm) + " is above threshold, decreasing to " + str(self.maxPWM)) + 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,