@@ -74,11 +74,11 @@ export default {
|
|||||||
Vue.prototype.$socket.sendObj(rpc,{ [device.device]: null },"server/power/responseToggle")
|
Vue.prototype.$socket.sendObj(rpc,{ [device.device]: null },"server/power/responseToggle")
|
||||||
},
|
},
|
||||||
doRestart: function() {
|
doRestart: function() {
|
||||||
this.$store.commit('server/addEvent', "RESTART")
|
this.$store.commit('server/addEvent', { message: "RESTART", type: 'command' })
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: "RESTART" })
|
this.$socket.sendObj('printer.gcode.script', { script: "RESTART" })
|
||||||
},
|
},
|
||||||
doFirmwareRestart: function() {
|
doFirmwareRestart: function() {
|
||||||
this.$store.commit('server/addEvent', "FIRMWARE_RESTART")
|
this.$store.commit('server/addEvent', { message: "FIRMWARE_RESTART", type: 'command' })
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: "FIRMWARE_RESTART" })
|
this.$socket.sendObj('printer.gcode.script', { script: "FIRMWARE_RESTART" })
|
||||||
},
|
},
|
||||||
doServiceRestartKlipper: function() {
|
doServiceRestartKlipper: function() {
|
||||||
|
@@ -93,32 +93,32 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doHome() {
|
doHome() {
|
||||||
this.$store.commit('server/addEvent', "G28");
|
this.$store.commit('server/addEvent', { message: "G28", type: 'command' });
|
||||||
this.$store.commit('socket/addLoading', { name: 'homeAll' });
|
this.$store.commit('socket/addLoading', { name: 'homeAll' });
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: "G28" }, "socket/removeLoading", { name: 'homeAll' });
|
this.$socket.sendObj('printer.gcode.script', { script: "G28" }, "socket/removeLoading", { name: 'homeAll' });
|
||||||
},
|
},
|
||||||
doHomeX() {
|
doHomeX() {
|
||||||
this.$store.commit('server/addEvent', "G28 X");
|
this.$store.commit('server/addEvent', { message: "G28 X", type: 'command' });
|
||||||
this.$store.commit('socket/addLoading', { name: 'homeX' });
|
this.$store.commit('socket/addLoading', { name: 'homeX' });
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: "G28 X" }, "socket/removeLoading", { name: 'homeX' });
|
this.$socket.sendObj('printer.gcode.script', { script: "G28 X" }, "socket/removeLoading", { name: 'homeX' });
|
||||||
},
|
},
|
||||||
doHomeY() {
|
doHomeY() {
|
||||||
this.$store.commit('server/addEvent', "G28 Y");
|
this.$store.commit('server/addEvent', { message: "G28 Y", type: 'command' });
|
||||||
this.$store.commit('socket/addLoading', { name: 'homeY' });
|
this.$store.commit('socket/addLoading', { name: 'homeY' });
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: "G28 Y" }, "socket/removeLoading", { name: 'homeY' });
|
this.$socket.sendObj('printer.gcode.script', { script: "G28 Y" }, "socket/removeLoading", { name: 'homeY' });
|
||||||
},
|
},
|
||||||
doHomeZ() {
|
doHomeZ() {
|
||||||
this.$store.commit('server/addEvent', "G28 Z");
|
this.$store.commit('server/addEvent', { message: "G28 Z", type: 'command' });
|
||||||
this.$store.commit('socket/addLoading', { name: 'homeZ' });
|
this.$store.commit('socket/addLoading', { name: 'homeZ' });
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: "G28 Z" }, "socket/removeLoading", { name: 'homeZ' });
|
this.$socket.sendObj('printer.gcode.script', { script: "G28 Z" }, "socket/removeLoading", { name: 'homeZ' });
|
||||||
},
|
},
|
||||||
doQGL() {
|
doQGL() {
|
||||||
this.$store.commit('server/addEvent', "QUAD_GANTRY_LEVEL");
|
this.$store.commit('server/addEvent', { message: "QUAD_GANTRY_LEVEL", type: 'command' });
|
||||||
this.$store.commit('socket/addLoading', { name: 'qgl' });
|
this.$store.commit('socket/addLoading', { name: 'qgl' });
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: "QUAD_GANTRY_LEVEL" }, "socket/removeLoading", { name: 'qgl' });
|
this.$socket.sendObj('printer.gcode.script', { script: "QUAD_GANTRY_LEVEL" }, "socket/removeLoading", { name: 'qgl' });
|
||||||
},
|
},
|
||||||
doZtilt() {
|
doZtilt() {
|
||||||
this.$store.commit('server/addEvent', "Z_TILT_ADJUST");
|
this.$store.commit('server/addEvent', { message: "Z_TILT_ADJUST", type: 'command' });
|
||||||
this.$store.commit('socket/addLoading', { name: 'zTilt' });
|
this.$store.commit('socket/addLoading', { name: 'zTilt' });
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: "Z_TILT_ADJUST" }, "socket/removeLoading", { name: 'zTilt' });
|
this.$socket.sendObj('printer.gcode.script', { script: "Z_TILT_ADJUST" }, "socket/removeLoading", { name: 'zTilt' });
|
||||||
},
|
},
|
||||||
@@ -130,11 +130,11 @@
|
|||||||
this.doSend(gcode);
|
this.doSend(gcode);
|
||||||
},
|
},
|
||||||
doSend(gcode) {
|
doSend(gcode) {
|
||||||
this.$store.commit('server/addEvent', gcode);
|
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
|
||||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "server/getGcodeRespond");
|
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "server/getGcodeRespond");
|
||||||
},
|
},
|
||||||
doSendMacro(gcode) {
|
doSendMacro(gcode) {
|
||||||
this.$store.commit('server/addEvent', gcode);
|
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
|
||||||
this.$store.commit('socket/addLoading', { name: 'macro_'+gcode });
|
this.$store.commit('socket/addLoading', { name: 'macro_'+gcode });
|
||||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'macro_'+gcode });
|
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'macro_'+gcode });
|
||||||
},
|
},
|
||||||
|
@@ -65,13 +65,13 @@
|
|||||||
},
|
},
|
||||||
sendRetract() {
|
sendRetract() {
|
||||||
let gcode = "M83\nG1 E-"+this.feedAmount+" F"+(this.feedrate * 60);
|
let gcode = "M83\nG1 E-"+this.feedAmount+" F"+(this.feedrate * 60);
|
||||||
this.$store.commit('server/addEvent', gcode);
|
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
|
||||||
this.$store.commit('socket/addLoading', { name: 'btnRetract' });
|
this.$store.commit('socket/addLoading', { name: 'btnRetract' });
|
||||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnRetract' });
|
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnRetract' });
|
||||||
},
|
},
|
||||||
sendDetract() {
|
sendDetract() {
|
||||||
let gcode = "M83\nG1 E"+this.feedAmount+" F"+(this.feedrate * 60);
|
let gcode = "M83\nG1 E"+this.feedAmount+" F"+(this.feedrate * 60);
|
||||||
this.$store.commit('server/addEvent', gcode);
|
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
|
||||||
this.$store.commit('socket/addLoading', { name: 'btnDetract' });
|
this.$store.commit('socket/addLoading', { name: 'btnDetract' });
|
||||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnDetract' });
|
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnDetract' });
|
||||||
},
|
},
|
||||||
|
@@ -200,7 +200,7 @@ import {mapState} from 'vuex'
|
|||||||
let output = "";
|
let output = "";
|
||||||
commands.forEach(command => output += "<b>"+command.command+":</b> "+command.description+"<br />");
|
commands.forEach(command => output += "<b>"+command.command+":</b> "+command.description+"<br />");
|
||||||
|
|
||||||
this.$store.commit('server/addEvent', output);
|
this.$store.commit('server/addEvent', { message: output, type: 'command' });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -37,7 +37,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
changeSensor(runout) {
|
changeSensor(runout) {
|
||||||
const gcode = 'SET_FILAMENT_SENSOR SENSOR='+runout.name+' ENABLE='+(runout.enabled ? 1 : 0)
|
const gcode = 'SET_FILAMENT_SENSOR SENSOR='+runout.name+' ENABLE='+(runout.enabled ? 1 : 0)
|
||||||
this.$store.commit('server/addEvent', gcode)
|
this.$store.commit('server/addEvent', { message: gcode, type: 'command' })
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: gcode })
|
this.$socket.sendObj('printer.gcode.script', { script: gcode })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -37,7 +37,7 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(fan, index) in this['printer/getTemperatureFans']" v-bind:key="index+99" >
|
<div v-for="(fan, index) in temperatureFans" v-bind:key="index+99" >
|
||||||
<v-divider class="my-2"></v-divider>
|
<v-divider class="my-2"></v-divider>
|
||||||
<v-row align="center">
|
<v-row align="center">
|
||||||
<v-col class="flex-grow-0 py-2 pl-8 pr-0 colHeaterIcons">
|
<v-col class="flex-grow-0 py-2 pl-8 pr-0 colHeaterIcons">
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(sensor,index) in this['printer/getTemperatureSensors']" v-bind:key="index+999">
|
<div v-for="(sensor,index) in temperatureSensors" v-bind:key="index+999">
|
||||||
<v-divider class="my-2"></v-divider>
|
<v-divider class="my-2"></v-divider>
|
||||||
<v-row align="center">
|
<v-row align="center">
|
||||||
<v-col class="flex-grow-0 py-2 pl-8 pr-0 colHeaterIcons">
|
<v-col class="flex-grow-0 py-2 pl-8 pr-0 colHeaterIcons">
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
import toolInput from '../../inputs/ToolInput'
|
import toolInput from '../../inputs/ToolInput'
|
||||||
import TempChart from '@/components/charts/TempChart'
|
import TempChart from '@/components/charts/TempChart'
|
||||||
|
|
||||||
@@ -105,15 +105,22 @@
|
|||||||
...mapState({
|
...mapState({
|
||||||
datasets: state => state.printer.tempHistory.datasets,
|
datasets: state => state.printer.tempHistory.datasets,
|
||||||
boolTempchart: state => state.gui.dashboard.boolTempchart,
|
boolTempchart: state => state.gui.dashboard.boolTempchart,
|
||||||
|
printer: state => state.printer,
|
||||||
}),
|
}),
|
||||||
...mapGetters([
|
|
||||||
'printer/getTemperatureFans',
|
|
||||||
'printer/getTemperatureSensors',
|
|
||||||
]),
|
|
||||||
heaters: {
|
heaters: {
|
||||||
get () {
|
get () {
|
||||||
return this.$store.getters["printer/getHeaters"]
|
return this.$store.getters["printer/getHeaters"]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
temperatureFans: {
|
||||||
|
get () {
|
||||||
|
return this.$store.getters["printer/getTemperatureFans"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
temperatureSensors: {
|
||||||
|
get () {
|
||||||
|
return this.$store.getters["printer/getTemperatureSensors"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@@ -59,25 +59,25 @@
|
|||||||
sendBabySteppingDownFine() {
|
sendBabySteppingDownFine() {
|
||||||
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.01"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
|
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.01"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
|
||||||
this.$store.commit('socket/addLoading', { name: 'babySteppingDownFine' });
|
this.$store.commit('socket/addLoading', { name: 'babySteppingDownFine' });
|
||||||
this.$store.commit('server/addEvent', gcode);
|
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
|
||||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingDownFine' });
|
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingDownFine' });
|
||||||
},
|
},
|
||||||
sendBabySteppingDown() {
|
sendBabySteppingDown() {
|
||||||
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.05"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
|
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.05"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
|
||||||
this.$store.commit('socket/addLoading', { name: 'babySteppingDown' });
|
this.$store.commit('socket/addLoading', { name: 'babySteppingDown' });
|
||||||
this.$store.commit('server/addEvent', gcode);
|
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
|
||||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingDown' });
|
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingDown' });
|
||||||
},
|
},
|
||||||
sendBabySteppingUpFine() {
|
sendBabySteppingUpFine() {
|
||||||
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.01"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
|
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.01"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
|
||||||
this.$store.commit('socket/addLoading', { name: 'babySteppingUpFine' });
|
this.$store.commit('socket/addLoading', { name: 'babySteppingUpFine' });
|
||||||
this.$store.commit('server/addEvent', gcode);
|
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
|
||||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingUpFine' });
|
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingUpFine' });
|
||||||
},
|
},
|
||||||
sendBabySteppingUp() {
|
sendBabySteppingUp() {
|
||||||
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.05"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
|
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.05"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
|
||||||
this.$store.commit('socket/addLoading', { name: 'babySteppingUp' });
|
this.$store.commit('socket/addLoading', { name: 'babySteppingUp' });
|
||||||
this.$store.commit('server/addEvent', gcode);
|
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
|
||||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingUp' });
|
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingUp' });
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@@ -86,7 +86,7 @@
|
|||||||
if (this.type === "fan_generic") gcode = "SET_FAN_SPEED FAN="+this.name+" SPEED="+(this.value/100);
|
if (this.type === "fan_generic") gcode = "SET_FAN_SPEED FAN="+this.name+" SPEED="+(this.value/100);
|
||||||
|
|
||||||
if (gcode !== "") {
|
if (gcode !== "") {
|
||||||
this.$store.commit('server/addEvent', gcode);
|
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: gcode });
|
this.$socket.sendObj('printer.gcode.script', { script: gcode });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@@ -98,7 +98,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
sendCmd() {
|
sendCmd() {
|
||||||
let gcode = this.command+' '+this.attributeName+(this.value*this.attributeScale).toFixed(0)
|
let gcode = this.command+' '+this.attributeName+(this.value*this.attributeScale).toFixed(0)
|
||||||
this.$store.commit('server/addEvent', gcode)
|
this.$store.commit('server/addEvent', { message: gcode, type: 'command' })
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: gcode })
|
this.$socket.sendObj('printer.gcode.script', { script: gcode })
|
||||||
},
|
},
|
||||||
decrement() {
|
decrement() {
|
||||||
|
@@ -322,7 +322,7 @@
|
|||||||
},
|
},
|
||||||
loadProfile: function(name) {
|
loadProfile: function(name) {
|
||||||
this.$store.commit('socket/addLoading', { name: 'bedMeshLoad_'+name })
|
this.$store.commit('socket/addLoading', { name: 'bedMeshLoad_'+name })
|
||||||
this.$store.commit('server/addEvent', "BED_MESH_PROFILE LOAD="+name)
|
this.$store.commit('server/addEvent', { message: "BED_MESH_PROFILE LOAD="+name, type: 'command' })
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE LOAD="+name }, "socket/removeLoading", { name: 'bedMeshLoad_'+name })
|
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE LOAD="+name }, "socket/removeLoading", { name: 'bedMeshLoad_'+name })
|
||||||
},
|
},
|
||||||
openRenameProfile: function() {
|
openRenameProfile: function() {
|
||||||
@@ -332,7 +332,7 @@
|
|||||||
renameProfile: function() {
|
renameProfile: function() {
|
||||||
this.renameDialog = false;
|
this.renameDialog = false;
|
||||||
this.$store.commit('socket/addLoading', { name: 'bedMeshRename' })
|
this.$store.commit('socket/addLoading', { name: 'bedMeshRename' })
|
||||||
this.$store.commit('server/addEvent', "BED_MESH_PROFILE SAVE="+this.newName.toUpperCase())
|
this.$store.commit('server/addEvent', { message: "BED_MESH_PROFILE SAVE="+this.newName.toUpperCase(), type: 'command' })
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE SAVE="+this.newName.toUpperCase() }, "socket/removeLoading", { name: 'bedMeshRename' })
|
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE SAVE="+this.newName.toUpperCase() }, "socket/removeLoading", { name: 'bedMeshRename' })
|
||||||
},
|
},
|
||||||
openRemoveProfile: function(name) {
|
openRemoveProfile: function(name) {
|
||||||
@@ -342,19 +342,19 @@
|
|||||||
removeProfile: function() {
|
removeProfile: function() {
|
||||||
this.removeDialog = false;
|
this.removeDialog = false;
|
||||||
this.$store.commit('socket/addLoading', { name: 'bedMeshRemove_'+this.newName })
|
this.$store.commit('socket/addLoading', { name: 'bedMeshRemove_'+this.newName })
|
||||||
this.$store.commit('server/addEvent', "BED_MESH_PROFILE REMOVE="+this.newName)
|
this.$store.commit('server/addEvent', { message: "BED_MESH_PROFILE REMOVE="+this.newName, type: 'command' })
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE REMOVE="+this.newName }, "printer/removeBedMeshProfile", { name: this.newName })
|
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE REMOVE="+this.newName }, "printer/removeBedMeshProfile", { name: this.newName })
|
||||||
this.removeDialogProfile = ""
|
this.removeDialogProfile = ""
|
||||||
},
|
},
|
||||||
clearBedMesh: function() {
|
clearBedMesh: function() {
|
||||||
this.$store.commit('socket/addLoading', { name: 'bedMeshClear' })
|
this.$store.commit('socket/addLoading', { name: 'bedMeshClear' })
|
||||||
this.$store.commit('server/addEvent', "BED_MESH_CLEAR")
|
this.$store.commit('server/addEvent', { message: "BED_MESH_CLEAR", type: 'command' })
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_CLEAR" }, "socket/removeLoading", { name: 'bedMeshClear' })
|
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_CLEAR" }, "socket/removeLoading", { name: 'bedMeshClear' })
|
||||||
},
|
},
|
||||||
calibrateMesh: function() {
|
calibrateMesh: function() {
|
||||||
this.calibrateDialog = false;
|
this.calibrateDialog = false;
|
||||||
this.$store.commit('socket/addLoading', { name: 'bedMeshCalibrate' });
|
this.$store.commit('socket/addLoading', { name: 'bedMeshCalibrate' });
|
||||||
this.$store.commit('server/addEvent', "BED_MESH_CALIBRATE")
|
this.$store.commit('server/addEvent', { message: "BED_MESH_CALIBRATE", type: 'command' })
|
||||||
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_CALIBRATE" }, "socket/removeLoading", { name: 'bedMeshCalibrate' });
|
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_CALIBRATE" }, "socket/removeLoading", { name: 'bedMeshCalibrate' });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user