commented load position from web

This commit is contained in:
sanjayk03-dev
2024-07-30 18:00:15 +05:30
parent b6f091f0ed
commit 17bc101cef
2 changed files with 20 additions and 20 deletions

View File

@@ -779,20 +779,20 @@ module.exports = {
api.put(`position/${axis}`, { position: parseFloat(position) });
},
load_position: function (axes) {
try {
for (const axis of axes) {
if (this.config.axes["offset_" + axis] && this.state["offset_" + axis] == 0 && this[axis].state == "HOMED") {
const position = this.state.metric
? this.config.axes["offset_" + axis]
: this.config.axes["offset_" + axis] / 25.4;
this.set_position(axis, -position);
}
}
} catch (error) {
console.warn(error);
}
},
// load_position: function (axes) {
// try {
// for (const axis of axes) {
// if (this.config.axes["offset_" + axis] && this.state["offset_" + axis] == 0 && this[axis].state == "HOMED") {
// const position = this.state.metric
// ? this.config.axes["offset_" + axis]
// : this.config.axes["offset_" + axis] / 25.4;
// this.set_position(axis, -position);
// }
// }
// } catch (error) {
// console.warn(error);
// }
// },
zero_all: function () {
for (const axis of "xyzabc") {