load all position
This commit is contained in:
@@ -779,9 +779,17 @@ 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]);
|
||||
load_position: function (axes) {
|
||||
try {
|
||||
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 () {
|
||||
|
||||
@@ -129,6 +129,10 @@ script#control-view-template(type="text/x-template")
|
||||
button.pure-button(title="Home all axes.", @click="home()",
|
||||
:disabled="!is_idle",style="height:60px;width:60px")
|
||||
.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'
|
||||
tr.axis(:class=`${axis}.klass`, v-if=`${axis}.enabled`,
|
||||
|
||||
Reference in New Issue
Block a user