working settings
This commit is contained in:
@@ -7,8 +7,8 @@ from octoprint_CalibrationTools import api, hooks, models
|
||||
|
||||
defaultSettings = {
|
||||
"eSteps": {
|
||||
"userControlsTemp": True,
|
||||
"turnOffHeater": True,
|
||||
"userControlsTemp": "checked",
|
||||
"turnOffHotend": "",
|
||||
"extrudeTemp": 210,
|
||||
"extrudeLength": 100,
|
||||
"extrudeSpeed": 50,
|
||||
@@ -16,7 +16,6 @@ defaultSettings = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CalibrationtoolsPlugin(
|
||||
octoprint.plugin.StartupPlugin,
|
||||
octoprint.plugin.TemplatePlugin,
|
||||
@@ -29,6 +28,7 @@ class CalibrationtoolsPlugin(
|
||||
collectCommand = False
|
||||
data = {}
|
||||
|
||||
|
||||
def initialize(self):
|
||||
self.collectCommand = False
|
||||
|
||||
@@ -46,6 +46,7 @@ class CalibrationtoolsPlugin(
|
||||
"js": ["js/CalibrationTools.js"],
|
||||
"css": ["css/style.css"]
|
||||
}
|
||||
# self._settings.valid_boolean_trues:
|
||||
|
||||
def get_settings_defaults(self):
|
||||
return defaultSettings
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from threading import Event
|
||||
import octoprint.plugin
|
||||
import flask
|
||||
import re
|
||||
from threading import Event
|
||||
|
||||
import flask
|
||||
import octoprint.plugin
|
||||
|
||||
CMD_TEST = "TEST"
|
||||
CMD_LOAD_STEPS = "loadSteps"
|
||||
@@ -68,10 +69,10 @@ class API(octoprint.plugin.SimpleApiPlugin):
|
||||
return
|
||||
|
||||
if command == CMD_SAVE_E_STEPS:
|
||||
cmds = ["M92 E%(newESteps)s" % data, "M500"]
|
||||
cmds = cmds + ["M104 S0"]
|
||||
self._printer.commands()
|
||||
|
||||
eStepsSettings = self._settings.get(['eSteps'])
|
||||
userControlsTemp = eStepsSettings.get("userControlsTemp")
|
||||
turnOffHotend = eStepsSettings.get("turnOffHotend")
|
||||
self._printer.commands(["M92 E%(newESteps)s" % data, "M500"] + ["M104 S0"] if turnOffHotend and not userControlsTemp else [])
|
||||
return
|
||||
|
||||
if command == CMD_TEST:
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
{% import "macros.jinja2" as snipped %}
|
||||
{{ snipped.subSection("E-Steps default settings", true) }}
|
||||
<div class="row-fluid">
|
||||
<div class="span6"><label class="checkbox pull-right" style="margin-top: 5px;" for="userControlsTemp">Let me to control temperature</label></div>
|
||||
<div class="span6"><label for="userControlsTemp" class="checkbox pull-right" style="margin-top: 5px;">Let me to control temperature</label></div>
|
||||
<div class="span6"><input id="userControlsTemp" type="checkbox" data-bind="checked: settings.plugins.CalibrationTools.eSteps.userControlsTemp"></div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span6"><label class="checkbox pull-right" style="margin-top: 5px;" for="turnOffHeater">Cooldown extruder when saving to EEPROM</label></div>
|
||||
<div class="span6"><input id="turnOffHeater" type="checkbox" data-bind="checked: settings.plugins.CalibrationTools.eSteps.turnOffHeater"></div>
|
||||
<div class="span6"><label for="turnOffHotend" class="checkbox pull-right" style="margin-top: 5px;">Cooldown extruder when saving to EEPROM</label></div>
|
||||
<div class="span6"><input id="turnOffHotend" type="checkbox" data-bind="checked: settings.plugins.CalibrationTools.eSteps.turnOffHotend,
|
||||
disable: settings.plugins.CalibrationTools.eSteps.userControlsTemp">
|
||||
</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",
|
||||
|
||||
Reference in New Issue
Block a user