load origin

This commit is contained in:
sanjayk03-dev
2024-07-23 23:47:29 +05:30
parent eceb3aef7f
commit 8083cf877c
2 changed files with 6 additions and 5 deletions

View File

@@ -779,6 +779,11 @@ module.exports = {
api.put(`position/${axis}`, { position: parseFloat(position) });
},
load_position: function (axis) {
console.log(this.config.axes["offset_" + axis]);
this.set_position(axis, -this.config.axes["offset_" + axis]);
},
zero_all: function () {
for (const axis of "xyzabc") {
if (this[axis].enabled) {
@@ -806,10 +811,6 @@ module.exports = {
}
},
load_position: function (axis) {
console.log(this.config.axes["offset_" + axis]);
},
start: function () {
api.put("start");
},

View File

@@ -161,7 +161,7 @@ script#control-view-template(type="text/x-template")
button.pure-button(:disabled="!is_idle", @click=`load_position('${axis}')`,
title=`Load {{'${axis}' | upper}} origin.`, style="height:60px;width:60px")
.fa.fa-home
.fa.fa-map-pin
tr(style="vertical-align: top;")