tool-view to app.js

This commit is contained in:
sanjayk03-dev
2024-02-26 19:54:14 +05:30
parent 6c65d34b28
commit 096b87ebad
2 changed files with 8 additions and 7 deletions

View File

@@ -420,6 +420,14 @@ module.exports = new Vue({
};
delete settings.tool["tool-type"];
if (selected_tool == "pwncnc-vfd" && saveModbus) {
settings["modbus-spindle"]["regs"][5] = {
"reg-value": 6,
"reg-type": "stop-write",
"reg-addr": 40960,
};
}
this.config["selected-tool-settings"][selected_tool] = settings;
this.display_units = this.config.settings["units"];

View File

@@ -159,13 +159,6 @@ module.exports = {
this.config.tool = merge({}, this.config.tool, settings["tool"]);
this.config["pwm-spindle"] = merge({}, this.config["pwm-spindle"], settings["pwm-spindle"]);
this.config["modbus-spindle"] = merge({}, this.config["modbus-spindle"], settings["modbus-spindle"]);
if (this.selected_tool == "pwncnc-vfd" && Object.keys(settings).length == 0) {
this.config["modbus-spindle"]["regs"][5] = {
"reg-value": 6,
"reg-type": "stop-write",
"reg-addr": 40960,
};
}
const tool = this.toolList.find(tool => tool.id == this.config.tool["selected-tool"]);
this.config.tool["tool-type"] = tool.type || tool.name;
this.$dispatch("config-changed");