merge 0.1.7
update version
This commit is contained in:
commit
55b2a05531
38
extras/fanslider.md
Normal file
38
extras/fanslider.md
Normal file
@ -0,0 +1,38 @@
|
||||
---
|
||||
layout: plugin
|
||||
|
||||
id: fanslider
|
||||
title: Fan Speed Control
|
||||
description: Control your parts cooling fan
|
||||
author: ntoff
|
||||
license: AGPLv3
|
||||
|
||||
|
||||
date: 2017-12-02
|
||||
|
||||
homepage: https://github.com/ntoff/OctoPrint-FanSpeedSlider
|
||||
source: https://github.com/ntoff/OctoPrint-FanSpeedSlider
|
||||
archive: https://github.com/ntoff/OctoPrint-FanSpeedSlider/archive/master.zip
|
||||
|
||||
tags:
|
||||
- UI
|
||||
- Controls
|
||||
|
||||
screenshots:
|
||||
- url: /assets/img/plugins/fanslider/slider.JPG
|
||||
alt: slider
|
||||
caption: slider
|
||||
- url: /assets/img/plugins/fanslider/settings.png
|
||||
alt: settings
|
||||
caption: settings
|
||||
|
||||
featuredimage: /assets/img/plugins/fanslider/slider.JPG
|
||||
|
||||
compatibility:
|
||||
|
||||
octoprint:
|
||||
- 1.3.5
|
||||
|
||||
---
|
||||
|
||||
Adds a slider to the controls page for setting the speed of your parts cooling fan, and a settings page that allows limiting the fan's output power.
|
BIN
image/settings.png
Normal file
BIN
image/settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
@ -1,20 +1,3 @@
|
||||
#touch body #control #control-fan-slider {
|
||||
padding: 30px 0 15px 15px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#touch body #control #control-fan-slider button, #touch body #control #control-fan-slider input {
|
||||
padding: 10px 20px;
|
||||
margin: 0 0 20px;
|
||||
width: 100%;
|
||||
min-height: 40px;
|
||||
height: auto;
|
||||
-ms-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
div#settings_plugin_fanspeedslider div {
|
||||
width: 80%;
|
||||
width: 90%;
|
||||
}
|
@ -18,6 +18,12 @@ $(function () {
|
||||
self.settings.maxFanSpeed = new ko.observable(100); //and this are percents 0 - 100%
|
||||
self.settings.notifyDelay = new ko.observable(4000); //time in milliseconds
|
||||
|
||||
self.settings.commonTitle = ko.observable(gettext("\n\nThis allows limiting the cooling fan without having to re-slice your model.\n\nLimited to prints controlled by OctoPrint."));
|
||||
self.settings.defaultTitle = ko.observable(gettext("This is the value the slider will default to when the UI is loaded / refreshed."));
|
||||
self.settings.minTitle = ko.observable(gettext("Set this to the lowest value at which your fan will spin.") + self.settings.commonTitle());
|
||||
self.settings.maxTitle = ko.observable(gettext("Set this <100% if your cooling fan is too strong on full.") + self.settings.commonTitle());
|
||||
self.settings.noticeTitle = ko.observable(gettext("Notifications only apply when setting the speed via the slider + button in the UI. Set to 0 (zero) to disable notifications."));
|
||||
|
||||
self.showNotify = function (self, options) {
|
||||
options.hide = true;
|
||||
options.title = "Fan Speed Control";
|
||||
@ -88,13 +94,9 @@ $(function () {
|
||||
<button class=\"btn btn-block control-box\" id=\"fan-on\" data-bind=\"enable: isOperational() && loginState.isUser(), click: function() { $root.sendFanSpeed() }\">" + gettext("Fan on") + "</button>\
|
||||
");
|
||||
//also add spin box + button below in its own section, button is redundant but convenient
|
||||
$("#control-jog-extrusion").after("\
|
||||
<div id=\"control-fan-slider\" class=\"jog-panel filament\" data-bind=\"visible: loginState.isUser\">\
|
||||
<div>\
|
||||
$("#control-jog-feedrate").append("\
|
||||
<input type=\"number\" style=\"width: 150px\" data-bind=\"slider: {min: 00, max: 100, step: 1, value: fanSpeed, tooltip: 'hide'}\">\
|
||||
<button class=\"btn btn-block\" style=\"width: 169px\" data-bind=\"enable: isOperational() && loginState.isUser(), click: function() { $root.sendFanSpeed() }\">" + gettext("Fan speed:") + "<span data-bind=\"text: fanSpeed() + '%'\"></span></button>\
|
||||
</div>\
|
||||
</div>\
|
||||
");
|
||||
}
|
||||
}
|
||||
|
@ -5,18 +5,18 @@
|
||||
<label class="control-label">{{ _('Default Value') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="number" min="0" max="100" class="input-mini" data-bind="attr: {title: 'This is the value the slider will default to when the UI is loaded / refreshed.' }, value: settings.plugins.fanspeedslider.defaultFanSpeed">
|
||||
<input type="number" min="0" max="100" class="input-mini" data-bind="attr: { title: defaultTitle }, value: settings.plugins.fanspeedslider.defaultFanSpeed">
|
||||
<span class="add-on">%</span>
|
||||
</div>
|
||||
<span class="help-block">{{ _('The default value the slider will be set to when opening OctoPrint\'s UI') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<p>{{ _('The settings below can be used to limit the fan\'s output without having to re-slice and re-upload your gcode.') }}</p>
|
||||
<!--<strong>{{ _('The settings below can be used to limit the fan\'s output without having to re-slice and re-upload your gcode.') }}</strong>-->
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ _('Minimum Speed') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="number" min="0" max="100" class="input-mini" data-bind="value: settings.plugins.fanspeedslider.minSpeed">
|
||||
<input type="number" min="0" max="100" class="input-mini" data-bind="attr: { title: minTitle }, value: settings.plugins.fanspeedslider.minSpeed">
|
||||
<span class="add-on">%</span>
|
||||
</div>
|
||||
<span class="help-block">{{ _('Any value sent which is below this value will be increased to meet this speed. Useful if your fan doesn\'t work below a certain threshold.') }}</span>
|
||||
@ -26,7 +26,7 @@
|
||||
<label class="control-label">{{ _('Maximum Speed') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="number" min="0" max="100" class="input-mini" data-bind="value: settings.plugins.fanspeedslider.maxSpeed">
|
||||
<input type="number" min="0" max="100" class="input-mini" data-bind="attr: { title: maxTitle }, value: settings.plugins.fanspeedslider.maxSpeed">
|
||||
<span class="add-on">%</span>
|
||||
</div>
|
||||
<span class="help-block">{{ _('Any value sent which is above this value will be decreased to meet this speed. Useful if your fan is too strong on full speed.') }}</span>
|
||||
@ -38,7 +38,7 @@
|
||||
<label class="control-label">{{ _('Notification Autohide Delay') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="number" min="0" class="input-mini" data-bind="attr: {title: 'The plugin will notify a user when the fan speed is automatically adjusted, this only applies to speeds set via the button in the UI. \n\nFan speeds sent via the terminal (and therefore any print job) won\'t trigger notification spam.' }, value: settings.plugins.fanspeedslider.notifyDelay">
|
||||
<input type="number" min="0" class="input-mini" data-bind="attr: {title: noticeTitle }, value: settings.plugins.fanspeedslider.notifyDelay">
|
||||
<span class="add-on">ms</span>
|
||||
</div>
|
||||
<span class="help-block">{{ _('Delay (in milliseconds) before notifications are auto-hidden. Set to 0 to disable notifications.') }}</span>
|
||||
|
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.1.6"
|
||||
plugin_version = "0.1.7"
|
||||
|
||||
# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
|
||||
# module
|
||||
|
Loading…
Reference in New Issue
Block a user