- disable button when action has been triggered
- removed auto-kill treada after 3 cycles (need to look again)
This commit is contained in:
@@ -52,13 +52,14 @@ class API(octoprint.plugin.SimpleApiPlugin):
|
||||
|
||||
# Register event to be trigger when temp is achieved
|
||||
self.registerEventTemp("T0", int(data["extrudeTemp"]), self.startExtrusion, data["extrudeLength"], data["extrudeSpeed"])
|
||||
# Heating the tool
|
||||
# Heating HotEnd
|
||||
self._printer.commands("M104 S%(extrudeTemp)s" % data)
|
||||
|
||||
if command == CMD_ESTEPS_SAVE:
|
||||
eStepsSettings = self._settings.get(['eSteps'])
|
||||
userControlsTemp = eStepsSettings.get("userControlsTemp")
|
||||
turnOffHotend = eStepsSettings.get("turnOffHotend")
|
||||
#save data to EEPROM and cool-down
|
||||
self._printer.commands(["M92 E%(newESteps)s" % data, "M500"] + ["M104 S0"] if turnOffHotend and not userControlsTemp else [])
|
||||
return
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ class Hooks():
|
||||
threading.Thread(target=waiter["func"], args=args).start()
|
||||
waiter["dead"] = True
|
||||
break
|
||||
if waiter["callCount"] >= 3:
|
||||
self._logger.warning("Hanging thread: Removing waiter regex: %(regex)s" % waiter)
|
||||
waiter["dead"] = True
|
||||
# if waiter["callCount"] >= 3:
|
||||
# self._logger.warning("Hanging thread: Removing waiter regex: %(regex)s" % waiter)
|
||||
# waiter["dead"] = True
|
||||
self.gCodeWaiters = [w for w in self.gCodeWaiters if "dead" not in w or not w["dead"]]
|
||||
except Exception as e:
|
||||
self._logger.error(traceback.format_exc())
|
||||
@@ -53,7 +53,7 @@ class Hooks():
|
||||
self._logger.error(traceback.format_exc())
|
||||
return parsed_temperatures
|
||||
|
||||
# Check if the current message contains changes concerning registered tool
|
||||
# Check if the current message contains changes concerning registered extruder
|
||||
# if the criteria is meat then the execution function is called
|
||||
def checkAndTriggerEvent(self, temps):
|
||||
for tool, values in temps.items():
|
||||
|
||||
@@ -48,13 +48,18 @@ $(function () {
|
||||
self.steps["E"](response.data.E);
|
||||
}
|
||||
|
||||
self.loadEStepsActive = ko.observable(true)
|
||||
self.loadESteps = function () {
|
||||
self.loadEStepsActive(false);
|
||||
OctoPrint.simpleApiCommand("CalibrationTools", "eSteps_load").done(function (response) {
|
||||
self.from_json(response);
|
||||
}).always(function (response) {
|
||||
self.loadEStepsActive(true);
|
||||
})
|
||||
}
|
||||
|
||||
self.startExtrusionActive = ko.observable(true)
|
||||
self.startExtrusion = function () {
|
||||
self.startExtrusionActive(true);
|
||||
OctoPrint.simpleApiCommand("CalibrationTools", "eSteps_startExtrusion", {
|
||||
"extrudeTemp": self.testParam.extrudeTemp(),
|
||||
"extrudeLength": self.testParam.extrudeLength(),
|
||||
@@ -73,7 +78,9 @@ $(function () {
|
||||
type: "error",
|
||||
hide: false
|
||||
});
|
||||
})
|
||||
}).always(function (response) {
|
||||
self.startExtrusionActive(true);
|
||||
});
|
||||
}
|
||||
|
||||
self.saveESteps = function () {
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
<div class="row-fluid" style="margin-bottom: 5px;">
|
||||
<div class="span6"></div>
|
||||
<div class="span6">
|
||||
<button class="btn btn-success" data-bind="click: $root.startExtrusion, enable: $root.is_admin() && $root.controlViewModel.isOperational() && (!$root.controlViewModel.isPrinting())"
|
||||
<button class="btn btn-success"
|
||||
data-bind="click: $root.startExtrusion, enable: $root.startExtrusionActive() && $root.is_admin() && $root.controlViewModel.isOperational() && (!$root.controlViewModel.isPrinting())"
|
||||
title="This will trigger M90, M83, G1 E100 F50, M82, G90 in order for extruding filament">
|
||||
<i class="fas fa-play" style="color:false" data-color="false"></i>  
|
||||
Start extrusion
|
||||
@@ -62,7 +63,7 @@
|
||||
<div class="input-append">
|
||||
<input type="number" id="eSteps" title="Current value for number of steps/mm for E axe in EEPROM" class="input-small" step="0.01" data-bind="value: $root.steps.E, enable:false">
|
||||
<span class="add-on" title="Current value for number of steps/mm for E axe in EEPROM">steps/mm</span>
|
||||
<button class="btn" data-bind="click: $root.loadESteps, enable: $root.controlViewModel.isOperational() && (!$root.controlViewModel.isPrinting())"
|
||||
<button class="btn" data-bind="click: $root.loadESteps, enable: $root.loadEStepsActive() && $root.controlViewModel.isOperational() && (!$root.controlViewModel.isPrinting())"
|
||||
title="Loads current value of steps/mm from EEPROM by calling M92">
|
||||
<i class="fas fa-sync-alt" style="color:false" data-color="false"></i>  
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user