From 75d6cce540441dc5aa5a73b3db8b5af4f1f6a262 Mon Sep 17 00:00:00 2001 From: meteyou Date: Fri, 31 Jul 2020 15:26:16 +0200 Subject: [PATCH] feature: add Z_TILT in ControlPanel.vue feature: replace "_" in macro names in ControlPanel.vue Signed-off-by: Stefan Dej --- src/components/panels/ControlPanel.vue | 10 +++++++++- src/store/actions.js | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/panels/ControlPanel.vue b/src/components/panels/ControlPanel.vue index 523cad7e..b3c9bca4 100644 --- a/src/components/panels/ControlPanel.vue +++ b/src/components/panels/ControlPanel.vue @@ -8,6 +8,7 @@
mdi-homeHome all
QGL
+
Z Tilt
@@ -52,7 +53,7 @@
- {{ macro.name }} + {{ macro.name.replace("_", " ") }}
@@ -73,6 +74,7 @@ loadingHomeX: false, loadingHomeY: false, loadingHomeZ: false, + loadingZTilt: false, } }, computed: { @@ -116,6 +118,11 @@ this.$store.commit('setLoadingQGL', true); this.$socket.sendObj('post_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"); + }, doSendMove(gcode) { gcode = "G91" + "\n" + "G1 " + gcode + " F6000" + "\n" + @@ -134,6 +141,7 @@ this.loadingHomeX = loadings.includes('controlHomeX'); this.loadingHomeY = loadings.includes('controlHomeY'); this.loadingHomeZ = loadings.includes('controlHomeZ'); + this.loadingZTilt = loadings.includes('controlZTilt'); } } } diff --git a/src/store/actions.js b/src/store/actions.js index 3cc2c05b..909b88cc 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -272,6 +272,10 @@ export default { commit('setLoadingQGL', false); }, + responseZTilt({commit}) { + commit('removeLoading', { name: 'controlZTilt' }); + }, + responseRestart({commit}) { commit('setLoadingRestart', false); },