load all position
This commit is contained in:
@@ -779,9 +779,17 @@ module.exports = {
|
|||||||
api.put(`position/${axis}`, { position: parseFloat(position) });
|
api.put(`position/${axis}`, { position: parseFloat(position) });
|
||||||
},
|
},
|
||||||
|
|
||||||
load_position: function (axis) {
|
load_position: function (axes) {
|
||||||
console.log(this.config.axes["offset_" + axis]);
|
try {
|
||||||
this.set_position(axis, -this.config.axes["offset_" + axis]);
|
for (const axis of axes) {
|
||||||
|
if (this.config.axes["offset_" + axis]) {
|
||||||
|
console.log(axis, this.config.axes["offset_" + axis]);
|
||||||
|
this.set_position(axis, -this.config.axes["offset_" + axis]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.warn(error);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
zero_all: function () {
|
zero_all: function () {
|
||||||
|
|||||||
@@ -130,6 +130,10 @@ script#control-view-template(type="text/x-template")
|
|||||||
:disabled="!is_idle",style="height:60px;width:60px")
|
:disabled="!is_idle",style="height:60px;width:60px")
|
||||||
.fa.fa-home
|
.fa.fa-home
|
||||||
|
|
||||||
|
button.pure-button(:disabled="!is_idle", @click=`load_position('xyz')`,
|
||||||
|
title=`Load all origin.`, style="height:60px;width:60px")
|
||||||
|
.fa.fa-map-pin
|
||||||
|
|
||||||
each axis in 'xyzabc'
|
each axis in 'xyzabc'
|
||||||
tr.axis(:class=`${axis}.klass`, v-if=`${axis}.enabled`,
|
tr.axis(:class=`${axis}.klass`, v-if=`${axis}.enabled`,
|
||||||
:title=`${axis}.title`)
|
:title=`${axis}.title`)
|
||||||
|
|||||||
Reference in New Issue
Block a user