updating in mach

This commit is contained in:
sanjayk03-dev
2024-07-08 17:35:51 +05:30
parent 3cbaedf905
commit 9a2457d0f3
2 changed files with 18 additions and 13 deletions

View File

@@ -776,16 +776,17 @@ module.exports = {
},
set_position: async function (axis, position) {
this.update_config();
if (!this.config.axes) {
this.config.axes = {};
}
this.config.axes[axis] = {
abs: position + this.state["offset_" + axis],
off: this.state["offset_" + axis],
};
console.log(this.config);
await api.put(`position/${axis}`, { position: parseFloat(position) });
api.put(`position/${axis}`, { position: parseFloat(position) });
// this.update_config();
// if (!this.config.axes) {
// this.config.axes = {};
// }
// this.config.axes[axis] = {
// abs: position + this.state["offset_" + axis],
// off: this.state["offset_" + axis],
// };
// console.log(this.config);
// await this.save_config(this.config);
},
zero_all: function () {