Settings PID
This commit is contained in:
@@ -13,6 +13,12 @@ defaultSettings = {
|
|||||||
"extrudeLength": 100,
|
"extrudeLength": 100,
|
||||||
"extrudeSpeed": 50,
|
"extrudeSpeed": 50,
|
||||||
"markLength": 120
|
"markLength": 120
|
||||||
|
},
|
||||||
|
"pid": {
|
||||||
|
"fanSpeed": 255,
|
||||||
|
"noCycles": 5,
|
||||||
|
"hotEndIndex": 0,
|
||||||
|
"targetTemp": 200,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
$(function () {
|
$(function () {
|
||||||
function CalibrationToolsPIDTuneViewModel(parameters) {
|
function CalibrationToolsPIDTuneViewModel(parameters) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
self.loginStateViewModel = parameters[0];
|
||||||
|
self.settingsViewModel = parameters[1];
|
||||||
|
|
||||||
self.bedCurrentTemp = ko.observable(0);
|
self.bedCurrentTemp = ko.observable(0);
|
||||||
self.bedCurrentTarget = ko.observable(0);
|
self.bedCurrentTarget = ko.observable(0);
|
||||||
@@ -9,6 +11,14 @@ $(function () {
|
|||||||
self.bedCurrentTemp(bedState.bed.actual);
|
self.bedCurrentTemp(bedState.bed.actual);
|
||||||
self.bedCurrentTarget(bedState.bed.target);
|
self.bedCurrentTarget(bedState.bed.target);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
self.onBeforeBinding = self.onUserLoggedIn = self.onUserLoggedOut = function () {
|
||||||
|
self.testParam.extrudeTemp(self.settingsViewModel.settings.plugins.CalibrationTools.pid.fanSpeed());
|
||||||
|
self.testParam.extrudeLength(self.settingsViewModel.settings.plugins.CalibrationTools.pid.noCycles());
|
||||||
|
self.testParam.extrudeSpeed(self.settingsViewModel.settings.plugins.CalibrationTools.pid.hotEndIndex());
|
||||||
|
self.testParam.markLength(self.settingsViewModel.settings.plugins.CalibrationTools.pid.targetTemp());
|
||||||
|
self.is_admin(self.loginStateViewModel.isAdmin());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
OCTOPRINT_VIEWMODELS.push({
|
OCTOPRINT_VIEWMODELS.push({
|
||||||
// This is the constructor to call for instantiating the plugin
|
// This is the constructor to call for instantiating the plugin
|
||||||
|
|||||||
@@ -12,17 +12,21 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ snipped.field("Extrusion temperature", "The temperature used to extrude in testing
Is better to be a bit higher then usual for reducing the nuzzle pressure",
|
{{ snipped.field("Extrusion temperature", "The temperature used to extrude in testing
Is better to be a bit higher then usual for reducing the nuzzle pressure",
|
||||||
"number", "settings.plugins.CalibrationTools.eSteps.extrudeTemp", "true", "ºC", 1) }}
|
"number", "settings.plugins.CalibrationTools.eSteps.extrudeTemp", "true", "ºC", 1, 180, 200) }}
|
||||||
|
|
||||||
{{ snipped.field("Filament extrusion length", "The length of filament to be extruded in testing",
|
{{ snipped.field("Filament extrusion length", "The length of filament to be extruded in testing",
|
||||||
"number", "settings.plugins.CalibrationTools.eSteps.extrudeLength", "true", "mm", 1) }}
|
"number", "settings.plugins.CalibrationTools.eSteps.extrudeLength", "true", "mm", 1, 50) }}
|
||||||
|
|
||||||
{{ snipped.field("Filament extrusion speed", "How fast the filament should be extruded in test
A lower value is recommended for avoiding skipping steps",
|
{{ snipped.field("Filament extrusion speed", "How fast the filament should be extruded in test
A lower value is recommended for avoiding skipping steps",
|
||||||
"number", "settings.plugins.CalibrationTools.eSteps.extrudeSpeed", "true", "mm/s", 1) }}
|
"number", "settings.plugins.CalibrationTools.eSteps.extrudeSpeed", "true", "mm/s", 1, 10, 400) }}
|
||||||
|
|
||||||
{{ snipped.field("Filament mark length", "The length marked on filament",
|
{{ snipped.field("Filament mark length", "The length marked on filament",
|
||||||
"number", "settings.plugins.CalibrationTools.eSteps.markLength", "true", "mm") }}
|
"number", "settings.plugins.CalibrationTools.eSteps.markLength", "true", "mm", 50) }}
|
||||||
|
|
||||||
{{ snipped.subSection("X-Y-Z-Steps", true) }}
|
{{ snipped.subSection("X-Y-Z-Steps", true) }}
|
||||||
|
|
||||||
{{ snipped.subSection("PID", true) }}
|
{{ snipped.subSection("PID", true) }}
|
||||||
|
{{ snipped.field("Fan speed", "Default value for fan speed while tuning", "number", "settings.plugins.CalibrationTools.pid.fanSpeed", "true", "", 1, 0, 255) }}
|
||||||
|
{{ snipped.field("Number of cycles", "Default number of cycles to sample while tuning", "number", "settings.plugins.CalibrationTools.pid.noCycles", "true", "", 1, 3, 200) }}
|
||||||
|
{{ snipped.field("HotEnd index", "Default number of cycles to sample while tuning", "number", "settings.plugins.CalibrationTools.pid.hotEndIndex", "true", "", 1, 0) }}
|
||||||
|
{{ snipped.field("Target temperature", "Default target temperature for tuning", "number", "settings.plugins.CalibrationTools.pid.targetTemp", "true", "ºC", 1, 3, 200) }}
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
{% set step = step|default('0.01') %}
|
{% set step = step|default('0.01') %}
|
||||||
{% set min = min|default("") %}
|
{% set min = min|default("") %}
|
||||||
{% set max = max|default("") %}
|
{% set max = max|default("") %}
|
||||||
|
{% set unit = unit|trim|default("") %}
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
<label for="{{ label }}" class="pull-right" style="margin-top: 5px;" title="{{ title }}">
|
<label for="{{ label }}" class="pull-right" style="margin-top: 5px;" title="{{ title }}">
|
||||||
@@ -31,7 +32,9 @@
|
|||||||
<div class="span6">
|
<div class="span6">
|
||||||
<div class="input-append">
|
<div class="input-append">
|
||||||
<input type="{{ type }}" id="{{ label }}" title="{{ title }}" class="input-small" step="{{ step }}" min="{{ min }}" max="{{ max }}" data-bind="value: {{ binding }}, enable: {{ enable }}">
|
<input type="{{ type }}" id="{{ label }}" title="{{ title }}" class="input-small" step="{{ step }}" min="{{ min }}" max="{{ max }}" data-bind="value: {{ binding }}, enable: {{ enable }}">
|
||||||
|
{% if unit != "" %}
|
||||||
<span class="add-on" title="{{ title }}">{{ _(unit) }}</span>
|
<span class="add-on" title="{{ title }}">{{ _(unit) }}</span>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,6 +45,7 @@
|
|||||||
{% set step = step|default('0.01') %}
|
{% set step = step|default('0.01') %}
|
||||||
{% set min = min|default("") %}
|
{% set min = min|default("") %}
|
||||||
{% set max = max|default("") %}
|
{% set max = max|default("") %}
|
||||||
|
{% set unit = unit|trim|default("") %}
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
<label for="{{ label }}" class="pull-right" style="margin-top: 5px;" title="{{ title }}">
|
<label for="{{ label }}" class="pull-right" style="margin-top: 5px;" title="{{ title }}">
|
||||||
@@ -52,7 +56,9 @@
|
|||||||
<div class="input-append input-prepend">
|
<div class="input-append input-prepend">
|
||||||
<span class="add-on" title="{{ title }}">{{ _(label) }}</span>
|
<span class="add-on" title="{{ title }}">{{ _(label) }}</span>
|
||||||
<input type="{{ type }}" id="{{ label }}" title="{{ title }}" class="input-small" step="{{ step }}" min="{{ min }}" max="{{ max }}" data-bind="value: {{ binding }}, enable: {{ enable }}">
|
<input type="{{ type }}" id="{{ label }}" title="{{ title }}" class="input-small" step="{{ step }}" min="{{ min }}" max="{{ max }}" data-bind="value: {{ binding }}, enable: {{ enable }}">
|
||||||
|
{% if unit != "" %}
|
||||||
<span class="add-on" title="{{ title }}">{{ _(unit) }}</span>
|
<span class="add-on" title="{{ title }}">{{ _(unit) }}</span>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<div class="input-prepend input-append">
|
<div class="input-prepend input-append">
|
||||||
{{ snipped.linkToMarlin("M104", "Marlin website") }}
|
{{ snipped.linkToMarlin("M104", "Marlin website") }}
|
||||||
<span class="add-on" title="Command to preheat the tool before testing">M104 S</span>
|
<span class="add-on" title="Command to preheat the tool before testing">M104 S</span>
|
||||||
<input type="number" id="temperature" class="input-mini" step="1" min="0" max="280"
|
<input type="number" id="temperature" class="input-mini" step="1" min="180" max="280"
|
||||||
title="The temperature used to extrude in testing (ºC)
Is better to be a bit higher then usual for reducing the nuzzle pressure" data-bind="value: $root.testParam.extrudeTemp">
|
title="The temperature used to extrude in testing (ºC)
Is better to be a bit higher then usual for reducing the nuzzle pressure" data-bind="value: $root.testParam.extrudeTemp">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user