added run macros func, macros button styles changed, configured time
This commit is contained in:
@@ -502,6 +502,19 @@ module.exports = {
|
||||
|
||||
showProbeDialog: function(probeType) {
|
||||
SvelteComponents.showDialog("Probe", { probeType });
|
||||
},
|
||||
runMacros : function(id){
|
||||
if( this.config.macros[id].gcode_file_name != this.state.selected || this.config.macros[id].gcode_file_time != this.state.selected_time ){
|
||||
this.state.selected=this.config.macros[id].gcode_file_name;
|
||||
this.state.selected_time=this.config.macros[id].gcode_file_time
|
||||
}
|
||||
try{
|
||||
this.load();
|
||||
console.log("Loaded file");
|
||||
// this.start_pause();
|
||||
}catch(error){
|
||||
console.warn("Error running program: ",error);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -87,10 +87,8 @@ module.exports = {
|
||||
|
||||
this.config.macros[id].name=macrosName;
|
||||
this.config.macros[id].color=macrosColor;
|
||||
this.config.macros[id].gcode=this.state.selected;
|
||||
|
||||
console.log(this.state.selected_time);
|
||||
console.log(typeof(this.state.selected_time));
|
||||
this.config.macros[id].gcode_file_name=this.state.selected;
|
||||
this.config.macros[id].gcode_file_time=this.state.selected_time;
|
||||
|
||||
console.log(this.config.macros);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user