Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
958358d483 | ||
|
|
ddc2ab477f | ||
|
|
f351268745 | ||
|
|
25a7e8a33b | ||
|
|
8b8f3cf939 | ||
|
|
3440d486df | ||
|
|
693fcae49a | ||
|
|
ac01dce620 | ||
|
|
d3c3113c43 | ||
|
|
ae30257ee1 | ||
|
|
b5add6f919 | ||
|
|
90b3419552 | ||
|
|
0100eaad5d | ||
|
|
825d65be9d | ||
|
|
38a0c8f441 | ||
|
|
ad6ae1128b | ||
|
|
6094c4f9bd | ||
|
|
65a4e40d39 | ||
|
|
39f3cfe824 | ||
|
|
84c9040e2a | ||
|
|
890a3e3332 | ||
|
|
16b6ed6000 |
No files matched your search
@@ -241,7 +241,7 @@ Now we can install Mainsail (static httpdocs).
|
||||
Now you can download the current mainsail static data
|
||||
```
|
||||
cd ~/mainsail
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.0/mainsail-beta-0.2.0.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.2/mainsail-beta-0.2.2.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
Now it should be possible to open the interface: `http://<printer-ip>/`.
|
||||
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ git fetch
|
||||
git checkout origin/master
|
||||
```
|
||||
|
||||
Please check the location of the `printer.cfg` and the UDS in the `/etc/default/klipper` file. This
|
||||
Please check the location of the `~/klipper_config/printer.cfg` and the UDS (`-a /tmp/klippy_uds`) in the `/etc/default/klipper` file. This
|
||||
should look like:
|
||||
```
|
||||
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/klipper_config/printer.cfg -l /tmp/klippy.log -a /tmp/klippy_uds"
|
||||
@@ -36,6 +36,6 @@ If you see a content like this
|
||||
```
|
||||
cd ~/mainsail
|
||||
rm -R ./*
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.0/mainsail-beta-0.2.0.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.2/mainsail-beta-0.2.2.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
Now it should be possible to open the interface: `http://<printer-ip>/`.
|
||||
+5
-6
@@ -76,7 +76,7 @@
|
||||
</v-dialog>
|
||||
|
||||
<v-footer app class="d-block">
|
||||
<span>v0.2.0</span>
|
||||
<span>v0.2.1</span>
|
||||
<span v-if="version"> - {{ version }}</span>
|
||||
<span class="float-right">Made with <img src="/img/heart.png" height="15" title="love" alt="heard" /> by <a href="http://www.vorondesign.com/" target="_blank"><img src="/img/voron.png" height="15" title="VoronDesign" alt="Logo - VoronDesign" /></a></span>
|
||||
</v-footer>
|
||||
@@ -131,12 +131,11 @@ export default {
|
||||
methods: {
|
||||
emergencyStop: function() {
|
||||
this.$store.commit('setLoadingEmergencyStop', true);
|
||||
this.$socket.sendObj('post_printer_emergency_stop', {}, 'setLoadingEmergencyStop');
|
||||
this.$socket.sendObj('printer.emergency_stop', {}, 'setLoadingEmergencyStop');
|
||||
},
|
||||
drawFavicon(val) {
|
||||
let favicon = document.getElementById('favicon');
|
||||
if (val === 0) favicon.href = "/favicon.ico";
|
||||
else {
|
||||
if (val > 0 && val < 100) {
|
||||
let faviconSize = 64;
|
||||
|
||||
let canvas = document.createElement('canvas');
|
||||
@@ -175,7 +174,7 @@ export default {
|
||||
context.fill();
|
||||
|
||||
favicon.href = canvas.toDataURL('image/png');
|
||||
}
|
||||
} else favicon.href = "/favicon.ico"
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -189,7 +188,7 @@ export default {
|
||||
},
|
||||
current_file: {
|
||||
handler: function(newVal) {
|
||||
this.$socket.sendObj("get_file_metadata", { filename: newVal }, "getMetadataCurrentFile");
|
||||
this.$socket.sendObj("server.files.metadata", { filename: newVal }, "getMetadataCurrentFile");
|
||||
}
|
||||
},
|
||||
config() {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -50,23 +50,19 @@
|
||||
feedrate: 5,
|
||||
loadingRetract: false,
|
||||
loadingDetract: false,
|
||||
extruder: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
config: state => state.config,
|
||||
loadings: state => state.loadings,
|
||||
printer_state: state => state.printer.print_stats.state,
|
||||
config: state => state.printer.configfile.config,
|
||||
}),
|
||||
...mapGetters([
|
||||
'getMacros',
|
||||
'getCurrentExtruder',
|
||||
]),
|
||||
extruder: {
|
||||
get: function() {
|
||||
return this.$store.getters.getCurrentExtruder;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setFeedAmount(value) {
|
||||
@@ -76,16 +72,16 @@
|
||||
this.feedrate = value;
|
||||
},
|
||||
sendRetract() {
|
||||
let gcode = "M120\nM83\nG1 E-"+this.feedAmount+" F"+(this.feedrate * 60)+"\nM121";
|
||||
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 = "M120\nM83\nG1 E"+this.feedAmount+" F"+(this.feedrate * 60)+"\nM121";
|
||||
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: {
|
||||
@@ -93,6 +89,12 @@
|
||||
this.loadingRetract = loadings.includes('extruderRetract');
|
||||
this.loadingDetract = loadings.includes('extruderDetract');
|
||||
},
|
||||
config: {
|
||||
handler() {
|
||||
this.extruder = this.getCurrentExtruder;
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -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");
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -14,11 +14,10 @@
|
||||
|
||||
.config-editor-overlay div.v-card {
|
||||
position: relative;
|
||||
padding-top: 64px !important;
|
||||
}
|
||||
|
||||
.config-editor-overlay div.v-card header {
|
||||
position: fixed;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
@@ -250,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);
|
||||
@@ -381,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');
|
||||
},
|
||||
@@ -415,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');
|
||||
@@ -431,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 = {};
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
</v-list-item>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-card-text class=" text-center text-lg-left">
|
||||
<div><v-btn :href="'http://'+hostname+':'+port+'/server/files/klippy.log'" color="primary"><v-icon class="mr-sm-2">mdi-download</v-icon>Klipper Log</v-btn></div>
|
||||
<div><v-btn :href="'http://'+hostname+':'+port+'/server/files/moonraker.log'" color="mt-3 primary"><v-icon class="mr-sm-2">mdi-download</v-icon>Moonraker Log</v-btn></div>
|
||||
<div><v-btn @click="doRestart" :loading="loadingRestart" color="error" class="mt-3"><v-icon class="mr-sm-2">mdi-cached</v-icon>Restart</v-btn></div>
|
||||
<div><v-btn @click="doRestartFirmware" :loading="loadingRestartFirmware" class="mt-3" color="error"><v-icon class="mr-sm-2">mdi-cached</v-icon>FW <span class="d-none d-sm-block">Restart</span></v-btn></div>
|
||||
<div><v-btn @click="doRebootHost" :loading="loadingRebootHost" class="mt-3" color="error"><v-icon class="mr-sm-2">mdi-cached</v-icon>Host <span class="d-none d-sm-block">Reboot</span></v-btn></div>
|
||||
<div><v-btn @click="doShutdownHost" :loading="loadingShutdownHost" class="mt-3" color="error"><v-icon class="mr-sm-2">mdi-power</v-icon>Host <span class="d-none d-sm-block">Shutdown</span></v-btn></div>
|
||||
<div><v-btn :href="'http://'+hostname+':'+port+'/server/files/klippy.log'" block color="primary"><v-icon class="mr-2">mdi-download</v-icon>Klipper Log</v-btn></div>
|
||||
<div><v-btn :href="'http://'+hostname+':'+port+'/server/files/moonraker.log'" block color="mt-3 primary"><v-icon class="mr-2">mdi-download</v-icon>Moonraker Log</v-btn></div>
|
||||
<div><v-btn @click="doRestart" block :loading="loadingRestart" color="error" class="mt-3"><v-icon class="mr-2">mdi-cached</v-icon>Restart</v-btn></div>
|
||||
<div><v-btn @click="doRestartFirmware" block :loading="loadingRestartFirmware" class="mt-3" color="error"><v-icon class="mr-2">mdi-cached</v-icon>FW <span class="d-none d-sm-block">Restart</span></v-btn></div>
|
||||
<div><v-btn @click="doRebootHost" block :loading="loadingRebootHost" class="mt-3" color="error"><v-icon class="mr-2">mdi-cached</v-icon><span class="d-none d-sm-block">Host</span> Reboot</v-btn></div>
|
||||
<div><v-btn @click="doShutdownHost" block :loading="loadingShutdownHost" class="mt-3" color="error"><v-icon class="mr-2">mdi-power</v-icon><span class="d-none d-sm-block">Host</span> Shutdown</v-btn></div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
@@ -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', { });
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
.vertical_align_center {
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
.statusPanel-image-preview {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
@@ -20,96 +24,121 @@
|
||||
</v-list-item>
|
||||
<v-divider class="my-2" ></v-divider>
|
||||
<v-card-text class="px-0 pt-0 pb-2 content">
|
||||
<v-layout wrap class=" text-center" v-if="display_message">
|
||||
<v-flex col tag="strong" class="category-header">Message</v-flex>
|
||||
<v-flex grow class="equal-width text-left vertical_align_center">
|
||||
<v-flex tag="span">{{ display_message }}</v-flex>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider class="my-2" v-if="display_message" ></v-divider>
|
||||
<v-layout wrap class=" text-center">
|
||||
<v-flex col tag="strong" class="category-header">
|
||||
Position
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">X</v-flex>
|
||||
<v-flex tag="span">{{ position.length ? position[0].toFixed(2) : "--" }}</v-flex>
|
||||
<v-row>
|
||||
<v-col
|
||||
class="col-12 pv-0 col-sm-4 pr-sm-0"
|
||||
v-if="
|
||||
['printing', 'paused', 'complete'].includes(printer_state) &&
|
||||
current_file_metadata &&
|
||||
current_file_metadata.thumbnails &&
|
||||
current_file_metadata.thumbnails.length &&
|
||||
current_file_metadata.thumbnails.find(element => element.width === 400)
|
||||
">
|
||||
<img
|
||||
class="statusPanel-image-preview"
|
||||
:src="'data:image/gif;base64,'+(current_file_metadata.thumbnails ? current_file_metadata.thumbnails.find(element => element.width === 400).data : '')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col
|
||||
:class="
|
||||
(['printing', 'paused', 'complete'].includes(printer_state) &&
|
||||
current_file_metadata &&
|
||||
current_file_metadata.thumbnails &&
|
||||
current_file_metadata.thumbnails.length &&
|
||||
current_file_metadata.thumbnails.find(element => element.width === 400)) ? 'col-12 pv-0 col-sm-8 pl-sm-0' : 'col-12 pv-0'
|
||||
">
|
||||
<v-layout wrap class=" text-center" v-if="display_message">
|
||||
<v-flex col tag="strong" class="category-header">Message</v-flex>
|
||||
<v-flex grow class="equal-width text-left vertical_align_center">
|
||||
<v-flex tag="span">{{ display_message }}</v-flex>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Y</v-flex>
|
||||
<v-flex tag="span">{{ position.length ? position[1].toFixed(2) : "--" }}</v-flex>
|
||||
<v-divider class="my-2" v-if="display_message" ></v-divider>
|
||||
<v-layout wrap class=" text-center">
|
||||
<v-flex col tag="strong" class="category-header">
|
||||
Position
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">X</v-flex>
|
||||
<v-flex tag="span">{{ position.length ? position[0].toFixed(2) : "--" }}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Y</v-flex>
|
||||
<v-flex tag="span">{{ position.length ? position[1].toFixed(2) : "--" }}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Z</v-flex>
|
||||
<v-flex tag="span">{{ position.length ? position[2].toFixed(2) : "--" }}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Z</v-flex>
|
||||
<v-flex tag="span">{{ position.length ? position[2].toFixed(2) : "--" }}</v-flex>
|
||||
<v-divider class="my-2" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state)"></v-divider>
|
||||
<v-layout wrap class=" text-center" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state)">
|
||||
<v-flex col tag="strong" class="category-header">
|
||||
Printstatus
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Filament used</v-flex>
|
||||
<v-flex tag="span">{{ filament_used > 1000 ? (filament_used / 1000).toFixed(2)+"m" : filament_used.toFixed(2)+"mm" }}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Print Time</v-flex>
|
||||
<v-flex tag="span">{{ formatTime(print_time) }}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Total Time</v-flex>
|
||||
<v-flex tag="span">{{ formatTime(print_time_total) }}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider class="my-2" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state)"></v-divider>
|
||||
<v-layout wrap class=" text-center" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state)">
|
||||
<v-flex col tag="strong" class="category-header">
|
||||
Printstatus
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Filament used</v-flex>
|
||||
<v-flex tag="span">{{ filament_used > 1000 ? (filament_used / 1000).toFixed(2)+"m" : filament_used.toFixed(2)+"mm" }}</v-flex>
|
||||
<v-divider class="my-2" v-if="['printing', 'paused', 'error'].includes(printer_state)"></v-divider>
|
||||
<v-layout wrap class=" text-center" v-if="['printing', 'paused', 'error'].includes(printer_state)">
|
||||
<v-flex col tag="strong" class="category-header py-0">
|
||||
Estimations<br />based on
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">File</v-flex>
|
||||
<v-flex tag="span">{{ print_time > 0 && printProgress > 0 ? formatTime(print_time / printProgress - print_time) : '--' }}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Filament</v-flex>
|
||||
<v-flex tag="span">{{ (filament_used > 0 && current_file_filament_total > filament_used) ? formatTime(print_time / (filament_used / current_file_filament_total) - print_time) : '--' }}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Slicer</v-flex>
|
||||
<v-flex tag="span">{{ current_file_estimated_time > print_time ? formatTime(current_file_estimated_time - print_time) : '--'}}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Print Time</v-flex>
|
||||
<v-flex tag="span">{{ formatTime(print_time) }}</v-flex>
|
||||
<v-layout wrap class=" text-center" v-if="['printing', 'paused', 'error'].includes(printer_state)">
|
||||
<v-layout column class="mt-2" >
|
||||
<v-progress-linear
|
||||
:value="printProgress * 100"
|
||||
height="25"
|
||||
>
|
||||
<template>
|
||||
<strong>{{ Math.ceil(printProgress * 100) }}%</strong>
|
||||
</template>
|
||||
</v-progress-linear>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Total Time</v-flex>
|
||||
<v-flex tag="span">{{ formatTime(print_time_total) }}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider class="my-2" v-if="['printing', 'paused', 'error'].includes(printer_state)"></v-divider>
|
||||
<v-layout wrap class=" text-center" v-if="['printing', 'paused', 'error'].includes(printer_state)">
|
||||
<v-flex col tag="strong" class="category-header py-0">
|
||||
Estimations<br />based on
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">File</v-flex>
|
||||
<v-flex tag="span">{{ print_time > 0 && printProgress > 0 ? formatTime(print_time / printProgress - print_time) : '--' }}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Filament</v-flex>
|
||||
<v-flex tag="span">{{ (filament_used > 0 && current_file_filament_total > filament_used) ? formatTime(print_time / (filament_used / current_file_filament_total) - print_time) : '--' }}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Slicer</v-flex>
|
||||
<v-flex tag="span">{{ current_file_estimated_time > print_time ? formatTime(current_file_estimated_time - print_time) : '--'}}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout wrap class=" text-center" v-if="['printing', 'paused', 'error'].includes(printer_state)">
|
||||
<v-layout column class="mt-2" >
|
||||
<v-progress-linear
|
||||
:value="printProgress * 100"
|
||||
height="25"
|
||||
>
|
||||
<template>
|
||||
<strong>{{ Math.ceil(printProgress * 100) }}%</strong>
|
||||
</template>
|
||||
</v-progress-linear>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
@@ -159,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);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<v-card-text class="py-1">
|
||||
<v-row class="">
|
||||
<v-col class="col-12 pb-0 text-center">
|
||||
<p>Current Offset: {{ base_zpos.toFixed(2) }}mm</p>
|
||||
<p>Current Offset: {{ homing_origin.length > 1 ? homing_origin[2].toFixed(2) : 0.00 }}mm</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
@@ -51,7 +51,7 @@
|
||||
computed: {
|
||||
...mapState({
|
||||
loadings: state => state.loadings,
|
||||
base_zpos: state => state.printer.gcode_move.base_zpos,
|
||||
homing_origin: state => state.printer.gcode_move.homing_origin,
|
||||
printer_state: state => state.printer.print_stats.state,
|
||||
homed_axis: state => state.printer.toolhead.homed_axes,
|
||||
}),
|
||||
@@ -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: {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
methods: {
|
||||
changeSensor() {
|
||||
let gcode = 'SET_FILAMENT_SENSOR SENSOR='+this.name+' ENABLE='+(this.enabled ? 1 : 0);
|
||||
this.$socket.sendObj('post_printer_gcode_script', { script: gcode });
|
||||
this.$socket.sendObj('printer.gcode.script', { script: gcode });
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
} else if (this.min_temp !== undefined && this.value < this.min_temp && parseFloat(this.value) !== 0) {
|
||||
this.value = this.target;
|
||||
Vue.$toast.error("Temperature too low for "+this.name+"! (min: "+this.min_temp+")");
|
||||
} else this.$socket.sendObj('post_printer_gcode_script', {script: this.command+' '+this.attributeName+'='+this.name+' TARGET='+this.value});
|
||||
} else this.$socket.sendObj('printer.gcode.script', {script: this.command+' '+this.attributeName+'='+this.name+' TARGET='+this.value});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
},
|
||||
methods: {
|
||||
sendCmd() {
|
||||
this.$socket.sendObj('post_printer_gcode_script', { script: this.command+' '+this.attributeName+(this.value*this.attributeScale).toFixed(0) });
|
||||
this.$socket.sendObj('printer.gcode.script', { script: this.command+' '+this.attributeName+(this.value*this.attributeScale).toFixed(0) });
|
||||
},
|
||||
decrement() {
|
||||
this.value--;
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
doSend() {
|
||||
this.$store.commit('setLoading', { name: 'loadingSendGcode' });
|
||||
this.$store.commit('addGcodeResponse', this.gcode);
|
||||
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: this.gcode }, "sendGcode");
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: this.gcode }, "sendGcode");
|
||||
this.lastCommands.push(this.gcode);
|
||||
this.gcode = "";
|
||||
this.lastCommandNumber = null;
|
||||
|
||||
+10
-10
@@ -149,7 +149,7 @@
|
||||
</v-card>
|
||||
<v-menu v-model="contextMenu.shown" :position-x="contextMenu.x" :position-y="contextMenu.y" absolute offset-y>
|
||||
<v-list>
|
||||
<v-list-item @click="downloadFile" :disabled="is_printing" v-if="!contextMenu.item.isDirectory">
|
||||
<v-list-item @click="clickRow(contextMenu.item)" :disabled="is_printing" v-if="!contextMenu.item.isDirectory">
|
||||
<v-icon class="mr-1">mdi-play</v-icon> Print start
|
||||
</v-list-item>
|
||||
<v-list-item @click="downloadFile" v-if="!contextMenu.item.isDirectory">
|
||||
@@ -347,7 +347,7 @@
|
||||
},
|
||||
refreshFileList: function() {
|
||||
this.$store.commit('setLoading', { name: 'loadingGcodeRefresh' });
|
||||
this.$socket.sendObj('get_directory', { path: this.currentPath }, 'getDirectory');
|
||||
this.$socket.sendObj('server.files.get_directory', { path: this.currentPath }, 'getDirectory');
|
||||
},
|
||||
formatDate(date) {
|
||||
let tmp2 = new Date(date);
|
||||
@@ -415,7 +415,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');
|
||||
@@ -427,7 +427,7 @@
|
||||
},
|
||||
renameDirectoryAction() {
|
||||
this.dialogRenameDirectory.show = false;
|
||||
this.$socket.sendObj('post_file_move', {
|
||||
this.$socket.sendObj('server.files.move', {
|
||||
source: this.currentPath+"/"+this.dialogRenameDirectory.item.filename,
|
||||
dest: this.currentPath+"/"+this.dialogRenameDirectory.newName
|
||||
}, 'getPostFileMove');
|
||||
@@ -449,11 +449,11 @@
|
||||
createDirectoryAction: function() {
|
||||
if (this.dialogCreateDirectory.name.length && this.dialogCreateDirectory.name.indexOf(" ") === -1) {
|
||||
this.dialogCreateDirectory.show = false;
|
||||
this.$socket.sendObj('post_directory', { path: this.currentPath+"/"+this.dialogCreateDirectory.name }, 'getPostDirectory');
|
||||
this.$socket.sendObj('server.files.post_directory', { path: this.currentPath+"/"+this.dialogCreateDirectory.name }, 'getPostDirectory');
|
||||
}
|
||||
},
|
||||
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');
|
||||
},
|
||||
clickRow: function(item) {
|
||||
if (!item.isDirectory) {
|
||||
@@ -468,14 +468,14 @@
|
||||
this.currentPath = this.currentPath.substr(0, this.currentPath.lastIndexOf("/"));
|
||||
},
|
||||
loadPath: function() {
|
||||
this.$socket.sendObj('get_directory', { path: this.currentPath }, 'getDirectory');
|
||||
this.$socket.sendObj('server.files.get_directory', { path: this.currentPath }, 'getDirectory');
|
||||
let dirArray = this.currentPath.split("/");
|
||||
this.files = findDirectory(this.filetree, dirArray);
|
||||
},
|
||||
startPrint(filename = "") {
|
||||
filename = (this.currentPath+"/"+filename).substring(7);
|
||||
this.dialogPrintFile.show = false;
|
||||
this.$socket.sendObj('post_printer_print_start', { filename: filename }, 'switchToDashboard');
|
||||
this.$socket.sendObj('printer.print.start', { filename: filename }, 'switchToDashboard');
|
||||
},
|
||||
dragOverUpload(e) {
|
||||
if (!this.draggingFile.status) {
|
||||
@@ -545,7 +545,7 @@
|
||||
dest = this.currentPath.substring(0, this.currentPath.lastIndexOf("/") + 1)+this.draggingFile.item.filename;
|
||||
} else dest = this.currentPath+"/"+row.filename+"/"+this.draggingFile.item.filename;
|
||||
|
||||
this.$socket.sendObj('post_file_move', {
|
||||
this.$socket.sendObj('server.files.move', {
|
||||
source: this.currentPath+"/"+this.draggingFile.item.filename,
|
||||
dest: dest
|
||||
}, 'getPostFileMove');
|
||||
@@ -591,7 +591,7 @@
|
||||
for (let i = data.pageStart; i < data.pageStop; i++) {
|
||||
if (items[i] && !items[i].isDirectory && !items[i].metadataPulled) {
|
||||
let filename = (this.currentPath+"/"+items[i].filename).substring(7);
|
||||
this.$socket.sendObj("get_file_metadata", { filename: filename }, "getMetadata");
|
||||
this.$socket.sendObj("server.files.metadata", { filename: filename }, "getMetadata");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+19
-5
@@ -242,14 +242,23 @@
|
||||
let x_count = 0;
|
||||
let y_count = 0;
|
||||
|
||||
let min = -1;
|
||||
let max = 1;
|
||||
|
||||
if (this.showMeshType === 'probed') {
|
||||
x_count = this.bed_mesh.probed_matrix[0].length;
|
||||
y_count = this.bed_mesh.probed_matrix.length;
|
||||
this.data[0].z = this.bed_mesh.probed_matrix;
|
||||
|
||||
min = Math.min.apply(null, this.bed_mesh.probed_matrix.map(function(row){ return Math.min.apply(Math, row); }));
|
||||
max = Math.max.apply(null, this.bed_mesh.probed_matrix.map(function(row){ return Math.max.apply(Math, row); }));
|
||||
} else if (this.showMeshType === 'mesh') {
|
||||
x_count = this.bed_mesh.mesh_matrix[0].length;
|
||||
y_count = this.bed_mesh.mesh_matrix.length;
|
||||
this.data[0].z = this.bed_mesh.mesh_matrix;
|
||||
|
||||
min = Math.min.apply(null, this.bed_mesh.mesh_matrix.map(function(row){ return Math.min.apply(Math, row); }));
|
||||
max = Math.max.apply(null, this.bed_mesh.mesh_matrix.map(function(row){ return Math.max.apply(Math, row); }));
|
||||
}
|
||||
|
||||
let x_step = (this.bed_mesh.mesh_max[0] - this.bed_mesh.mesh_min[0]) / (x_count - 1);
|
||||
@@ -262,6 +271,11 @@
|
||||
this.data[0].y.push(parseFloat(this.bed_mesh.mesh_min[1]) + parseFloat(y_step) * i);
|
||||
}
|
||||
|
||||
if (min > -1) min = -1;
|
||||
if (max < 1) max = 1;
|
||||
|
||||
this.layout.scene.zaxis.range = [min, max];
|
||||
|
||||
this.boolShowBedMesh = true;
|
||||
} else this.boolShowBedMesh = false;
|
||||
|
||||
@@ -277,26 +291,26 @@
|
||||
},
|
||||
loadProfile: function() {
|
||||
this.$store.commit('setLoading', { name: 'bedMeshLoad' });
|
||||
this.$socket.sendObj('post_printer_gcode_script', { script: "BED_MESH_PROFILE LOAD="+this.profile }, "responseBedMeshLoad");
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE LOAD="+this.profile }, "responseBedMeshLoad");
|
||||
},
|
||||
saveProfile: function() {
|
||||
this.saveDialog = false;
|
||||
this.$store.commit('setLoading', { name: 'bedMeshSave' });
|
||||
this.$socket.sendObj('post_printer_gcode_script', { script: "BED_MESH_PROFILE SAVE="+this.newName.toUpperCase() }, "responseBedMeshSave");
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE SAVE="+this.newName.toUpperCase() }, "responseBedMeshSave");
|
||||
},
|
||||
removeProfile: function() {
|
||||
this.removeDialog = false;
|
||||
this.$store.commit('setLoading', { name: 'bedMeshRemove' });
|
||||
this.$socket.sendObj('post_printer_gcode_script', { script: "BED_MESH_PROFILE REMOVE="+this.profile }, "responseBedMeshRemove");
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE REMOVE="+this.profile }, "responseBedMeshRemove");
|
||||
},
|
||||
clearBedMesh: function() {
|
||||
this.$store.commit('setLoading', { name: 'bedMeshClear' });
|
||||
this.$socket.sendObj('post_printer_gcode_script', { script: "BED_MESH_CLEAR" }, "responseBedMeshClear");
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_CLEAR" }, "responseBedMeshClear");
|
||||
},
|
||||
calibrateMesh: function() {
|
||||
this.calibrateDialog = false;
|
||||
this.$store.commit('setLoading', { name: 'bedMeshCalibrate' });
|
||||
this.$socket.sendObj('post_printer_gcode_script', { script: "BED_MESH_CALIBRATE" }, "responseBedMeshCalibrate");
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_CALIBRATE" }, "responseBedMeshCalibrate");
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
Current Job
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -1,21 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-row>
|
||||
<v-col class="col-sm-12 col-md-6">
|
||||
<v-col class="col-12 col-sm-6">
|
||||
<settings-config-files-panel></settings-config-files-panel>
|
||||
</v-col>
|
||||
<v-col class="col-sm-12 col-md-6">
|
||||
<v-col class="col-12 col-sm-6">
|
||||
<v-row>
|
||||
<v-col class="col-sm-12 pt-0" v-if="klippy_state === 'ready'">
|
||||
<v-col class="col-12 pt-0" v-if="klippy_state === 'ready'">
|
||||
<settings-limits-panel></settings-limits-panel>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="col-sm-12 col-md-6" v-if="klippy_state === 'ready'">
|
||||
<v-col class="col-md-6" v-if="klippy_state === 'ready'">
|
||||
<settings-endstop-panel></settings-endstop-panel>
|
||||
<settings-runout-panel></settings-runout-panel>
|
||||
</v-col>
|
||||
<v-col class="col-sm-12 col-md-6">
|
||||
<v-col :class="'col-md-6 '+(klippy_state !== 'ready' ? 'pt-0' : '')">
|
||||
<settings-system-panel></settings-system-panel>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -86,12 +86,14 @@ export default class WebSocketClient {
|
||||
}
|
||||
|
||||
sendObj (method, params, action = '') {
|
||||
let id = Math.floor(Math.random() * 10000) + 1
|
||||
this.wsData.push({
|
||||
id: id,
|
||||
action: action,
|
||||
params: params
|
||||
})
|
||||
this.instance.send(this.createMessage(method, params, id))
|
||||
if (this.instance.readyState === WebSocket.OPEN) {
|
||||
let id = Math.floor(Math.random() * 10000) + 1
|
||||
this.wsData.push({
|
||||
id: id,
|
||||
action: action,
|
||||
params: params
|
||||
})
|
||||
this.instance.send(this.createMessage(method, params, id));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import Dashboard from '../pages/Dashboard.vue'
|
||||
//import Status from '../pages/Status.vue'
|
||||
import Webcam from '../pages/Webcam.vue'
|
||||
import Console from '../pages/Console.vue'
|
||||
import Heightmap from '../pages/Heightmap.vue'
|
||||
|
||||
+16
-11
@@ -7,8 +7,8 @@ import axios from "axios";
|
||||
export default {
|
||||
socket_on_open ({ commit }) {
|
||||
commit('setConnected');
|
||||
Vue.prototype.$socket.sendObj('get_directory', { path: '/gcodes' }, 'getDirectoryRoot');
|
||||
Vue.prototype.$socket.sendObj('get_printer_info', {}, 'getKlipperInfo');
|
||||
Vue.prototype.$socket.sendObj('server.files.get_directory', { path: '/gcodes' }, 'getDirectoryRoot');
|
||||
Vue.prototype.$socket.sendObj('printer.info', {}, 'getKlipperInfo');
|
||||
},
|
||||
|
||||
socket_on_close ({ commit }, event) {
|
||||
@@ -64,9 +64,14 @@ export default {
|
||||
}
|
||||
break;
|
||||
|
||||
case 'notify_metadata_update':
|
||||
commit('setMetadata', data.params[0]);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (data.result !== "ok") {
|
||||
if (data.error && data.error.message !== "Klippy Request Timed Out") window.console.error("JSON-RPC: " + data.error.message);
|
||||
else if (!data.error) window.console.log(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -109,11 +114,11 @@ export default {
|
||||
}
|
||||
});
|
||||
|
||||
Vue.prototype.$socket.sendObj('get_printer_objects_list', {}, 'getObjectsList');
|
||||
Vue.prototype.$socket.sendObj('get_directory', { path: 'gcodes' }, 'getDirectory');
|
||||
Vue.prototype.$socket.sendObj('get_directory', { path: 'config' }, 'getDirectory');
|
||||
Vue.prototype.$socket.sendObj('get_directory', { path: 'config_examples' }, 'getDirectory');
|
||||
Vue.prototype.$socket.sendObj('get_printer_gcode_help', {}, 'getHelpList');
|
||||
Vue.prototype.$socket.sendObj('printer.objects.list', {}, 'getObjectsList');
|
||||
Vue.prototype.$socket.sendObj('server.files.get_directory', { path: 'gcodes' }, 'getDirectory');
|
||||
Vue.prototype.$socket.sendObj('server.files.get_directory', { path: 'config' }, 'getDirectory');
|
||||
Vue.prototype.$socket.sendObj('server.files.get_directory', { path: 'config_examples' }, 'getDirectory');
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.help', {}, 'getHelpList');
|
||||
},
|
||||
|
||||
getObjectsList({ commit }, data) {
|
||||
@@ -130,8 +135,8 @@ export default {
|
||||
) subscripts = {...subscripts, [key]: null }
|
||||
}
|
||||
|
||||
if (subscripts !== {}) Vue.prototype.$socket.sendObj('post_printer_objects_subscribe', { objects: subscripts }, "getPrinterData");
|
||||
Vue.prototype.$socket.sendObj("get_server_temperature_store", {}, "getHeatersHistory");
|
||||
if (subscripts !== {}) Vue.prototype.$socket.sendObj('printer.objects.subscribe', { objects: subscripts }, "getPrinterData");
|
||||
Vue.prototype.$socket.sendObj("server.temperature_store", {}, "getHeatersHistory");
|
||||
},
|
||||
|
||||
getPrinterData({ commit }, data) {
|
||||
@@ -209,11 +214,11 @@ export default {
|
||||
},
|
||||
|
||||
respondPrintPause({commit}) {
|
||||
commit('removeLoading', { name: 'statusPrintCancel' });
|
||||
commit('removeLoading', { name: 'statusPrintPause' });
|
||||
},
|
||||
|
||||
respondPrintResume({commit}) {
|
||||
commit('removeLoading', { name: 'statusPrintCancel' });
|
||||
commit('removeLoading', { name: 'statusPrintResume' });
|
||||
},
|
||||
|
||||
respondPrintCancel({commit}) {
|
||||
|
||||
@@ -126,11 +126,11 @@ export default {
|
||||
},
|
||||
|
||||
fan: state => {
|
||||
return Object.entries(state.object).indexOf('fan') ? state.printer.fan : false;
|
||||
return Object.entries(state.printer).indexOf('fan') ? state.printer.fan : false;
|
||||
},
|
||||
|
||||
is_printing: state => {
|
||||
return (state.printer.print_stats.filename !== "");
|
||||
return (['printing', 'paused'].includes(state.printer.print_stats.state));
|
||||
},
|
||||
|
||||
getMacros: state => {
|
||||
@@ -259,6 +259,8 @@ export default {
|
||||
},
|
||||
|
||||
getCurrentExtruder: state => {
|
||||
if (state.printer.configfile.config === null) return null;
|
||||
|
||||
let extruder = {
|
||||
name: "",
|
||||
status: null,
|
||||
@@ -267,8 +269,8 @@ export default {
|
||||
let extruderName = state.printer.toolhead.extruder;
|
||||
extruder.name = extruderName;
|
||||
|
||||
if (state.config[extruderName]) {
|
||||
extruder.config = state.config[extruderName];
|
||||
if (state.printer.configfile.config[extruderName]) {
|
||||
extruder.config = state.printer.configfile.config[extruderName];
|
||||
}
|
||||
|
||||
if (state.printer[extruderName]) {
|
||||
|
||||
+1
-2
@@ -15,7 +15,6 @@ export default new Vuex.Store({
|
||||
port: window.location.port,
|
||||
reconnectInterval: 3000,
|
||||
isConnected: false,
|
||||
metadataRequestDelay: 1000,
|
||||
|
||||
loadingEmergencyStop: false,
|
||||
loadingRestart: false,
|
||||
@@ -110,7 +109,7 @@ export default new Vuex.Store({
|
||||
gcode_move: {
|
||||
extrude_factor: 1,
|
||||
speed_factor: 1,
|
||||
base_zpos: 0,
|
||||
homing_origin: [0,0,0,0],
|
||||
absolute_coordinates: true,
|
||||
absolute_extrude: true,
|
||||
speed: 0,
|
||||
|
||||
@@ -268,13 +268,6 @@ export default {
|
||||
metadataPulled: false,
|
||||
});
|
||||
}
|
||||
|
||||
let extension = filename.substring(filename.lastIndexOf("."));
|
||||
if (extension.toLowerCase() === ".gcode") {
|
||||
setTimeout(function() {
|
||||
Vue.prototype.$socket.sendObj("get_file_metadata", { filename: data.item.path }, "getMetadata");
|
||||
}, state.socket.metadataRequestDelay);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -362,7 +355,7 @@ export default {
|
||||
childrens: [],
|
||||
});
|
||||
|
||||
Vue.prototype.$socket.sendObj('get_directory', { path: data.requestParams.path+'/'+dir.dirname }, 'getDirectoryRoot');
|
||||
Vue.prototype.$socket.sendObj('server.files.get_directory', { path: data.requestParams.path+'/'+dir.dirname }, 'getDirectoryRoot');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -415,6 +408,7 @@ export default {
|
||||
|
||||
setMetadataCurrentFile(state, data) {
|
||||
if (data !== undefined && data.filename !== "") {
|
||||
state.printer.current_file.thumbnails = [];
|
||||
Vue.set(state.printer, 'current_file', data);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user