logging
This commit is contained in:
@@ -407,10 +407,12 @@ module.exports = new Vue({
|
|||||||
|
|
||||||
save: async function() {
|
save: async function() {
|
||||||
const selected_tool = this.config.tool["selected-tool"];
|
const selected_tool = this.config.tool["selected-tool"];
|
||||||
|
console.log(selected_tool);
|
||||||
const saveModbus =
|
const saveModbus =
|
||||||
selected_tool !== "pwm" &&
|
selected_tool !== "pwm" &&
|
||||||
selected_tool !== "laser" &&
|
selected_tool !== "laser" &&
|
||||||
selected_tool !== "router";
|
selected_tool !== "router";
|
||||||
|
console.log("saveModBus: ", saveModbus);
|
||||||
const settings = {
|
const settings = {
|
||||||
["tool"]: { ...this.config.tool },
|
["tool"]: { ...this.config.tool },
|
||||||
["pwm-spindle"]: { ...this.config["pwm-spindle"] },
|
["pwm-spindle"]: { ...this.config["pwm-spindle"] },
|
||||||
@@ -419,6 +421,8 @@ module.exports = new Vue({
|
|||||||
: undefined,
|
: undefined,
|
||||||
};
|
};
|
||||||
delete settings.tool["tool-type"];
|
delete settings.tool["tool-type"];
|
||||||
|
console.log("settings: ", settings);
|
||||||
|
console.log('this.config["selected-tool-settings"]: ', this.config["selected-tool-settings"]);
|
||||||
|
|
||||||
this.config["selected-tool-settings"][selected_tool] = settings;
|
this.config["selected-tool-settings"][selected_tool] = settings;
|
||||||
this.display_units = this.config.settings["units"];
|
this.display_units = this.config.settings["units"];
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ module.exports = {
|
|||||||
name: "Laser (J Tech, etc)",
|
name: "Laser (J Tech, etc)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "pwncnc-vfd",
|
id: "pwncnc-vfd",
|
||||||
name: "PwnCNC VFD",
|
name: "PwnCNC VFD",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "pwm",
|
id: "pwm",
|
||||||
@@ -89,8 +89,8 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
id: "v70-vfd",
|
id: "v70-vfd",
|
||||||
name: "V70",
|
name: "V70",
|
||||||
unsupported: true
|
unsupported: true,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -155,24 +155,17 @@ module.exports = {
|
|||||||
methods: {
|
methods: {
|
||||||
change_selected_tool: function () {
|
change_selected_tool: function () {
|
||||||
const selectedToolSettings = this.config["selected-tool-settings"] || {};
|
const selectedToolSettings = this.config["selected-tool-settings"] || {};
|
||||||
|
console.log("selectedToolSettings: ", selectedToolSettings);
|
||||||
const settings = selectedToolSettings[this.selected_tool] || {};
|
const settings = selectedToolSettings[this.selected_tool] || {};
|
||||||
|
console.log("settings", settings);
|
||||||
this.config.tool = merge({}, this.config.tool, settings["tool"]);
|
this.config.tool = merge({}, this.config.tool, settings["tool"]);
|
||||||
this.config["pwm-spindle"] = merge(
|
this.config["pwm-spindle"] = merge({}, this.config["pwm-spindle"], settings["pwm-spindle"]);
|
||||||
{},
|
this.config["modbus-spindle"] = merge({}, this.config["modbus-spindle"], settings["modbus-spindle"]);
|
||||||
this.config["pwm-spindle"],
|
console.log(config);
|
||||||
settings["pwm-spindle"]
|
const tool = this.toolList.find(tool => tool.id == this.config.tool["selected-tool"]);
|
||||||
);
|
console.log("tool: ", tool);
|
||||||
this.config["modbus-spindle"] = merge(
|
|
||||||
{},
|
|
||||||
this.config["modbus-spindle"],
|
|
||||||
settings["modbus-spindle"]
|
|
||||||
);
|
|
||||||
|
|
||||||
const tool = this.toolList.find(
|
|
||||||
(tool) => tool.id == this.config.tool["selected-tool"]
|
|
||||||
);
|
|
||||||
this.config.tool["tool-type"] = tool.type || tool.name;
|
this.config.tool["tool-type"] = tool.type || tool.name;
|
||||||
|
console.log(this.config.tool["tool-type"]);
|
||||||
this.$dispatch("config-changed");
|
this.$dispatch("config-changed");
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -218,10 +211,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
show_modbus_field: function (key) {
|
show_modbus_field: function (key) {
|
||||||
return (
|
return key != "regs" && (key != "multi-write" || this.tool_type == "CUSTOM MODBUS VFD");
|
||||||
key != "regs" &&
|
|
||||||
(key != "multi-write" || this.tool_type == "CUSTOM MODBUS VFD")
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
read: function (e) {
|
read: function (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user