Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac01dce620 | ||
|
|
d3c3113c43 | ||
|
|
ae30257ee1 | ||
|
|
b5add6f919 | ||
|
|
90b3419552 | ||
|
|
0100eaad5d | ||
|
|
825d65be9d | ||
|
|
38a0c8f441 | ||
|
|
ad6ae1128b | ||
|
|
6094c4f9bd | ||
|
|
65a4e40d39 | ||
|
|
39f3cfe824 | ||
|
|
84c9040e2a | ||
|
|
890a3e3332 | ||
|
|
16b6ed6000 | ||
|
|
d6eb97ffe1 | ||
|
|
fb10211b52 | ||
|
|
753efc5104 | ||
|
|
543af7032e | ||
|
|
0e21d865b7 | ||
|
|
601dd07f85 | ||
|
|
f06ce3e430 | ||
|
|
1f5f1749fc | ||
|
|
a40701d611 | ||
|
|
c0472dfb30 | ||
|
|
f6873bda85 | ||
|
|
bec378d2a0 | ||
|
|
f2a5d1d8ee |
No files matched your search
@@ -1,8 +1,7 @@
|
||||
# Overview
|
||||
|
||||
- [Installation](installation.md)
|
||||
- [Update from 0.1.x to latest](update-0.1.x.md)
|
||||
- [Update from 0.0.x to 0.1.x](update-0.0.x.md)
|
||||
- [Update](update.md)
|
||||
- [Macros](macros.md)
|
||||
- [Slicer upload](slicer-upload.md)
|
||||
- [Gcode thumbnails (PrusaSlicer & SuperSlicer only)](gcode-thumbnails.md)
|
||||
|
After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 617 KiB After Width: | Height: | Size: 734 KiB |
@@ -30,8 +30,8 @@ cd ~/klipper
|
||||
```
|
||||
|
||||
After you install Klipper with its dependencies you have to change the location
|
||||
of the `printer.cfg`. This is definied in the `/etc/default/klipper` file. To edit
|
||||
this file type:
|
||||
of the `printer.cfg` and add the UDS. This is definied in the `/etc/default/klipper` file.
|
||||
To edit this file type:
|
||||
```
|
||||
sudo nano /etc/default/klipper
|
||||
```
|
||||
@@ -41,7 +41,7 @@ KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/printer.cfg -l /tmp/klip
|
||||
```
|
||||
to:
|
||||
```
|
||||
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/klipper_config/printer.cfg -l /tmp/klippy.log"
|
||||
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/klipper_config/printer.cfg -l /tmp/klippy.log -a /tmp/klippy_uds"
|
||||
```
|
||||
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
|
||||
|
||||
@@ -81,8 +81,7 @@ When the script completes it should start both Moonraker and Klipper. In
|
||||
`Moonraker: server connection detected`
|
||||
|
||||
### Configure Moonraker
|
||||
All other configuration is sent to the server via Klippy, thus it is done
|
||||
in printer.cfg. A basic configuration that authorizes clients on a range
|
||||
A basic configuration that authorizes clients on a range
|
||||
from 192.168.1.1 - 192.168.1.254 is as follows.
|
||||
|
||||
Create the configfile with `nano ~/moonraker.conf` and add the following lines:
|
||||
@@ -97,10 +96,9 @@ trusted_clients:
|
||||
192.168.1.0/24
|
||||
```
|
||||
|
||||
Restart klipper (sudo service klipper restart`) and check your klippy.log if klipper is starting correct again.
|
||||
|
||||
When klipper is running, open the url `http://<printer-ip>:7125/printer/info` in your browser. If you see a content like this
|
||||
Restart Moonraker (`sudo service moonraker restart`) and open the url `http://<printer-ip>:7125/printer/info` in your browser.
|
||||
|
||||
If you see a content like this
|
||||
```
|
||||
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-643-g528f9f25", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
|
||||
```
|
||||
@@ -243,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.1.3/mainsail-beta-0.1.3.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.1/mainsail-beta-0.2.1.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
Now it should be possible to open the interface: `http://<printer-ip>/`.
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
# Update from 0.0.x to 0.1.x
|
||||
Between 0.0.x and 0.1.x was a big rebuild of Moonraker. Thats the reason for the separate guide.
|
||||
|
||||
## Change Klipper branch
|
||||
```
|
||||
cd ~/klipper
|
||||
git fetch arksine
|
||||
git checkout arksine/dev-moonraker-testing
|
||||
```
|
||||
|
||||
## Install new Moonraker branch
|
||||
```
|
||||
cd ~
|
||||
git clone https://github.com/Arksine/moonraker.git
|
||||
```
|
||||
|
||||
we have to remove the old moonraker service and install the new version:
|
||||
```
|
||||
cd ~/moonraker/scripts
|
||||
./uninstall-moonraker.sh
|
||||
./install-moonraker.sh
|
||||
```
|
||||
|
||||
Finally, we have to change the `printer.cfg`. The section `\[api_server\]` is now called `\[moonraker\]`.
|
||||
|
||||
## Update the nginx configuration
|
||||
|
||||
The nginx configuration (`/etc/nginx/sites-available/mainsail`) will need the following additional section:
|
||||
```
|
||||
location /server {
|
||||
proxy_pass http://apiserver/server;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
}
|
||||
```
|
||||
|
||||
Restart nginx with `sudo service nginx restart`
|
||||
|
||||
## Update static files from Mainsail
|
||||
|
||||
```
|
||||
rm -R ~/mainsail/*
|
||||
cd ~/mainsail
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.1.2/mainsail-beta-0.1.2.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
@@ -1,58 +0,0 @@
|
||||
# Update from 0.1.x to latest
|
||||
Updates after 0.1.x are easier than 0.0.x to 0.1.x.
|
||||
|
||||
## Update Moonraker
|
||||
```
|
||||
cd ~/moonraker
|
||||
git pull
|
||||
sudo service moonraker restart
|
||||
```
|
||||
|
||||
create a new file ~/moonraker.conf
|
||||
```
|
||||
[server]
|
||||
host: 0.0.0.0
|
||||
config_path: ~/klipper_config
|
||||
|
||||
[authorization]
|
||||
enabled: true
|
||||
trusted_clients:
|
||||
192.168.0.0/24
|
||||
```
|
||||
|
||||
## Update Klipper
|
||||
```
|
||||
cd ~/klipper
|
||||
git fetch
|
||||
git checkout origin/master
|
||||
```
|
||||
|
||||
### Move klipper config files to the subdirectory
|
||||
create the new subdirectory and move `printer.cfg` in `~/klipper_config`:
|
||||
```
|
||||
mkdir ~/klipper_config/
|
||||
mv ~/printer.cfg ~/klipper_config/
|
||||
```
|
||||
move also included klipper config files to this directory.
|
||||
|
||||
### Change Klipper default printer.cfg location
|
||||
edit file `/etc/default/klipper` and change `/home/pi/printer.cfg`to `/home/pi/klipper_config/printer.cfg`.
|
||||
|
||||
### Modify printer.cfg
|
||||
now you have to remove the `[moonraker]` section from `~/klipper_config/printer.cfg` and check if there are the following sections in it:
|
||||
```
|
||||
[virtual_sdcard]
|
||||
path: ~/sdcard
|
||||
|
||||
[pause_resume]
|
||||
[display_status]
|
||||
```
|
||||
|
||||
and rename `RESET_SD` in your cancel print macro to `SDCARD_RESET_FILE`.
|
||||
|
||||
## Update static files from Mainsail
|
||||
```
|
||||
rm -R ~/mainsail/*
|
||||
cd ~/mainsail
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.1.2/mainsail-beta-0.1.2.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
@@ -0,0 +1,41 @@
|
||||
# Update Mainsail
|
||||
|
||||
## Update Klipper
|
||||
```
|
||||
cd ~/klipper
|
||||
git fetch
|
||||
git checkout origin/master
|
||||
```
|
||||
|
||||
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"
|
||||
```
|
||||
If you have to change the location of `printer.cfg` in `/etc/default/klipper`
|
||||
please create the directory `~/klipper_config` and move your config files in this directory.
|
||||
|
||||
Restart Klipper (`sudo service klipper restart`) and check the `klippy.log`, if Klipper starts
|
||||
correctly and then continue the guide.
|
||||
|
||||
## Update Moonraker (API)
|
||||
```
|
||||
cd ~/moonraker
|
||||
git fetch
|
||||
git checkout origin/master
|
||||
```
|
||||
|
||||
Restart Moonraker (`sudo service moonraker restart`) and open the url `http://<printer-ip>:7125/printer/info` in your browser.
|
||||
|
||||
If you see a content like this
|
||||
```
|
||||
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-643-g528f9f25", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
|
||||
```
|
||||
|
||||
## Update Mainsail (webinterface)
|
||||
```
|
||||
cd ~/mainsail
|
||||
rm -R ./*
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.1/mainsail-beta-0.2.1.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
Now it should be possible to open the interface: `http://<printer-ip>/`.
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"socket": {
|
||||
"hostname": "kossel.local",
|
||||
"port": 80
|
||||
"hostname": "voron250.local",
|
||||
"port": 80,
|
||||
"metadataRequestDelay": 2000
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@@ -28,7 +28,7 @@
|
||||
(
|
||||
category.title !== 'Webcam' &&
|
||||
category.title !== 'Heightmap' &&
|
||||
(is_ready || category.alwaysShow)
|
||||
(klippy_state !== 'error' || category.alwaysShow)
|
||||
)
|
||||
">
|
||||
<v-icon>mdi-{{ category.icon }}</v-icon>
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
<ul class="child">
|
||||
<li v-for="(page, pageIndex) in category.children" class="nav-item" v-bind:key="`${index}-${pageIndex}`">
|
||||
<router-link :to="page.path" class="nav-link" @click.prevent v-if="is_ready || page.alwaysShow">
|
||||
<router-link :to="page.path" class="nav-link" @click.prevent v-if="klippy_state !== 'error' || page.alwaysShow">
|
||||
<v-icon>mdi-{{ page.icon }}</v-icon>
|
||||
<span class="nav-title">{{ page.title }}</span>
|
||||
</router-link>
|
||||
@@ -76,8 +76,9 @@
|
||||
</v-dialog>
|
||||
|
||||
<v-footer app class="d-block">
|
||||
<span v-if="version">{{ version }}</span>
|
||||
<span class="float-right">Made with <img src="/img/heard.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>
|
||||
<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>
|
||||
</v-app>
|
||||
</template>
|
||||
@@ -113,16 +114,15 @@ export default {
|
||||
toolhead: state => state.printer.toolhead,
|
||||
hostname: state => state.printer.hostname,
|
||||
printername: state => state.gui.general.printername,
|
||||
version: state => state.printer.version,
|
||||
version: state => state.printer.software_version,
|
||||
loadingEmergencyStop: state => state.socket.loadingEmergencyStop,
|
||||
isConnected: state => state.socket.isConnected,
|
||||
isConnecting: state => !state.socket.isConnected,
|
||||
virtual_sdcard: state => state.printer.virtual_sdcard,
|
||||
current_file: state => state.printer.print_stats.filename,
|
||||
boolNaviWebcam: state => state.gui.webcam.bool,
|
||||
klippy_state: state => state.socket.klippy_state,
|
||||
is_ready: state => state.socket.is_ready,
|
||||
config: state => state.config,
|
||||
klippy_state: state => state.printer.webhooks.state,
|
||||
config: state => state.printer.configfile.config,
|
||||
}),
|
||||
...mapGetters([
|
||||
'getTitle'
|
||||
@@ -135,8 +135,7 @@ export default {
|
||||
},
|
||||
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: {
|
||||
|
||||
@@ -1,21 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="_x30_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 165 190.5" style="enable-background:new 0 0 165 190.5;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#E41313;}
|
||||
.st1{fill:#FFFFFF;}
|
||||
</style>
|
||||
<g id="LWPOLYLINE">
|
||||
<polygon class="st0" points="82.5,0 0,47.6 0,142.9 82.5,190.5 165,142.9 165,47.6 "/>
|
||||
</g>
|
||||
<g id="LWPOLYLINE_1_">
|
||||
<polygon class="st1" points="58.2,43.5 83.1,43.5 49.1,95.3 24.2,95.3 "/>
|
||||
</g>
|
||||
<g id="LWPOLYLINE_2_">
|
||||
<polygon class="st1" points="36,147 104.1,43.5 129,43.5 60.9,147 "/>
|
||||
</g>
|
||||
<g id="LWPOLYLINE_3_">
|
||||
<polygon class="st1" points="106.8,147 81.9,147 115.9,95.3 140.8,95.3 "/>
|
||||
</g>
|
||||
</svg>
|
||||
<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 385.66987 338.2562"><defs><style>.cls-1{fill:#e73d26;}</style></defs><title>logo</title><path class="cls-1" d="M222.75337,1.14007a21.79586,21.79586,0,0,0-2.34182,3.45951,17.14349,17.14349,0,0,1-2.12893,3.24662,18.41685,18.41685,0,0,0-2.12893,3.19339,16.64854,16.64854,0,0,1-1.916,2.87406,22.23421,22.23421,0,0,0-1.86282,2.76761,22.02646,22.02646,0,0,1-3.14017,4.5772,9.49513,9.49513,0,0,0-1.33058,2.02248,96.35724,96.35724,0,0,1-5.80133,8.83506,14.37578,14.37578,0,0,0-1.33058,2.12893,21.43049,21.43049,0,0,1-1.33058,2.12893c-.37257.31934-6.54646,9.527-6.97225,10.37854a60.28212,60.28212,0,0,1-3.99175,5.90778,21.40279,21.40279,0,0,0-1.5967,2.5015c-.58546,1.06446-1.22413,1.96926-1.437,1.96926-.26612,0-.42578.37256-.42578.79834s-.21289.79835-.53223.79835a.52508.52508,0,0,0-.53224.479c0,.37256-9.42052,14.84929-10.11242,15.488a18.32335,18.32335,0,0,0-2.0757,3.45951,5.16638,5.16638,0,0,1-1.33058,1.80959,2.22269,2.22269,0,0,0-.85158,1.22414,4.16658,4.16658,0,0,1-1.06446,1.59669,4.0175,4.0175,0,0,0-1.06447,1.86282c0,.37256-.21289.6919-.42578.6919-.479,0-2.12893,2.66117-2.12893,3.40629a1.00188,1.00188,0,0,1-.53223.79835c-.74512.479-4.36431,5.80133-4.36431,6.44a.48353.48353,0,0,1-.42578.53224c-.21289,0-.85158.90479-1.437,1.96926a21.40243,21.40243,0,0,1-1.5967,2.50149,29.11642,29.11642,0,0,0-2.34182,3.45951,31.44916,31.44916,0,0,1-2.34182,3.51274c-.53223.58546-2.92727,4.15141-5.42877,8.19638-2.23539,3.566-6.97225,10.485-7.2916,10.59142a.42.42,0,0,0-.10645.6919c.15966.26611.05323.479-.15966.479-.26612,0-.90481.85158-1.437,1.86282-.58546,1.01124-1.22413,1.86281-1.49024,1.86281s-.37257.21289-.15967.479a.68189.68189,0,0,1-.21289.85157c-.74512.42578-3.77885,5.003-3.77885,5.64167a.477.477,0,0,1-.479.479c-.26611,0-.6919.479-.85157,1.06446a4.75513,4.75513,0,0,1-.958,1.70315,35.78571,35.78571,0,0,0-2.50149,3.61918c-1.01124,1.5967-1.96926,3.03373-2.12893,3.1934s-1.1177,1.59669-2.12894,3.19339a19.02787,19.02787,0,0,1-2.23537,3.08694,1.00027,1.00027,0,0,0-.42579.90481,1.00025,1.00025,0,0,1-.42579.9048,16.6409,16.6409,0,0,0-2.23537,3.08694c-1.01124,1.5967-2.02249,3.14017-2.2886,3.45951-.21289.26612-2.12893,3.1934-4.25786,6.44-8.03672,12.3478-8.99473,13.78482-9.47375,13.9445a.82011.82011,0,0,0-.479.6919c0,.58546-4.63042,7.71737-5.961,9.20761a3.62456,3.62456,0,0,0-.958,1.75636A1.20128,1.20128,0,0,1,93.208,196.363c-.42579.21289-.69191.53224-.53224.74513.10645.21289-.21289.79834-.79835,1.33058a3.07335,3.07335,0,0,0-1.06446,1.70315.65437.65437,0,0,1-.58546.69189.29353.29353,0,0,0-.26612.479.44816.44816,0,0,1-.10644.6919c-.26612.05322-2.60794,3.40628-5.21588,7.3448s-4.89654,7.29159-5.10944,7.3448a.76717.76717,0,0,0-.42579.6919,14.78244,14.78244,0,0,1-1.86281,3.14017,13.43644,13.43644,0,0,0-1.86281,3.19339.52569.52569,0,0,1-.42579.53224c-.26612,0-.79835.63868-1.22414,1.437A11.09249,11.09249,0,0,1,72.717,227.4453c-.15967.15966-1.27735,1.80959-2.55472,3.72563-1.22413,1.916-2.60793,3.93852-2.9805,4.524-2.395,3.35306-4.5772,6.81257-4.5772,7.23835a.49145.49145,0,0,1-.53223.479c-.26612,0-.53224.37257-.53224.79835s-.21289.79835-.53223.79835c-.26611,0-.53223.37257-.53223.79835s-.2129.79835-.53223.79835c-.26612,0-.53224.31932-.53224.74513a1.154,1.154,0,0,1-.37256.958,11.52107,11.52107,0,0,0-2.82083,4.1514.53335.53335,0,0,1-.53223.53224c-.26612,0-.53224.37257-.53224.79835s-.21289.79834-.53223.79834a.57236.57236,0,0,0-.53223.53224c0,.58544-1.80959,3.35306-3.03373,4.68364a2.55908,2.55908,0,0,0-.6919,1.49024c0,.42578-.21289.74514-.42579.74514-.26611,0-.90479.85156-1.49025,1.86281-.53223,1.01126-1.17091,1.86282-1.38381,1.86282a.43471.43471,0,0,0-.42578.479,42.71364,42.71364,0,0,1-3.45951,5.64165,39.24326,39.24326,0,0,0-3.45952,5.64166.46923.46923,0,0,1-.42578.479c-.26612,0-.79835.63868-1.22414,1.437a7.47774,7.47774,0,0,1-1.06447,1.75636,33.19489,33.19489,0,0,0-3.6724,5.90777.49146.49146,0,0,1-.53223.479c-.26612,0-.85158.85155-1.27736,1.86281s-1.06447,1.86281-1.38381,1.86281-.479.21291-.31934.42578c.15968.26612-.37256,1.11768-1.17091,1.96927s-1.3838,1.64991-1.27736,1.70315a32.7331,32.7331,0,0,1-3.087,4.94976c-.31933.31932-3.35306,4.8433-3.72562,5.58844-.74513,1.54349-14.10417,21.2893-14.47673,21.449a.87955.87955,0,0,0-.42579.69189,36.48,36.48,0,0,1-2.92728,4.7901c-1.64992,2.395-2.874,4.47076-2.71438,4.57718.26611.26612,77.28017.90481,84.73143.74514.74512-.05321,1.3838-.58544,1.80958-1.64991.37257-.9048.85158-1.59669,1.1177-1.59669a.52508.52508,0,0,0,.479-.53224,11.5211,11.5211,0,0,1,2.82084-4.1514.99732.99732,0,0,0,.37256-.85156c0-.58545.479-1.27737,2.60793-3.83208.26612-.37257.37256-.79835.21289-.958-.21289-.15966-.05322-.31932.26612-.31932a.72768.72768,0,0,0,.63868-.79835,1.70485,1.70485,0,0,1,.85157-1.22413c.479-.26612.85158-.6919.85158-.958a27.78833,27.78833,0,0,1,3.087-5.003,15.99793,15.99793,0,0,0,1.27735-2.12893,21.42328,21.42328,0,0,1,1.33059-2.12893,25.061,25.061,0,0,0,2.71438-3.93854,62.00982,62.00982,0,0,1,3.45952-5.32232,37.11582,37.11582,0,0,0,3.45951-5.58845.Line truncated
|
||||
|
Before Width: | Height: | Size: 851 B After Width: | Height: | Size: 17 KiB |
@@ -12,15 +12,26 @@ export default {
|
||||
props: ['chartData'],
|
||||
data() {
|
||||
return {
|
||||
timer: '',
|
||||
options: {
|
||||
events: ['onHover'],
|
||||
animation: {
|
||||
duration: 0 // general animation time
|
||||
},
|
||||
hover: {
|
||||
animationDuration: 0 // duration of animations when hovering an item
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
tension: 0 // disable bezier curves
|
||||
tension: 0.4, // disable bezier curves
|
||||
borderDash: undefined,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
hoverRadius: 0,
|
||||
}
|
||||
},
|
||||
showLines: true,
|
||||
legend: {
|
||||
labels: {
|
||||
fontColor: 'rgb(203, 203, 203)',
|
||||
@@ -49,16 +60,19 @@ export default {
|
||||
},
|
||||
tooltips: {
|
||||
enabled: true,
|
||||
mode: 'nearest',
|
||||
caretPadding: 20,
|
||||
intersect: false,
|
||||
callbacks: {
|
||||
title: function (tooltipItem) {
|
||||
let date = new Date(tooltipItem[0].label);
|
||||
return date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
|
||||
return date.getHours()+":"+(date.getMinutes() < 10 ? "0" : "")+date.getMinutes()+":"+(date.getSeconds() < 10 ? "0" : "")+date.getSeconds();
|
||||
},
|
||||
label: function (tooltipItem, data) {
|
||||
let label_target = data['datasets'][tooltipItem.datasetIndex].label+"_target";
|
||||
label: function (tooltipItem/*, data*/) {
|
||||
/*let label_target = data['datasets'][tooltipItem.datasetIndex].label+"_target";
|
||||
let target_dataset = data['datasets'].find(dataset => dataset.label === label_target);
|
||||
|
||||
if (target_dataset !== undefined) return tooltipItem.value+" / "+target_dataset.data[tooltipItem.index];
|
||||
if (target_dataset !== undefined && target_dataset.data[tooltipItem.index] !== undefined) return tooltipItem.value+" / "+target_dataset.data[tooltipItem.index].y;*/
|
||||
return tooltipItem.value;
|
||||
},
|
||||
}
|
||||
@@ -67,33 +81,27 @@ export default {
|
||||
responsive: true,
|
||||
responsiveAnimationDuration: 0, // animation duration after a resize
|
||||
scales: {
|
||||
xAxes: [
|
||||
{
|
||||
gridLines: {
|
||||
color: 'rgba(0,0,0,0.2)',
|
||||
display: true
|
||||
xAxes: [{
|
||||
type: 'time',
|
||||
time: {
|
||||
unit: 'minute',
|
||||
displayFormats: {
|
||||
second: 'HH:mm:ss',
|
||||
minute: 'HH:mm'
|
||||
}
|
||||
},
|
||||
ticks: {
|
||||
minor: {
|
||||
fontColor: 'rgb(203, 203, 203)',
|
||||
fontFamily: 'Roboto,sans-serif'
|
||||
},
|
||||
ticks: {
|
||||
minor: {
|
||||
fontColor: 'rgb(203, 203, 203)',
|
||||
fontFamily: 'Roboto,sans-serif'
|
||||
},
|
||||
major: {
|
||||
fontColor: 'rgb(203, 203, 203)',
|
||||
fontFamily: 'Roboto,sans-serif'
|
||||
},
|
||||
min: new Date() - maxSampleTime,
|
||||
max: new Date()
|
||||
},
|
||||
time: {
|
||||
unit: 'minute',
|
||||
displayFormats: {
|
||||
minute: 'HH:mm'
|
||||
}
|
||||
},
|
||||
type: 'time',
|
||||
}
|
||||
],
|
||||
min: new Date() - maxSampleTime,
|
||||
max: new Date(),
|
||||
},
|
||||
gridLines: {
|
||||
color: 'rgba(203,203,203,0.1)',
|
||||
},
|
||||
}],
|
||||
yAxes: [
|
||||
{
|
||||
gridLines: {
|
||||
@@ -120,8 +128,11 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.timer = setInterval(this.update, 500);
|
||||
},
|
||||
mounted () {
|
||||
this.renderChart(this.chartData, this.options)
|
||||
this.renderChart(this.chartData, this.options);
|
||||
},
|
||||
methods: {
|
||||
update() {
|
||||
@@ -131,9 +142,4 @@ export default {
|
||||
this.$data._chart.update();
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
chartData () {
|
||||
this.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,14 +4,14 @@
|
||||
|
||||
<template>
|
||||
<v-card>
|
||||
<v-row class="" v-if="['standby', 'complete'].includes(printer_state)">
|
||||
<v-row class="" v-if="['standby', 'complete', 'error'].includes(printer_state)">
|
||||
<v-col class="col-12 pb-0 text-center">
|
||||
<div class="d-inline-block mx-2 my-1"><v-btn @click="doHome" :loading="loadingHomeAll" :color="homedAxes.includes('xyz') ? 'primary' : 'warning'" class=""><v-icon class="mr-1">mdi-home</v-icon><span class="d-none d-sm-inline">Home </span>all</v-btn></div>
|
||||
<div class="d-inline-block mx-2 my-1" v-if="config.hasOwnProperty('quad_gantry_level')"><v-btn @click="doQGL" :loading="loadingQGL" color="primary">QGL</v-btn></div>
|
||||
<div class="d-inline-block mx-2 my-1" v-if="config.hasOwnProperty('z_tilt')"><v-btn @click="doZtilt" :loading="loadingZTilt" color="primary">Z Tilt</v-btn></div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="mt-3" v-if="['standby', 'complete'].includes(printer_state)">
|
||||
<v-row class="mt-3" v-if="['standby', 'complete', 'error'].includes(printer_state)">
|
||||
<v-col class="col-12 py-0 px-6 text-center">
|
||||
<v-btn-toggle borderless no-gutters style="flex-wrap: nowrap; width: 100%;" >
|
||||
<v-btn @click="doSendMove('X-100')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><v-icon left class="d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">X-100</span></v-btn>
|
||||
@@ -24,7 +24,7 @@
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="mt-3" v-if="['standby', 'complete'].includes(printer_state)">
|
||||
<v-row class="mt-3" v-if="['standby', 'complete', 'error'].includes(printer_state)">
|
||||
<v-col class="col-12 py-0 px-6 text-center">
|
||||
<v-btn-toggle borderless no-gutters style="flex-wrap: nowrap; width: 100%;" >
|
||||
<v-btn @click="doSendMove('Y-100')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Y-100</span></v-btn>
|
||||
@@ -37,7 +37,7 @@
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="mt-3" v-if="['standby', 'complete'].includes(printer_state)">
|
||||
<v-row class="mt-3" v-if="['standby', 'complete', 'error'].includes(printer_state)">
|
||||
<v-col class="col-12 py-0 px-6 text-center">
|
||||
<v-btn-toggle borderless no-gutters style="flex-wrap: nowrap; width: 100%;" >
|
||||
<v-btn @click="doSendMove('Z-25')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Z-25</span></v-btn>
|
||||
@@ -81,7 +81,7 @@
|
||||
computed: {
|
||||
...mapState({
|
||||
homedAxes: state => state.printer.toolhead.homed_axes,
|
||||
config: state => state.config,
|
||||
config: state => state.printer.configfile.config,
|
||||
loadings: state => state.loadings,
|
||||
printer_state: state => state.printer.print_stats.state
|
||||
}),
|
||||
|
||||
@@ -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) {
|
||||
@@ -93,6 +89,12 @@
|
||||
this.loadingRetract = loadings.includes('extruderRetract');
|
||||
this.loadingDetract = loadings.includes('extruderDetract');
|
||||
},
|
||||
config: {
|
||||
handler() {
|
||||
this.extruder = this.getCurrentExtruder;
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -2,17 +2,17 @@
|
||||
<v-card>
|
||||
<v-list-item>
|
||||
<v-list-item-avatar color="grey">
|
||||
<v-icon dark v-if="error_detected">mdi-alert-circle</v-icon>
|
||||
<v-icon dark v-if="!error_detected">mdi-information-variant</v-icon>
|
||||
<v-icon dark>mdi-alert-circle</v-icon>
|
||||
</v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">Klippy-Status</v-list-item-title>
|
||||
<v-list-item-title class="subtitle-1">{{ state }}</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</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-flex col class="text-left"><pre>{{ klippy_message }}</pre></v-flex>
|
||||
<v-flex col class="text-left"><pre>{{ state_message }}</pre></v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-divider class="my-2" ></v-divider>
|
||||
@@ -29,8 +29,8 @@
|
||||
export default {
|
||||
computed: {
|
||||
...mapState({
|
||||
error_detected: state => state.socket.error_detected,
|
||||
klippy_message: state => state.socket.klippy_message,
|
||||
state: state => state.printer.webhooks.state,
|
||||
state_message: state => state.printer.webhooks.state_message,
|
||||
loadingRestart: state => state.socket.loadingRestart,
|
||||
loadingRestartFirmware: state => state.socket.loadingRestartFirmware,
|
||||
}),
|
||||
|
||||
@@ -17,18 +17,18 @@
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<v-card v-if="bool_fan">
|
||||
<v-card v-if="fan">
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon :class="fan_speed > 0 ? 'mdi mdi-fan icon-rotate' : 'mdi mdi-fan'" left></v-icon>Tool Fan</span>
|
||||
<span class="subheading"><v-icon :class="fan.speed > 0 ? 'mdi mdi-fan icon-rotate' : 'mdi mdi-fan'" left></v-icon>Tool Fan</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
|
||||
<v-card-text class="pb-0">
|
||||
<tool-slider :target="fan_speed" :multi="100" command="M106" attribute-name="S" :attribute-scale="2.55" ></tool-slider>
|
||||
<tool-slider :target="fan.speed" :multi="100" command="M106" attribute-name="S" :attribute-scale="2.55" ></tool-slider>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-card class="mt-6" v-if="is_printing">
|
||||
<v-card class="mt-6" v-if="['printing', 'paused'].includes(printer_state)">
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon class="mdi mdi-timer" left></v-icon>Speed Factor</span>
|
||||
@@ -39,7 +39,7 @@
|
||||
<tool-slider :target="speed_factor" :max="200" :multi="100" command="M220" attribute-name="S" ></tool-slider>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-card class="mt-6" v-if="is_printing">
|
||||
<v-card class="mt-6" v-if="['printing', 'paused'].includes(printer_state)">
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon class="mdi mdi-texture" left></v-icon>Extrusion Factor</span>
|
||||
@@ -68,12 +68,12 @@
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
fan_speed: state => state.printer.fan.speed,
|
||||
extrude_factor: state => state.printer.gcode.extrude_factor,
|
||||
speed_factor: state => state.printer.gcode.speed_factor,
|
||||
extrude_factor: state => state.printer.gcode_move.extrude_factor,
|
||||
speed_factor: state => state.printer.gcode_move.speed_factor,
|
||||
printer_state: state => state.printer.print_stats.state,
|
||||
}),
|
||||
...mapGetters([
|
||||
'bool_fan',
|
||||
'fan',
|
||||
'is_printing'
|
||||
])
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<style>
|
||||
.settings_dashboard_switch .v-messages {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-card>
|
||||
@@ -8,20 +13,20 @@
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-card-text class="px-0 pb-0 pt-3 content">
|
||||
<v-card-text class="px-0 pt-3 content">
|
||||
<v-row>
|
||||
<v-col class="px-10 py-0">
|
||||
<v-switch v-model="boolShowWebcamOnDashboard" label="Webcam"></v-switch>
|
||||
<v-switch v-model="boolShowWebcamOnDashboard" label="Webcam" class="settings_dashboard_switch mt-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="px-10 py-0">
|
||||
<v-switch v-model="boolShowTempchartOnDashboard" label="Tempchart"></v-switch>
|
||||
<v-switch v-model="boolShowTempchartOnDashboard" label="Tempchart" class="settings_dashboard_switch mt-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="px-10 py-0">
|
||||
<v-switch v-model="boolShowConsoleOnDashboard" label="Console"></v-switch>
|
||||
<v-switch v-model="boolShowConsoleOnDashboard" label="Console" class="settings_dashboard_switch mt-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
<v-card-text class="px-0 pt-0 pb-2 content">
|
||||
<v-row class="px-6" >
|
||||
<v-col sm-12>
|
||||
<toolSlider label="VELOCITY" v-bind:target="max_velocity" :max="200" :extender-steps="100" command="SET_VELOCITY_LIMIT" attribute-name="VELOCITY=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="ACCEL" v-bind:target="max_accel" :max="5000" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="DECEL" v-bind:target="max_accel_to_decel" :max="5000" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL_TO_DECEL=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="SCV" v-bind:target="square_corner_velocity" :max="10" :extender-steps="5" command="SET_VELOCITY_LIMIT" attribute-name="SQUARE_CORNER_VELOCITY=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="VELOCITY" v-bind:target="max_velocity" :max="200" :extender="true" :extender-steps="100" command="SET_VELOCITY_LIMIT" attribute-name="VELOCITY=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="ACCEL" v-bind:target="max_accel" :max="5000" :extender="true" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="DECEL" v-bind:target="max_accel_to_decel" :max="5000" :extender="true" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL_TO_DECEL=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="SCV" v-bind:target="square_corner_velocity" :max="10" :extender="true" :extender-steps="5" command="SET_VELOCITY_LIMIT" attribute-name="SQUARE_CORNER_VELOCITY=" class="mt-5" ></toolSlider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
|
||||
@@ -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>
|
||||
@@ -47,10 +47,22 @@
|
||||
methods: {
|
||||
doRestart() {
|
||||
this.$store.commit('setLoadingRestart', true);
|
||||
this.$store.commit('setPrinterData', {
|
||||
webhooks: {
|
||||
state: 'shutdown',
|
||||
state_message: 'RESTART'
|
||||
}
|
||||
});
|
||||
this.$socket.sendObj('post_printer_restart', { }, "responseRestart");
|
||||
},
|
||||
doRestartFirmware() {
|
||||
this.$store.commit('setLoadingRestartFirmware', true);
|
||||
this.$store.commit('setPrinterData', {
|
||||
webhooks: {
|
||||
state: 'shutdown',
|
||||
state_message: 'FIRMWARE RESTART'
|
||||
}
|
||||
});
|
||||
this.$socket.sendObj('post_printer_firmware_restart', { }, "responseRestartFirmware");
|
||||
},
|
||||
doRebootHost() {
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
.vertical_align_center {
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
.statusPanel-image-preview {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
@@ -10,104 +14,131 @@
|
||||
<v-list-item-avatar color="grey"><v-icon dark>mdi-information-variant</v-icon></v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">Status</v-list-item-title>
|
||||
<v-list-item-subtitle class="mr-3">{{ printer_state !== "" ? printer_state.charAt(0).toUpperCase() + printer_state.slice(1) : "Unknown" }}{{ ['printing', 'paused', 'complete'].includes(printer_state) ? " - "+current_file : "" }}</v-list-item-subtitle>
|
||||
<v-list-item-subtitle class="mr-3">{{ printer_state !== "" ? printer_state.charAt(0).toUpperCase() + printer_state.slice(1) : "Unknown" }}{{ ['printing', 'paused', 'complete', 'error'].includes(printer_state) ? " - "+current_file : "" }}</v-list-item-subtitle>
|
||||
</v-list-item-content>
|
||||
<v-btn class="orange" v-if="printer_state === 'printing'" @click="btnPauseJob" :loading="btnStatusPause">pause job</v-btn>
|
||||
<v-btn class="red" v-if="(printer_state === 'paused')" :loading="btnStatusCancel" @click="btnCancelJob">cancel job</v-btn>
|
||||
<v-btn class="orange ml-2" v-if="(printer_state === 'paused')" :loading="btnStatusResume" @click="btnResumeJob">resume job</v-btn>
|
||||
<v-btn class="orange" v-if="printer_state === 'printing'" @click="btnPauseJob" :loading="loadingStatusPause">pause job</v-btn>
|
||||
<v-btn class="red" v-if="(printer_state === 'paused')" :loading="loadingStatusCancel" @click="btnCancelJob">cancel job</v-btn>
|
||||
<v-btn class="orange ml-2" v-if="(printer_state === 'paused')" :loading="loadingStatusResume" @click="btnResumeJob">resume job</v-btn>
|
||||
<v-btn class="orange ml-2" v-if="(printer_state === 'error')" :loading="loadingStatusClear" @click="btnClearJob">clear job</v-btn>
|
||||
<v-btn class="primary ml-2" v-if="(printer_state === 'complete')" :loading="loadingStatusReprint" @click="btnReprintJob">reprint job</v-btn>
|
||||
</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', 'compleded'].includes(printer_state)"></v-divider>
|
||||
<v-layout wrap class=" text-center" v-if="['printing', 'paused', 'compleded'].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'].includes(printer_state)"></v-divider>
|
||||
<v-layout wrap class=" text-center" v-if="['printing', 'paused'].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'].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>
|
||||
@@ -116,13 +147,20 @@
|
||||
import { mapState, mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
data: function() {
|
||||
return {
|
||||
loadingStatusCancel: false,
|
||||
loadingStatusResume: false,
|
||||
loadingStatusPause: false,
|
||||
loadingStatusClear: false,
|
||||
loadingStatusReprint: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
toolhead: state => state.printer.toolhead,
|
||||
position: state => state.printer.toolhead.position,
|
||||
btnStatusPause: state => state.socket.loadingPrintPause,
|
||||
btnStatusResume: state => state.socket.loadingPrintResume,
|
||||
btnStatusCancel: state => state.socket.loadingPrintCancel,
|
||||
loadings: state => state.loadings,
|
||||
|
||||
estimated_print_time: state => state.printer.toolhead.estimated_print_time,
|
||||
|
||||
@@ -134,6 +172,8 @@
|
||||
filament_used: state => state.printer.print_stats.filament_used,
|
||||
current_file: state => state.printer.print_stats.filename,
|
||||
printer_state: state => state.printer.print_stats.state,
|
||||
klippy_state: state => state.printer.webhooks.state,
|
||||
klippy_state_message: state => state.printer.webhooks.state_message,
|
||||
|
||||
display_message: state => state.printer.display_status.message,
|
||||
}),
|
||||
@@ -143,21 +183,28 @@
|
||||
'current_file_metadata',
|
||||
'current_file_estimated_time',
|
||||
'current_file_filament_total',
|
||||
'is_printing',
|
||||
]),
|
||||
},
|
||||
methods: {
|
||||
btnPauseJob() {
|
||||
this.$store.commit('setLoadingPrintPause', true);
|
||||
this.$socket.sendObj('post_printer_print_pause', { }, 'setLoadingPrintPause');
|
||||
this.$store.commit('setLoading', { name: 'statusPrintPause' });
|
||||
this.$socket.sendObj('post_printer_print_pause', { }, 'respondPrintPause');
|
||||
},
|
||||
btnResumeJob() {
|
||||
this.$store.commit('setLoadingPrintResume', true);
|
||||
this.$socket.sendObj('post_printer_print_resume', { }, 'setLoadingPrintResume');
|
||||
this.$store.commit('setLoading', { name: 'statusPrintResume' });
|
||||
this.$socket.sendObj('post_printer_print_resume', { }, 'respondPrintResume');
|
||||
},
|
||||
btnCancelJob() {
|
||||
this.$store.commit('setLoadingPrintCancel', true);
|
||||
this.$socket.sendObj('post_printer_print_cancel', { }, 'setLoadingPrintCancel');
|
||||
this.$store.commit('setLoading', { name: 'statusPrintCancel' });
|
||||
this.$socket.sendObj('post_printer_print_cancel', { }, 'respondPrintCancel');
|
||||
},
|
||||
btnClearJob() {
|
||||
this.$store.commit('setLoading', {name: 'statusPrintClear'});
|
||||
this.$socket.sendObj('post_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');
|
||||
},
|
||||
formatTime(seconds) {
|
||||
let h = Math.floor(seconds / 3600);
|
||||
@@ -168,6 +215,15 @@
|
||||
return h+':'+m+':'+s;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
loadings: function(loadings) {
|
||||
this.loadingStatusCancel = loadings.includes('statusPrintCancel');
|
||||
this.loadingStatusResume = loadings.includes('statusPrintResume');
|
||||
this.loadingStatusPause = loadings.includes('statusPrintPause');
|
||||
this.loadingStatusClear = loadings.includes('statusPrintClear');
|
||||
this.loadingStatusReprint = loadings.includes('statusPrintReprint');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<b>{{ heater.name }}</b><br />
|
||||
<small>{{ heater.target > 0 ? "active" : "off" }}</small>
|
||||
</v-col>
|
||||
<v-col class="text-center py-0 vertical_align_center"><span>{{ heater.temperature.toFixed(1) }}°C</span></v-col>
|
||||
<v-col class="text-center py-0 vertical_align_center"><span>{{ heater.temperature ? heater.temperature.toFixed(1) : 0 }}°C</span></v-col>
|
||||
<v-col class="text-center py-0 vertical_align_center">
|
||||
<toolInput :name="heater.name" :target="heater.target" :min_temp="heater.min_temp" :max_temp="heater.max_temp" command="SET_HEATER_TEMPERATURE" attribute-name="HEATER" ></toolInput>
|
||||
</v-col>
|
||||
@@ -50,7 +50,7 @@
|
||||
<b>{{ fan.name }}</b><br />
|
||||
<small>{{ fan.target > 0 && fan.speed > 0 ? (fan.speed * 100).toFixed(0)+"%" : (fan.target > 0 ? "standby" : "off") }}</small>
|
||||
</v-col>
|
||||
<v-col class="text-center py-0 vertical_align_center"><span>{{ fan.temperature.toFixed(1) }}°C</span></v-col>
|
||||
<v-col class="text-center py-0 vertical_align_center"><span>{{ fan.temperature ? fan.temperature.toFixed(1) : 0}}°C</span></v-col>
|
||||
<v-col class="text-center py-0 vertical_align_center">
|
||||
<toolInput :name="fan.name" :target="fan.target" command="SET_TEMPERATURE_FAN_TARGET" attribute-name="temperature_fan" ></toolInput>
|
||||
</v-col>
|
||||
@@ -63,8 +63,8 @@
|
||||
<b>Temperature<br />Sensors</b>
|
||||
</v-col>
|
||||
<v-col class="text-center py-0 vertical_align_center" v-for="(sensor,index) in temperature_sensors" v-bind:key="index+999" >
|
||||
<span style="cursor: default;" :title="'min: '+sensor.measured_min_temp.toFixed(1)+'° / max: '+sensor.measured_max_temp.toFixed(1)+'°'">{{ sensor.temperature.toFixed(1) }}°C</span><br />
|
||||
<small style="cursor: default;" :title="'min: '+sensor.measured_min_temp.toFixed(1)+'° / max: '+sensor.measured_max_temp.toFixed(1)+'°'">{{ sensor.name }}</small>
|
||||
<span style="cursor: default;" :title="'min: '+(sensor.measured_min_temp ? sensor.measured_min_temp.toFixed(1) : 0)+'° / max: '+(sensor.measured_max_temp ? sensor.measured_max_temp.toFixed(1) : 0)+'°'">{{ sensor.temperature ? sensor.temperature.toFixed(1) : 0 }}°C</span><br />
|
||||
<small style="cursor: default;" :title="'min: '+( sensor.measured_min_temp ? sensor.measured_min_temp.toFixed(1) : 0)+'° / max: '+(sensor.measured_max_temp ? sensor.measured_max_temp.toFixed(1) : 0)+'°'">{{ sensor.name }}</small>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
@@ -93,15 +93,13 @@
|
||||
extruderTemps: [250,215,195,0],
|
||||
loaded: false,
|
||||
chartdata: {
|
||||
labels: [],
|
||||
datasets: []
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
labels: state => state.temperaturChart.labels,
|
||||
datasets: state => state.temperaturChart.datasets,
|
||||
datasets: state => state.temperaturChart,
|
||||
boolTempchart: state => state.gui.dashboard.boolTempchart,
|
||||
}),
|
||||
...mapGetters([
|
||||
@@ -118,7 +116,6 @@
|
||||
fillData () {
|
||||
this.loaded = true;
|
||||
this.chartdata = {
|
||||
labels: this.labels,
|
||||
datasets: this.datasets
|
||||
}
|
||||
}
|
||||
@@ -126,11 +123,6 @@
|
||||
mounted () {
|
||||
this.fillData();
|
||||
},
|
||||
watch: {
|
||||
labels() {
|
||||
this.fillData();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -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.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,
|
||||
}),
|
||||
|
||||
@@ -58,6 +58,11 @@
|
||||
required: false,
|
||||
default: 100
|
||||
},
|
||||
extender: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
multi: {
|
||||
type: Number,
|
||||
required: false,
|
||||
@@ -95,13 +100,16 @@
|
||||
this.value = this.target * this.multi;
|
||||
},
|
||||
value: function() {
|
||||
setTimeout(() => {
|
||||
this.checkExpand();
|
||||
}, 1000);
|
||||
if (this.extender) {
|
||||
|
||||
setTimeout(() => {
|
||||
this.checkExpand();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
if (this.value > this.variableMax) {
|
||||
if (this.extender && this.value > this.variableMax) {
|
||||
let tmpMulti = Math.ceil((this.value - this.variableMax) / this.extenderSteps);
|
||||
this.variableMax += tmpMulti * this.extenderSteps;
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<v-row>
|
||||
<v-col class="col-sm-12 col-md-7">
|
||||
<status-panel v-if="is_ready"></status-panel>
|
||||
<klippy-state-panel v-if="!is_ready"></klippy-state-panel>
|
||||
<status-panel v-if="klippy_state === 'ready'"></status-panel>
|
||||
<klippy-state-panel v-if="klippy_state !== 'ready'"></klippy-state-panel>
|
||||
<webcam-panel v-if="showDashboardWebcam" class="mt-6"></webcam-panel>
|
||||
<z-offset-panel class="mt-6" v-if="is_ready"></z-offset-panel>
|
||||
<control-panel class="mt-6" v-if="is_ready"></control-panel>
|
||||
<extruder-panel class="mt-6" v-if="is_ready"></extruder-panel>
|
||||
<z-offset-panel class="mt-6" v-if="klippy_state === 'ready'"></z-offset-panel>
|
||||
<control-panel class="mt-6" v-if="klippy_state === 'ready'"></control-panel>
|
||||
<extruder-panel class="mt-6" v-if="klippy_state === 'ready'"></extruder-panel>
|
||||
</v-col>
|
||||
<v-col class="col-sm-12 col-md-5">
|
||||
<tools-panel></tools-panel>
|
||||
<peripherie-panel class="mt-6" v-if="is_ready"></peripherie-panel>
|
||||
<miniconsole-panel class="mt-6" v-if="is_ready && showDashboardConsole"></miniconsole-panel>
|
||||
<peripherie-panel class="mt-6" v-if="klippy_state === 'ready'"></peripherie-panel>
|
||||
<miniconsole-panel class="mt-6" v-if="klippy_state === 'ready' && showDashboardConsole"></miniconsole-panel>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
@@ -28,8 +28,7 @@
|
||||
computed: {
|
||||
...mapState({
|
||||
showDashboardConsole: state => state.gui.dashboard.boolConsole,
|
||||
klippy_state: state => state.socket.klippy_state,
|
||||
is_ready: state => state.socket.is_ready,
|
||||
klippy_state: state => state.printer.webhooks.state,
|
||||
}),
|
||||
...mapGetters([
|
||||
'showDashboardWebcam'
|
||||
|
||||
@@ -311,8 +311,9 @@
|
||||
])
|
||||
},
|
||||
created() {
|
||||
let dirArray = this.currentPath.split("/");
|
||||
this.files = findDirectory(this.filetree, dirArray);
|
||||
/*let dirArray = this.currentPath.split("/");
|
||||
this.files = findDirectory(this.filetree, dirArray);*/
|
||||
this.loadPath();
|
||||
},
|
||||
methods: {
|
||||
uploadFile: function() {
|
||||
@@ -367,11 +368,19 @@
|
||||
if (totalSeconds) {
|
||||
let output = "";
|
||||
|
||||
let days = Math.floor(totalSeconds / (3600 * 24));
|
||||
if (days) {
|
||||
totalSeconds %= (3600 * 24);
|
||||
output += days+"d";
|
||||
}
|
||||
|
||||
let hours = Math.floor(totalSeconds / 3600);
|
||||
totalSeconds %= 3600;
|
||||
if (hours) output += hours+"h";
|
||||
if (hours) output += " "+hours+"h";
|
||||
|
||||
let minutes = Math.floor(totalSeconds / 60);
|
||||
if (minutes) output += " "+minutes+"m";
|
||||
|
||||
let seconds = totalSeconds % 60;
|
||||
if (seconds) output += " "+seconds.toFixed(0)+"s";
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
config: state => state.config,
|
||||
config: state => state.printer.configfile.config,
|
||||
bed_mesh: state => state.printer.bed_mesh,
|
||||
loadings: state => state.loadings,
|
||||
}),
|
||||
@@ -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;
|
||||
|
||||
@@ -304,6 +318,7 @@
|
||||
},
|
||||
watch: {
|
||||
config: function() {
|
||||
window.console.log(this.config);
|
||||
this.profiles = this.$store.getters.getBedMeshProfiles;
|
||||
},
|
||||
profile: function() {
|
||||
|
||||
@@ -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="is_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="is_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>
|
||||
@@ -34,7 +34,7 @@
|
||||
}),
|
||||
computed: {
|
||||
...mapState({
|
||||
is_ready: state => state.socket.is_ready,
|
||||
klippy_state: state => state.printer.webhooks.state,
|
||||
}),
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -7,13 +7,12 @@ import axios from "axios";
|
||||
export default {
|
||||
socket_on_open ({ commit }) {
|
||||
commit('setConnected');
|
||||
Vue.prototype.$socket.sendObj('get_printer_objects_status', { }, 'getHelpData');
|
||||
Vue.prototype.$socket.sendObj('get_directory', { path: 'gcodes' }, 'getDirectoryRoot');
|
||||
Vue.prototype.$socket.sendObj('get_directory', { path: '/gcodes' }, 'getDirectoryRoot');
|
||||
Vue.prototype.$socket.sendObj('get_printer_info', {}, 'getKlipperInfo');
|
||||
},
|
||||
|
||||
socket_on_close ({ commit }, event) {
|
||||
commit('setDisconnect');
|
||||
commit('setDisconnected');
|
||||
if (event.wasClean) window.console.log('Socket closed clear')
|
||||
else window.console.error('Connection failure')
|
||||
|
||||
@@ -22,6 +21,7 @@ export default {
|
||||
|
||||
socket_on_message ({ commit, state }, data) {
|
||||
if (!state.socket.isConnected) commit('setConnected');
|
||||
|
||||
switch(data.method) {
|
||||
case 'notify_status_update':
|
||||
commit('setPrinterData', data.params[0]);
|
||||
@@ -31,10 +31,9 @@ export default {
|
||||
commit('addGcodeResponse', data.params[0]);
|
||||
break;
|
||||
|
||||
case 'notify_klippy_state_changed':
|
||||
window.console.log('notify_klippy_state_changed');
|
||||
window.console.log(data.params[0]);
|
||||
commit('setKlippyStatus', data.params[0]);
|
||||
case 'notify_klippy_disconnected':
|
||||
commit('setKlippyDisconnected');
|
||||
commit('resetPrinter');
|
||||
break;
|
||||
|
||||
case 'notify_filelist_changed':
|
||||
@@ -99,80 +98,44 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
getKlipperInfo({ commit, state }, data) {
|
||||
if (data !== undefined && data.is_ready && !state.socket.is_ready) {
|
||||
commit('resetPrinter');
|
||||
commit('setPrinterData', {
|
||||
hostname: data.hostname,
|
||||
version: data.version
|
||||
});
|
||||
getKlipperInfo({ commit }, data) {
|
||||
commit('setPrinterData', {
|
||||
hostname: data.hostname,
|
||||
software_version: data.software_version,
|
||||
cpu_info: data.cpu_info,
|
||||
webhooks: {
|
||||
state: data.state,
|
||||
state_message: data.state_message,
|
||||
}
|
||||
});
|
||||
|
||||
Vue.prototype.$socket.sendObj('get_printer_objects_list', {}, 'getObjectInfo');
|
||||
Vue.prototype.$socket.sendObj('get_printer_objects_status', { heaters: [] }, 'getHeatersInfo');
|
||||
Vue.prototype.$socket.sendObj('get_printer_objects_status', { configfile: ['config'] }, 'getPrinterConfig');
|
||||
Vue.prototype.$socket.sendObj('post_printer_objects_subscription', {
|
||||
gcode: [],
|
||||
toolhead: [],
|
||||
virtual_sdcard: [],
|
||||
print_stats: [],
|
||||
heaters: [],
|
||||
fan: [],
|
||||
pause_resume: [],
|
||||
idle_timeout: [],
|
||||
display_status: [],
|
||||
});
|
||||
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');
|
||||
}
|
||||
|
||||
commit('setPrinterStatusDetails', data);
|
||||
|
||||
setTimeout(function() {
|
||||
if (state.socket.is_ready) Vue.prototype.$socket.sendObj('get_printer_info', {}, 'getKlipperInfo');
|
||||
}, 5000);
|
||||
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');
|
||||
},
|
||||
|
||||
getObjectInfo({ commit }, data) {
|
||||
commit('setObjectData', data);
|
||||
getObjectsList({ commit }, data) {
|
||||
commit('setObjectData', data.objects);
|
||||
|
||||
let subscripts = {}
|
||||
|
||||
for (let key of Object.keys(data)) {
|
||||
for (let key of data.objects) {
|
||||
let nameSplit = key.split(" ");
|
||||
|
||||
if (
|
||||
nameSplit[0] === "temperature_fan" ||
|
||||
nameSplit[0] === "temperature_probe" ||
|
||||
nameSplit[0] === "temperature_sensor" ||
|
||||
nameSplit[0] === "filament_switch_sensor" ||
|
||||
nameSplit[0] === "bed_mesh"
|
||||
) subscripts = {...subscripts, [key]: []}
|
||||
nameSplit[0] !== "gcode_macro" &&
|
||||
nameSplit[0] !== "menu"
|
||||
) subscripts = {...subscripts, [key]: null }
|
||||
}
|
||||
|
||||
if (subscripts !== {}) Vue.prototype.$socket.sendObj('post_printer_objects_subscription', subscripts);
|
||||
if (subscripts.bed_mesh) Vue.prototype.$socket.sendObj('get_printer_objects_status', { bed_mesh: [] }, 'getPrinterData');
|
||||
if (subscripts !== {}) Vue.prototype.$socket.sendObj('post_printer_objects_subscribe', { objects: subscripts }, "getPrinterData");
|
||||
Vue.prototype.$socket.sendObj("get_server_temperature_store", {}, "getHeatersHistory");
|
||||
},
|
||||
|
||||
getPrinterData({ commit }, data) {
|
||||
commit('setPrinterData', data);
|
||||
},
|
||||
|
||||
getHeatersInfo({ commit }, data) {
|
||||
commit('setObjectData', data);
|
||||
|
||||
if (data.heaters && data.heaters.available_heaters && data.heaters.available_heaters.length) {
|
||||
let subscripts = {};
|
||||
|
||||
data.heaters.available_heaters.forEach(function(heater) {
|
||||
subscripts = {...subscripts, [heater]: []}
|
||||
});
|
||||
|
||||
Vue.prototype.$socket.sendObj('post_printer_objects_subscription', subscripts );
|
||||
Vue.prototype.$socket.sendObj("get_server_temperature_store", {}, "getHeatersHistory");
|
||||
}
|
||||
|
||||
if (data.status) commit('setPrinterData', data.status);
|
||||
},
|
||||
|
||||
getHeatersHistory({ commit }, data) {
|
||||
@@ -245,16 +208,24 @@ export default {
|
||||
commit('setLoadingEmergencyStop', false);
|
||||
},
|
||||
|
||||
setLoadingPrintPause({commit}) {
|
||||
commit('setLoadingPrintPause', false);
|
||||
respondPrintPause({commit}) {
|
||||
commit('removeLoading', { name: 'statusPrintPause' });
|
||||
},
|
||||
|
||||
setLoadingPrintResume({commit}) {
|
||||
commit('setLoadingPrintResume', false);
|
||||
respondPrintResume({commit}) {
|
||||
commit('removeLoading', { name: 'statusPrintResume' });
|
||||
},
|
||||
|
||||
setLoadingPrintCancel({commit}) {
|
||||
commit('setLoadingPrintCancel', false);
|
||||
respondPrintCancel({commit}) {
|
||||
commit('removeLoading', { name: 'statusPrintCancel' });
|
||||
},
|
||||
|
||||
respondPrintClear({commit}) {
|
||||
commit('removeLoading', { name: 'statusPrintClear' });
|
||||
},
|
||||
|
||||
respondPrintReprint({commit}) {
|
||||
commit('removeLoading', { name: 'statusPrintReprint' });
|
||||
},
|
||||
|
||||
sendGcode({commit}, data) {
|
||||
@@ -347,10 +318,6 @@ export default {
|
||||
router.push("/");
|
||||
},
|
||||
|
||||
getHelpData({ commit }, data) {
|
||||
commit('voidMutation', data);
|
||||
},
|
||||
|
||||
setSettings({ commit }, data) {
|
||||
commit('setSettings', data);
|
||||
},
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
|
||||
|
||||
export default {
|
||||
toolhead(state) {
|
||||
return (state.socket.isConnected) ? state.printer.toolhead : null;
|
||||
},
|
||||
|
||||
heaters: state => {
|
||||
let heaters = [];
|
||||
|
||||
if (state.object.heaters.available_heaters) {
|
||||
if (state.printer.heaters.available_heaters) {
|
||||
for (let [key, value] of Object.entries(state.printer)) {
|
||||
if (state.object.heaters.available_heaters.includes(key)) {
|
||||
if (state.printer.heaters.available_heaters.includes(key)) {
|
||||
heaters.push({
|
||||
name: key,
|
||||
target: value.target,
|
||||
@@ -129,12 +125,12 @@ export default {
|
||||
return 0;
|
||||
},
|
||||
|
||||
bool_fan: state => {
|
||||
return Object.entries(state.object).indexOf('fan');
|
||||
fan: state => {
|
||||
return Object.entries(state.object).indexOf('fan') ? state.printer.fan : false;
|
||||
},
|
||||
|
||||
is_printing: state => {
|
||||
return (state.printer.virtual_sdcard.filename !== "");
|
||||
return (state.printer.print_stats.filename !== "");
|
||||
},
|
||||
|
||||
getMacros: state => {
|
||||
@@ -144,9 +140,9 @@ export default {
|
||||
hiddenMacros[index] = item.toLowerCase();
|
||||
});
|
||||
|
||||
for (let prop in state.config) {
|
||||
for (let prop in state.printer.configfile.config) {
|
||||
if (prop.startsWith('gcode_macro') &&
|
||||
!Object.hasOwnProperty.call(state.config[prop], 'rename_existing') &&
|
||||
!Object.hasOwnProperty.call(state.printer.configfile.config[prop], 'rename_existing') &&
|
||||
!(hiddenMacros.indexOf(prop.replace('gcode_macro ', '').toLowerCase()) > -1)
|
||||
) {
|
||||
array.push({
|
||||
@@ -170,12 +166,12 @@ export default {
|
||||
getAllMacros: state => {
|
||||
let array = [];
|
||||
|
||||
for (let prop in state.config) {
|
||||
for (let prop in state.printer.configfile.config) {
|
||||
if (prop.startsWith('gcode_macro') &&
|
||||
!Object.hasOwnProperty.call(state.config[prop], 'rename_existing')) {
|
||||
!Object.hasOwnProperty.call(state.printer.configfile.config[prop], 'rename_existing')) {
|
||||
array.push({
|
||||
'name': prop.replace('gcode_macro ', ''),
|
||||
'prop': state.config[prop]
|
||||
'prop': state.printer.configfile.config[prop]
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -224,7 +220,7 @@ export default {
|
||||
currentProfile = state.printer.bed_mesh.profile_name;
|
||||
}
|
||||
|
||||
for (let [key, value] of Object.entries(state.config)) {
|
||||
for (let [key, value] of Object.entries(state.printer.configfile.config)) {
|
||||
let nameSplit = key.split(" ");
|
||||
|
||||
if (nameSplit.length > 1 && nameSplit[0] === "bed_mesh" && nameSplit[1] !== undefined) {
|
||||
@@ -249,8 +245,10 @@ export default {
|
||||
|
||||
getTitle: state => {
|
||||
if (state.socket.isConnected) {
|
||||
if (state.printer.pause_resume && state.printer.pause_resume.is_paused) return "Pause Print";
|
||||
else if (state.printer.virtual_sdcard && state.printer.virtual_sdcard.is_active) return (state.printer.virtual_sdcard.progress * 100).toFixed(0)+"% Printing - "+state.printer.virtual_sdcard.filename;
|
||||
if (state.printer.webhooks.state !== "ready") return "ERROR";
|
||||
else if (state.printer.print_stats.state === "paused") return "Pause Print";
|
||||
else if (state.printer.print_stats.state === "printing") return (state.printer.virtual_sdcard.progress * 100).toFixed(0)+"% Printing - "+state.printer.print_stats.filename;
|
||||
else if (state.printer.print_stats.state === "complete") return "Complete - "+state.printer.print_stats.filename;
|
||||
|
||||
return state.gui.general.printername ? state.gui.general.printername : state.printer.hostname;
|
||||
} else return "Mainsail";
|
||||
@@ -261,6 +259,8 @@ export default {
|
||||
},
|
||||
|
||||
getCurrentExtruder: state => {
|
||||
if (state.printer.configfile.config === null) return null;
|
||||
|
||||
let extruder = {
|
||||
name: "",
|
||||
status: null,
|
||||
@@ -269,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]) {
|
||||
|
||||
@@ -15,22 +15,15 @@ export default new Vuex.Store({
|
||||
port: window.location.port,
|
||||
reconnectInterval: 3000,
|
||||
isConnected: false,
|
||||
loadingGcodeUpload: false,
|
||||
loadingGcodeRefresh: false,
|
||||
metadataRequestDelay: 1000,
|
||||
|
||||
loadingEmergencyStop: false,
|
||||
loadingPrintPause: false,
|
||||
loadingPrintResume: false,
|
||||
loadingRestart: false,
|
||||
loadingRestartFirmware: false,
|
||||
loadingRebootHost: false,
|
||||
loadingShutdownHost: false,
|
||||
loadingSaveGuiConfig: false,
|
||||
loadingEndstopStatus: false,
|
||||
printer_state: "",
|
||||
klippy_state: "disconnect",
|
||||
klippy_message: "",
|
||||
is_ready: false,
|
||||
error_detected: false,
|
||||
},
|
||||
webcam: {
|
||||
url: ""
|
||||
@@ -63,11 +56,20 @@ export default new Vuex.Store({
|
||||
|
||||
},
|
||||
printer: {
|
||||
software_version: '',
|
||||
hostname: '',
|
||||
version: '',
|
||||
cpu_info: '',
|
||||
webhooks: {
|
||||
state: '',
|
||||
state_message: '',
|
||||
},
|
||||
heaters: {
|
||||
available_heaters: [],
|
||||
|
||||
},
|
||||
toolhead: {
|
||||
position: [],
|
||||
homed_axes: [],
|
||||
homed_axes: "",
|
||||
extruder: "",
|
||||
status: "",
|
||||
print_time: 0,
|
||||
@@ -105,27 +107,24 @@ export default new Vuex.Store({
|
||||
current_file: {
|
||||
|
||||
},
|
||||
gcode: {
|
||||
gcode_move: {
|
||||
extrude_factor: 1,
|
||||
speed_factor: 1,
|
||||
base_zpos: 0,
|
||||
homing_origin: [0,0,0,0],
|
||||
absolute_coordinates: true,
|
||||
absolute_extrude: true,
|
||||
},
|
||||
fan: {
|
||||
speed: 0,
|
||||
},
|
||||
/*fan: {
|
||||
speed: 0,
|
||||
},*/
|
||||
endstops: {},
|
||||
},
|
||||
object: {
|
||||
heaters: {
|
||||
available_heaters: []
|
||||
configfile: {
|
||||
config: {}
|
||||
}
|
||||
},
|
||||
temperaturChart: {
|
||||
labels: [],
|
||||
datasets: [],
|
||||
},
|
||||
object: [],
|
||||
temperaturChart: [],
|
||||
helplist: [],
|
||||
filetree: [
|
||||
{
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import Vue from "vue";
|
||||
const objectAssignDeep = require(`object-assign-deep`);
|
||||
import { findDirectory } from '../plugins/helpers';
|
||||
import { colorArray, colorChamber, colorHeaterBed, temperaturChartSampleLength } from './variables';
|
||||
import { colorArray, colorChamber, colorHeaterBed/*, temperaturChartSampleLength*/ } from './variables';
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
@@ -15,6 +16,15 @@ export default {
|
||||
state.socket.isConnected = false;
|
||||
},
|
||||
|
||||
setKlippyDisconnected(state) {
|
||||
Vue.set(state, '', {
|
||||
webhooks: {
|
||||
state: 'disconnected',
|
||||
state_message: 'Disconnected...'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
resetPrinter(state) {
|
||||
//TODO check reset in storage
|
||||
Vue.set(state, '', {
|
||||
@@ -26,12 +36,34 @@ export default {
|
||||
available_heaters: []
|
||||
}
|
||||
},
|
||||
temperaturChart: {
|
||||
labels: [],
|
||||
datasets: [],
|
||||
},
|
||||
temperaturChart: [],
|
||||
helplist: [],
|
||||
filetree: [],
|
||||
printer: {
|
||||
print_stats: {
|
||||
print_duration: 0,
|
||||
filament_used: 0,
|
||||
total_duration: 0,
|
||||
filename: "",
|
||||
state: "",
|
||||
message: ""
|
||||
},
|
||||
pause_resume: {
|
||||
is_paused: false
|
||||
},
|
||||
idle_timeout: {
|
||||
printing_time: 0,
|
||||
state: "",
|
||||
},
|
||||
display_status: {
|
||||
message: null,
|
||||
progress: 0,
|
||||
},
|
||||
virtual_sdcard: {
|
||||
progress: 0,
|
||||
is_active: false,
|
||||
file_position: 0,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -42,16 +74,25 @@ export default {
|
||||
let now = Date.now();
|
||||
|
||||
Object.entries(data).forEach(([key, value]) => {
|
||||
Vue.set(state.printer, key, value);
|
||||
if (typeof(value) === "object") {
|
||||
Vue.set(state.printer, key, {
|
||||
...state.printer[key],
|
||||
...value
|
||||
});
|
||||
} else Vue.set(state.printer, key, value);
|
||||
|
||||
if (Array.isArray(state.object.heaters.available_heaters) && state.object.heaters.available_heaters.length) {
|
||||
if (
|
||||
Array.isArray(state.printer.heaters.available_heaters) &&
|
||||
state.printer.heaters.available_heaters.length
|
||||
) {
|
||||
let keySplit = key.split(" ");
|
||||
|
||||
if (
|
||||
state.object.heaters.available_heaters.includes(key) ||
|
||||
state.printer.heaters.available_heaters.includes(key) ||
|
||||
keySplit[0] === "temperature_fan" ||
|
||||
keySplit[0] === "temperature_sensor" ||
|
||||
keySplit[0] === "temperature_probe") {
|
||||
|
||||
if (keySplit[0] === "temperature_fan") key = keySplit[1];
|
||||
else if (keySplit[0] === "temperature_sensor") key = keySplit[1];
|
||||
else if (keySplit[0] === "temperature_probe") key = "probe";
|
||||
@@ -92,36 +133,67 @@ export default {
|
||||
},
|
||||
|
||||
addTemperatureChartValue(state, payload) {
|
||||
if (state.temperaturChart.labels.map(Number).indexOf(+payload.time) < 0) {
|
||||
state.temperaturChart.labels.push(payload.time);
|
||||
// definations for delete old entries
|
||||
let timeOld = new Date().getTime() - (1000 * 60 * 10);
|
||||
let minResolution = 1000; // value in ms
|
||||
let deletedIndex;
|
||||
|
||||
if (state.temperaturChart.labels.length > temperaturChartSampleLength) {
|
||||
state.temperaturChart.labels = state.temperaturChart.labels.splice(state.temperaturChart.labels.length - temperaturChartSampleLength)
|
||||
}
|
||||
}
|
||||
|
||||
let index = state.temperaturChart.datasets.findIndex(element => element.label === payload.name);
|
||||
let index = state.temperaturChart.findIndex(element => element.label === payload.name);
|
||||
if (index < 0) {
|
||||
this.commit('addTemperatureChartHeater', {
|
||||
name: payload.name,
|
||||
type: payload.type,
|
||||
});
|
||||
index = state.temperaturChart.datasets.findIndex(element => element.label === payload.name);
|
||||
index = state.temperaturChart.findIndex(element => element.label === payload.name);
|
||||
}
|
||||
let index_target = state.temperaturChart.datasets.findIndex(element => element.label === payload.name+'_target');
|
||||
let index_target = state.temperaturChart.findIndex(element => element.label === payload.name+'_target');
|
||||
|
||||
// update current temp in temperature chart
|
||||
if (index >= 0) state.temperaturChart.datasets[index].data.push(payload.value.temperature.toFixed(1));
|
||||
if (index >= 0) {
|
||||
let temperature = 0;
|
||||
if (payload.value.temperature !== undefined) temperature = payload.value.temperature.toFixed(1);
|
||||
else if (state.temperaturChart[index].data.length) temperature = state.temperaturChart[index].data[state.temperaturChart[index].data.length - 1].y;
|
||||
|
||||
// update target temp in temperature chart
|
||||
if (index_target >= 0 && payload.value.target !== undefined) state.temperaturChart.datasets[index_target].data.push(payload.value.target.toFixed(1));
|
||||
if (
|
||||
(state.temperaturChart[index].data.length && (
|
||||
state.temperaturChart[index].data[state.temperaturChart[index].data.length - 1].y !== temperature ||
|
||||
payload.time-state.temperaturChart[index].data[state.temperaturChart[index].data.length - 1].x > minResolution
|
||||
)) || state.temperaturChart[index].data.length === 0
|
||||
) {
|
||||
state.temperaturChart[index].data.push({
|
||||
x: payload.time,
|
||||
y: temperature
|
||||
});
|
||||
}
|
||||
|
||||
if (index >= 0 && state.temperaturChart.datasets[index].data.length > temperaturChartSampleLength) {
|
||||
state.temperaturChart.datasets[index].data = state.temperaturChart.datasets[index].data.splice(state.temperaturChart.datasets[index].data.length - temperaturChartSampleLength)
|
||||
// delete old entries
|
||||
while ((deletedIndex = state.temperaturChart[index].data.findIndex(item => item.x < timeOld)) > -1) {
|
||||
state.temperaturChart[index].data.splice(deletedIndex, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (index_target >= 0 && state.temperaturChart.datasets[index_target].data.length > temperaturChartSampleLength) {
|
||||
state.temperaturChart.datasets[index_target].data = state.temperaturChart.datasets[index_target].data.splice(state.temperaturChart.datasets[index_target].data.length - temperaturChartSampleLength)
|
||||
// update target temp in temperature chart
|
||||
if (index_target >= 0) {
|
||||
let target = 0;
|
||||
if (payload.value.target !== undefined) target = payload.value.target.toFixed(1);
|
||||
else if (state.temperaturChart[index_target].data.length) target = state.temperaturChart[index_target].data[state.temperaturChart[index_target].data.length - 1].y;
|
||||
|
||||
if (
|
||||
(state.temperaturChart[index_target].data.length && (
|
||||
state.temperaturChart[index_target].data[state.temperaturChart[index_target].data.length - 1].y !== target ||
|
||||
payload.time-state.temperaturChart[index_target].data[state.temperaturChart[index_target].data.length - 1].x > minResolution
|
||||
)) || state.temperaturChart[index_target].data.length === 0
|
||||
) {
|
||||
state.temperaturChart[index_target].data.push({
|
||||
x: payload.time,
|
||||
y: target
|
||||
});
|
||||
}
|
||||
|
||||
// delete old entries
|
||||
while ((deletedIndex = state.temperaturChart[index_target].data.findIndex(item => item.x < timeOld)) > -1) {
|
||||
state.temperaturChart[index_target].data.splice(deletedIndex, 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -131,39 +203,29 @@ export default {
|
||||
switch (payload.name) {
|
||||
case 'heater_bed': color = colorHeaterBed; break;
|
||||
case 'chamber': color = colorChamber; break;
|
||||
default: color = colorArray[state.temperaturChart.datasets.filter(element => !element.label.endsWith("_target") && element.label !== "heater_bed" && element.label !== "chamber").length]; break;
|
||||
default: color = colorArray[state.temperaturChart.filter(element => !element.label.endsWith("_target") && element.label !== "heater_bed" && element.label !== "chamber").length]; break;
|
||||
}
|
||||
|
||||
let hidden = state.gui.dashboard.hiddenTempChart.indexOf(payload.name.toUpperCase()) >= 0 ? true : null;
|
||||
|
||||
state.temperaturChart.datasets.push({
|
||||
state.temperaturChart.push({
|
||||
label: payload.name,
|
||||
data: [],
|
||||
borderColor: color,
|
||||
backgroundColor: color,
|
||||
fill: false,
|
||||
borderDash: undefined,
|
||||
borderWidth: 2,
|
||||
pointRadius: 0,
|
||||
pointHitRadius: 5,
|
||||
showLine: true,
|
||||
lineTension: 0,
|
||||
hidden: hidden,
|
||||
});
|
||||
|
||||
if (payload.type !== "temperature_sensor") {
|
||||
state.temperaturChart.datasets.push({
|
||||
state.temperaturChart.push({
|
||||
label: payload.name+"_target",
|
||||
data: [],
|
||||
borderColor: color,
|
||||
backgroundColor: color+'20',
|
||||
fill: true,
|
||||
borderDash: undefined,
|
||||
borderWidth: 0,
|
||||
pointRadius: 0,
|
||||
pointHitRadius: 0,
|
||||
showLine: true,
|
||||
lineTension: 0,
|
||||
hidden: hidden,
|
||||
});
|
||||
}
|
||||
@@ -207,9 +269,12 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
Vue.prototype.$socket.sendObj("get_file_metadata", { filename: data.filename }, "getMetadata");
|
||||
}, 1000);
|
||||
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);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -350,6 +415,7 @@ export default {
|
||||
|
||||
setMetadataCurrentFile(state, data) {
|
||||
if (data !== undefined && data.filename !== "") {
|
||||
state.printer.current_file.thumbnails = [];
|
||||
Vue.set(state.printer, 'current_file', data);
|
||||
}
|
||||
},
|
||||
@@ -423,17 +489,6 @@ export default {
|
||||
state.loadings = state.loadings.filter(function(ele){ return ele !== data.name; });
|
||||
},
|
||||
|
||||
setKlippyStatus(state, value) {
|
||||
if (value !== undefined) {
|
||||
state.socket.klippy_state = value;
|
||||
|
||||
if (value === "disconnect") {
|
||||
state.socket.is_ready = false;
|
||||
state.socket.klippy_message = "";
|
||||
} else if (value === "ready") Vue.prototype.$socket.sendObj('get_printer_info', {}, 'getKlipperInfo');
|
||||
}
|
||||
},
|
||||
|
||||
setPrinterStatusDetails(state, data) {
|
||||
if (data !== undefined && data.is_ready !== undefined) {
|
||||
state.socket.error_detected = data.error_detected;
|
||||
@@ -442,34 +497,10 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
setLoadingGcodeUpload(state, value) {
|
||||
state.socket.loadingGcodeUpload = value;
|
||||
},
|
||||
|
||||
setLoadingGcodeRefresh(state, value) {
|
||||
state.socket.loadingGcodeRefresh = value;
|
||||
},
|
||||
|
||||
setLoadingEmergencyStop(state, value) {
|
||||
state.socket.loadingEmergencyStop = value;
|
||||
},
|
||||
|
||||
setLoadingPrintPause(state, value) {
|
||||
state.socket.loadingPrintPause = value;
|
||||
},
|
||||
|
||||
setLoadingPrintResume(state, value) {
|
||||
state.socket.loadingPrintResume = value;
|
||||
},
|
||||
|
||||
setLoadingPrintCancel(state, value) {
|
||||
state.socket.loadingPrintCancel = value;
|
||||
},
|
||||
|
||||
setLoadingQGL(state, value) {
|
||||
state.socket.loadingQGL = value;
|
||||
},
|
||||
|
||||
setLoadingRestart(state, value) {
|
||||
state.socket.loadingRestart = value;
|
||||
},
|
||||
|
||||