add info and style

This commit is contained in:
sergiuToporjinschi
2022-02-01 23:32:22 +02:00
parent 63eb538cc3
commit 3e83707069
6 changed files with 43 additions and 22 deletions
+3 -1
View File
@@ -13,7 +13,9 @@ class API(octoprint.plugin.SimpleApiPlugin):
@staticmethod @staticmethod
def apiCommands(): def apiCommands():
return {CMD_PID_SAVE : []} return {
CMD_PID_SAVE : ["fanSpeed", "noCycles" "hotEndIndex", "targetTemp"]
}
def apiGateWay(self, command, data): def apiGateWay(self, command, data):
self._logger.debug("DIPGateway") self._logger.debug("DIPGateway")
@@ -14,7 +14,8 @@
border-radius: 4px; border-radius: 4px;
} }
#tab_plugin_CalibrationTools .tab-content, #tab_plugin_CalibrationTools .tab-content > .tab-pane { #tab_plugin_CalibrationTools .tab-content,
#tab_plugin_CalibrationTools .tab-content > .tab-pane {
border: none; border: none;
} }
@@ -40,7 +41,8 @@
margin-bottom: 10px; margin-bottom: 10px;
} }
#tab_plugin_CalibrationTools .icon a, #tab_plugin_CalibrationTools .icon a i { #tab_plugin_CalibrationTools .icon a,
#tab_plugin_CalibrationTools .icon a i {
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
} }
@@ -49,7 +51,10 @@
cursor: text; cursor: text;
} }
#tab_plugin_CalibrationTools input[type='number'].input-mini {
text-align: left;
max-width: 40px;
}
/* /*
@@ -57,3 +57,10 @@
</div> </div>
</div> </div>
{% endmacro %} {% endmacro %}
{% macro linkToMarlin(command, title) %}
<span class="add-on" title="{{ title }}">
<a target="_blank" href="https://marlinfw.org/docs/gcode/{{command}}.html"><i class="fas fa-info-circle"></i></a>
</span>
{% endmacro %}
@@ -1,4 +1,3 @@
<div class="tab-content"> <div class="tab-content">
<div id="calibration_documentation" class="tab-pane active"> <div id="calibration_documentation" class="tab-pane active">
{% include "tabs/tab-doc.jinja2" %} {% include "tabs/tab-doc.jinja2" %}
@@ -10,6 +9,6 @@
{% include "tabs/tab-esteps.jinja2" %} {% include "tabs/tab-esteps.jinja2" %}
</div> </div>
<div id="calibration_pid" visible="false" class="tab-pane"> <div id="calibration_pid" visible="false" class="tab-pane">
{% include "tabs/tab-pind.jinja2" %} {% include "tabs/tab-pid.jinja2" %}
</div> </div>
</div> </div>
@@ -11,6 +11,7 @@
</div> </div>
<div class="span6"> <div class="span6">
<div class="input-prepend input-append"> <div class="input-prepend input-append">
{{ snipped.linkToMarlin("M104", "Marlin website") }}
<span class="add-on" title="Command to preheat the tool before testing">M104&nbsp;&nbsp;&nbsp;S</span> <span class="add-on" title="Command to preheat the tool before testing">M104&nbsp;&nbsp;&nbsp;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="0" max="280"
title="The temperature used to extrude in testing (&#186;C)&#013;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 (&#186;C)&#013;Is better to be a bit higher then usual for reducing the nuzzle pressure" data-bind="value: $root.testParam.extrudeTemp">
@@ -26,6 +27,7 @@
</div> </div>
<div class="span6"> <div class="span6">
<div class="input-prepend input-append"> <div class="input-prepend input-append">
{{ snipped.linkToMarlin("G000-G001", "Marlin website") }}
<span class="add-on" title="Command to extrude filament for testing">G1&nbsp;&nbsp;&nbsp;E</span> <span class="add-on" title="Command to extrude filament for testing">G1&nbsp;&nbsp;&nbsp;E</span>
<input type="number" id="extrusionLenSpeed" class="input-mini" step="1" min="50" title="The length of filament to be extruded in testing (in millimeters)" data-bind="value: $root.testParam.extrudeLength"> <input type="number" id="extrusionLenSpeed" class="input-mini" step="1" min="50" title="The length of filament to be extruded in testing (in millimeters)" data-bind="value: $root.testParam.extrudeLength">
<span class="add-on" title="Command to extrude filament for testing">&nbsp;&nbsp;&nbsp;F</span> <span class="add-on" title="Command to extrude filament for testing">&nbsp;&nbsp;&nbsp;F</span>
@@ -80,7 +82,9 @@
</div> </div>
<div class="span6"> <div class="span6">
<div class="input-prepend input-append"> <div class="input-prepend input-append">
{{ snipped.linkToMarlin("M92", "Marlin website") }}
<span class="add-on" title="Command to change number of steps/mm for E axe" data-bind="text: $root.results.newStepsDisplay"></span> <span class="add-on" title="Command to change number of steps/mm for E axe" data-bind="text: $root.results.newStepsDisplay"></span>
{{ snipped.linkToMarlin("M500", "Marlin website") }}
<span class="add-on" title="Command for saving steps in EEPROM">M500</span> <span class="add-on" title="Command for saving steps in EEPROM">M500</span>
</div> </div>
</div> </div>
@@ -5,38 +5,42 @@ Current bed temperature: <span data-bind="text: bedCurrentTemp"></span>&#176; Be
<div class="row-fluid"> <div class="row-fluid">
<div class="span6"> <div class="span5">
<label for="fanSpeed" class="pull-right" style="margin-top: 5px;" title="x"> <label for="fanSpeed" class="pull-right" style="margin-top: 5px;" title="x">
Turn fan to max Turn fan to max
</label> </label>
</div> </div>
<div class="span6"> <div class="span7">
<div class="input-prepend input-append"> <div class="input-prepend input-append">
{{ snipped.linkToMarlin("M106", "Marlin website") }}
<span class="add-on" title="Command for turning the fan to 100%">M106&nbsp;&nbsp;&nbsp;S</span> <span class="add-on" title="Command for turning the fan to 100%">M106&nbsp;&nbsp;&nbsp;S</span>
<input type="number" id="fanSpeed" title="Command for turning the fan to 100%" class="input-mini" step="1" min="0" max="255" data-bind="value: $root.pid.fanSpeed"> <input type="number" id="fanSpeed" title="Command for turning the fan to 100%" class="input-mini" step="1" min="0" max="255" data-bind="value: $root.pid.fanSpeed">
</div> </div>
</div> </div>
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
<div class="span6"> <div class="span5">
<label for="tunningPIDTool" class="pull-right" style="margin-top: 5px;" title="x"> <label for="tunningPIDNoCycles" class="pull-right" style="margin-top: 5px;" title="x">
Tuning PID Tuning PID
</label> </label>
</div> </div>
<div class="span6"> <div class="span7">
<div class="input-prepend input-append"> <div class="input-prepend input-append">
<span class="add-on" title="Command for triggering tool PID tunning">M303&nbsp;&nbsp;&nbsp;E</span> {{ snipped.linkToMarlin("M303", "Marlin website") }}
<input type="number" id="tunningPIDTool" class="input-mini" step="1" min="0" title="Tool number 0 for first hot end" data-bind="value: $root.pid.hotendNo"> <span class="add-on" title="Command for triggering tool PID tunning">M303&nbsp;&nbsp;&nbsp;C</span>
<span class="add-on" title="">S</span> <input type="number" id="tunningPIDNoCycles" class="input-mini" step="1" min="0" title="Tool number 0 for first hot end" data-bind="value: $root.pid.noCycles">
<input type="number" id="tunningPIDToolTemp" class="input-mini" step="1" min="100" max="280" title="Temperature for tunning" data-bind="value: $root.pid.tunningTemp"> <span class="add-on" title="">&nbsp;&nbsp;&nbsp;E</span>
<span class="add-on" title="">U1</span> <input type="number" id="tunningPIDTool" class="input-mini" step="1" min="0" title="Hotend index 0 for first hot end" data-bind="value: $root.pid.hotEndIndex">
<span class="add-on" title="">&nbsp;&nbsp;&nbsp;S</span>
<input type="number" id="tunningPIDToolTemp" class="input-mini" step="1" min="100" max="280" title="Target temperature" data-bind="value: $root.pid.targetTemp">
<span class="add-on" title="">&nbsp;&nbsp;&nbsp;U1</span>
</div> </div>
</div> </div>
</div> </div>
<div class="row-fluid" style="margin-bottom: 5px;"> <div class="row-fluid" style="margin-bottom: 5px;">
<div class="span6"></div> <div class="span5"></div>
<div class="span6"> <div class="span7">
<button class="btn btn-success" data-bind="click: $root.pidHotEndTune, enable: $root.controlViewModel.isOperational() && (!$root.controlViewModel.isPrinting())" <button class="btn btn-success" data-bind="click: $root.pidHotEndTune, enable: $root.controlViewModel.isOperational() && (!$root.controlViewModel.isPrinting())"
title="This will trigger PID auto tuning (M106 Sx; M303 Ex Sx U1; M501)"> title="This will trigger PID auto tuning (M106 Sx; M303 Ex Sx U1; M501)">
<i class="fas fa-play" style="color:false" data-color="false"></i>&nbsp&nbsp <i class="fas fa-play" style="color:false" data-color="false"></i>&nbsp&nbsp