rename default fan speed variable to be more clear
This commit is contained in:
parent
b03a045b24
commit
988512f522
@ -15,7 +15,7 @@ class FanSliderPlugin(octoprint.plugin.StartupPlugin,
|
|||||||
|
|
||||||
def get_settings_defaults(self):
|
def get_settings_defaults(self):
|
||||||
return dict(
|
return dict(
|
||||||
fanSpeed=100,
|
defaultFanSpeed=100,
|
||||||
minSpeed=0,
|
minSpeed=0,
|
||||||
maxSpeed=100
|
maxSpeed=100
|
||||||
)
|
)
|
||||||
@ -36,7 +36,7 @@ class FanSliderPlugin(octoprint.plugin.StartupPlugin,
|
|||||||
]
|
]
|
||||||
|
|
||||||
def get_settings_updates(self):
|
def get_settings_updates(self):
|
||||||
self.fanSpeed = self._settings.get(["fanSpeed"])
|
self.defaultFanSpeed = self._settings.get(["defaultFanSpeed"])
|
||||||
self.minSpeed = self._settings.get(["minSpeed"])
|
self.minSpeed = self._settings.get(["minSpeed"])
|
||||||
self.maxSpeed = self._settings.get(["maxSpeed"])
|
self.maxSpeed = self._settings.get(["maxSpeed"])
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ $(function() {
|
|||||||
}
|
}
|
||||||
//retrieve settings
|
//retrieve settings
|
||||||
self.onBeforeBinding = function() {
|
self.onBeforeBinding = function() {
|
||||||
fanSpeed(self.settings.settings.plugins.fanspeedslider.fanSpeed());
|
fanSpeed(self.settings.settings.plugins.fanspeedslider.defaultFanSpeed());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OCTOPRINT_VIEWMODELS.push([
|
OCTOPRINT_VIEWMODELS.push([
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<label class="control-label">{{ _('Default Value') }}</label>
|
<label class="control-label">{{ _('Default Value') }}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<div class="input-append">
|
<div class="input-append">
|
||||||
<input type="number" min="0" max="100" class="input-mini" data-bind="value: settings.plugins.fanspeedslider.fanSpeed">
|
<input type="number" min="0" max="100" class="input-mini" data-bind="value: settings.plugins.fanspeedslider.defaultFanSpeed">
|
||||||
<span class="add-on">%</span>
|
<span class="add-on">%</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="help-block">{{ _('The default value the slider will be set to when opening OctoPrint\'s UI') }}</span>
|
<span class="help-block">{{ _('The default value the slider will be set to when opening OctoPrint\'s UI') }}</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user