Update websocket reqeusts for moonraker update from 03-09-2020
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
1 parent
f351268745
commit
ddc2ab477f
17 files changed
+61
-61
No files matched your search
@@ -93,32 +93,32 @@
|
||||
doHome() {
|
||||
this.$store.commit('addGcodeResponse', "G28");
|
||||
this.$store.commit('setLoading', { name: 'controlHomeAll' });
|
||||
this.$socket.sendObj('post_printer_gcode_script', { script: "G28" }, "responseHome");
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "G28" }, "responseHome");
|
||||
},
|
||||
doHomeX() {
|
||||
this.$store.commit('addGcodeResponse', "G28 X");
|
||||
this.$store.commit('setLoading', { name: 'controlHomeX' });
|
||||
this.$socket.sendObj('post_printer_gcode_script', { script: "G28 X" }, "responseHomeX");
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "G28 X" }, "responseHomeX");
|
||||
},
|
||||
doHomeY() {
|
||||
this.$store.commit('addGcodeResponse', "G28 Y");
|
||||
this.$store.commit('setLoading', { name: 'controlHomeY' });
|
||||
this.$socket.sendObj('post_printer_gcode_script', { script: "G28 Y" }, "responseHomeY");
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "G28 Y" }, "responseHomeY");
|
||||
},
|
||||
doHomeZ() {
|
||||
this.$store.commit('addGcodeResponse', "G28 Z");
|
||||
this.$store.commit('setLoading', { name: 'controlHomeZ' });
|
||||
this.$socket.sendObj('post_printer_gcode_script', { script: "G28 Z" }, "responseHomeZ");
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "G28 Z" }, "responseHomeZ");
|
||||
},
|
||||
doQGL() {
|
||||
this.$store.commit('addGcodeResponse', "QUAD_GANTRY_LEVEL");
|
||||
this.$store.commit('setLoading', { name: 'controlQGL' });
|
||||
this.$socket.sendObj('post_printer_gcode_script', { script: "QUAD_GANTRY_LEVEL" }, "responseQGL");
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "QUAD_GANTRY_LEVEL" }, "responseQGL");
|
||||
},
|
||||
doZtilt() {
|
||||
this.$store.commit('addGcodeResponse', "Z_TILT_ADJUST");
|
||||
this.$store.commit('setLoading', { name: 'controlZTilt' });
|
||||
this.$socket.sendObj('post_printer_gcode_script', { script: "Z_TILT_ADJUST" }, "responseZTilt");
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "Z_TILT_ADJUST" }, "responseZTilt");
|
||||
},
|
||||
doSendMove(gcode) {
|
||||
gcode = "G91" + "\n" +
|
||||
@@ -129,7 +129,7 @@
|
||||
},
|
||||
doSend(gcode) {
|
||||
this.$store.commit('addGcodeResponse', gcode);
|
||||
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "sendGcode");
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "sendGcode");
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -75,13 +75,13 @@
|
||||
let gcode = "M83\nG1 E-"+this.feedAmount+" F"+(this.feedrate * 60);
|
||||
this.$store.commit('setLoading', { name: 'extruderRetract' });
|
||||
this.$store.commit('addGcodeResponse', gcode);
|
||||
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeExtruderRetract");
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeExtruderRetract");
|
||||
},
|
||||
sendDetract() {
|
||||
let gcode = "M83\nG1 E"+this.feedAmount+" F"+(this.feedrate * 60);
|
||||
this.$store.commit('setLoading', { name: 'extruderDetract' });
|
||||
this.$store.commit('addGcodeResponse', gcode);
|
||||
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeExtruderDetract");
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeExtruderDetract");
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -43,11 +43,11 @@
|
||||
|
||||
doRestart() {
|
||||
this.$store.commit('setLoadingRestart', true);
|
||||
this.$socket.sendObj('post_printer_restart', { }, "responseRestart");
|
||||
this.$socket.sendObj('printer.restart', { }, "responseRestart");
|
||||
},
|
||||
doRestartFirmware() {
|
||||
this.$store.commit('setLoadingRestartFirmware', true);
|
||||
this.$socket.sendObj('post_printer_firmware_restart', { }, "responseRestartFirmware");
|
||||
this.$socket.sendObj('printer.firmware_restart', { }, "responseRestartFirmware");
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -249,9 +249,9 @@
|
||||
this.$store.commit('setLoading', { name: 'loadingConfigRefresh' });
|
||||
|
||||
if (this.currentPath === "") {
|
||||
this.$socket.sendObj('get_directory', { path: 'config' }, 'getDirectory');
|
||||
this.$socket.sendObj('get_directory', { path: 'config_examples' }, 'getDirectory');
|
||||
} else this.$socket.sendObj('get_directory', { path: this.currentPath.substring(1) }, 'getDirectory');
|
||||
this.$socket.sendObj('server.files.get_directory', { path: 'config' }, 'getDirectory');
|
||||
this.$socket.sendObj('server.files.get_directory', { path: 'config_examples' }, 'getDirectory');
|
||||
} else this.$socket.sendObj('server.files.get_directory', { path: this.currentPath.substring(1) }, 'getDirectory');
|
||||
},
|
||||
formatDate(date) {
|
||||
let tmp2 = new Date(date);
|
||||
@@ -380,7 +380,7 @@
|
||||
createFolderAction() {
|
||||
this.dialogCreateFolder.show = false;
|
||||
|
||||
this.$socket.sendObj('post_directory', {
|
||||
this.$socket.sendObj('server.files.post_directory', {
|
||||
path: this.currentPath.substring(1)+"/"+this.dialogCreateFolder.name
|
||||
}, 'getPostDirectory');
|
||||
},
|
||||
@@ -414,7 +414,7 @@
|
||||
},
|
||||
renameFileAction() {
|
||||
this.dialogRenameFile.show = false;
|
||||
this.$socket.sendObj('post_file_move', {
|
||||
this.$socket.sendObj('server.files.move', {
|
||||
source: this.currentPath+"/"+this.dialogRenameFile.item.filename,
|
||||
dest: this.currentPath+"/"+this.dialogRenameFile.newName
|
||||
}, 'getPostFileMove');
|
||||
@@ -430,7 +430,7 @@
|
||||
});
|
||||
},
|
||||
deleteDirectoryAction: function() {
|
||||
this.$socket.sendObj('delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'getDeleteDirectory');
|
||||
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'getDeleteDirectory');
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
methods: {
|
||||
syncEndstops() {
|
||||
this.$store.commit('setLoadingEndstopStatus', true);
|
||||
this.$socket.sendObj('get_printer_query_endstops_status', { }, "responseEndstopStatus");
|
||||
this.$socket.sendObj('printer.query_endstops.status', { }, "responseEndstopStatus");
|
||||
},
|
||||
getEndstops() {
|
||||
this.sortEndstops = {};
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
state_message: 'RESTART'
|
||||
}
|
||||
});
|
||||
this.$socket.sendObj('post_printer_restart', { }, "responseRestart");
|
||||
this.$socket.sendObj('printer.restart', { }, "responseRestart");
|
||||
},
|
||||
doRestartFirmware() {
|
||||
this.$store.commit('setLoadingRestartFirmware', true);
|
||||
@@ -63,15 +63,15 @@
|
||||
state_message: 'FIRMWARE RESTART'
|
||||
}
|
||||
});
|
||||
this.$socket.sendObj('post_printer_firmware_restart', { }, "responseRestartFirmware");
|
||||
this.$socket.sendObj('printer.firmware_restart', { }, "responseRestartFirmware");
|
||||
},
|
||||
doRebootHost() {
|
||||
this.$store.commit('setLoadingRebootHost', true);
|
||||
this.$socket.sendObj('post_machine_reboot', { });
|
||||
this.$socket.sendObj('machine.reboot', { });
|
||||
},
|
||||
doShutdownHost() {
|
||||
this.$store.commit('setLoadingShutdownHost', true);
|
||||
this.$socket.sendObj('post_machine_shutdown', { });
|
||||
this.$socket.sendObj('machine.shutdown', { });
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,23 +188,23 @@
|
||||
methods: {
|
||||
btnPauseJob() {
|
||||
this.$store.commit('setLoading', { name: 'statusPrintPause' });
|
||||
this.$socket.sendObj('post_printer_print_pause', { }, 'respondPrintPause');
|
||||
this.$socket.sendObj('printer.print.pause', { }, 'respondPrintPause');
|
||||
},
|
||||
btnResumeJob() {
|
||||
this.$store.commit('setLoading', { name: 'statusPrintResume' });
|
||||
this.$socket.sendObj('post_printer_print_resume', { }, 'respondPrintResume');
|
||||
this.$socket.sendObj('printer.print.resume', { }, 'respondPrintResume');
|
||||
},
|
||||
btnCancelJob() {
|
||||
this.$store.commit('setLoading', { name: 'statusPrintCancel' });
|
||||
this.$socket.sendObj('post_printer_print_cancel', { }, 'respondPrintCancel');
|
||||
this.$socket.sendObj('printer.print.cancel', { }, 'respondPrintCancel');
|
||||
},
|
||||
btnClearJob() {
|
||||
this.$store.commit('setLoading', {name: 'statusPrintClear'});
|
||||
this.$socket.sendObj('post_printer_gcode_script', {script: 'SDCARD_RESET_FILE'}, 'respondPrintClear');
|
||||
this.$socket.sendObj('printer.gcode.script', {script: 'SDCARD_RESET_FILE'}, 'respondPrintClear');
|
||||
},
|
||||
btnReprintJob() {
|
||||
this.$store.commit('setLoading', {name: 'statusPrintReprint'});
|
||||
this.$socket.sendObj('post_printer_print_start', { filename: this.current_file }, 'respondPrintReprint');
|
||||
this.$socket.sendObj('printer.print.start', { filename: this.current_file }, 'respondPrintReprint');
|
||||
},
|
||||
formatTime(seconds) {
|
||||
let h = Math.floor(seconds / 3600);
|
||||
|
||||
@@ -61,25 +61,25 @@
|
||||
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.01"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
|
||||
this.$store.commit('setLoading', { name: 'babySteppingDownFine' });
|
||||
this.$store.commit('addGcodeResponse', gcode);
|
||||
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeBabySteppingDownFine");
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeBabySteppingDownFine");
|
||||
},
|
||||
sendBabySteppingDown() {
|
||||
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.05"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
|
||||
this.$store.commit('setLoading', { name: 'babySteppingDown' });
|
||||
this.$store.commit('addGcodeResponse', gcode);
|
||||
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeBabySteppingDown");
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeBabySteppingDown");
|
||||
},
|
||||
sendBabySteppingUpFine() {
|
||||
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.01"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
|
||||
this.$store.commit('setLoading', { name: 'babySteppingUpFine' });
|
||||
this.$store.commit('addGcodeResponse', gcode);
|
||||
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeBabySteppingUpFine");
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeBabySteppingUpFine");
|
||||
},
|
||||
sendBabySteppingUp() {
|
||||
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.05"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
|
||||
this.$store.commit('setLoading', { name: 'babySteppingUp' });
|
||||
this.$store.commit('addGcodeResponse', gcode);
|
||||
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeBabySteppingUp");
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeBabySteppingUp");
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in new issue
Block a user