From 988512f522e98f0ac988d979b04483fcf052471f Mon Sep 17 00:00:00 2001 From: ntoff Date: Wed, 6 Sep 2017 17:52:23 +1000 Subject: [PATCH] rename default fan speed variable to be more clear --- octoprint_fanspeedslider/__init__.py | 4 ++-- octoprint_fanspeedslider/static/js/fanslider.js | 2 +- .../templates/fanspeedslider_settings.jinja2 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/octoprint_fanspeedslider/__init__.py b/octoprint_fanspeedslider/__init__.py index 7442a2b..09d104b 100644 --- a/octoprint_fanspeedslider/__init__.py +++ b/octoprint_fanspeedslider/__init__.py @@ -15,7 +15,7 @@ class FanSliderPlugin(octoprint.plugin.StartupPlugin, def get_settings_defaults(self): return dict( - fanSpeed=100, + defaultFanSpeed=100, minSpeed=0, maxSpeed=100 ) @@ -36,7 +36,7 @@ class FanSliderPlugin(octoprint.plugin.StartupPlugin, ] def get_settings_updates(self): - self.fanSpeed = self._settings.get(["fanSpeed"]) + self.defaultFanSpeed = self._settings.get(["defaultFanSpeed"]) self.minSpeed = self._settings.get(["minSpeed"]) self.maxSpeed = self._settings.get(["maxSpeed"]) diff --git a/octoprint_fanspeedslider/static/js/fanslider.js b/octoprint_fanspeedslider/static/js/fanslider.js index 0b07aca..192e9c9 100644 --- a/octoprint_fanspeedslider/static/js/fanslider.js +++ b/octoprint_fanspeedslider/static/js/fanslider.js @@ -54,7 +54,7 @@ $(function() { } //retrieve settings self.onBeforeBinding = function() { - fanSpeed(self.settings.settings.plugins.fanspeedslider.fanSpeed()); + fanSpeed(self.settings.settings.plugins.fanspeedslider.defaultFanSpeed()); } } OCTOPRINT_VIEWMODELS.push([ diff --git a/octoprint_fanspeedslider/templates/fanspeedslider_settings.jinja2 b/octoprint_fanspeedslider/templates/fanspeedslider_settings.jinja2 index 7835a30..c05a308 100644 --- a/octoprint_fanspeedslider/templates/fanspeedslider_settings.jinja2 +++ b/octoprint_fanspeedslider/templates/fanspeedslider_settings.jinja2 @@ -6,7 +6,7 @@
- + %
{{ _('The default value the slider will be set to when opening OctoPrint\'s UI') }}