Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ae7827f7e | ||
|
|
98950a2b9a |
No files matched your search
@@ -8,7 +8,7 @@ Download and install KWC:
|
||||
```bash
|
||||
mkdir -p ~/kwc
|
||||
cd ~/kwc
|
||||
wget -q -O kwc.zip https://github.com/meteyou/kwc/releases/download/V0.0.2/kwc-alpha-0.0.2.zip && unzip kwc.zip && rm kwc.zip
|
||||
wget -q -O kwc.zip https://github.com/meteyou/kwc/releases/download/v0.0.3/kwc-alpha-0.0.3.zip && unzip kwc.zip && rm kwc.zip
|
||||
```
|
||||
|
||||
Configure web_server in printer.cfg:
|
||||
@@ -58,9 +58,9 @@ gcode:
|
||||
RESUME
|
||||
```
|
||||
|
||||
## Update KWC to V0.0.2
|
||||
## Update KWC to V0.0.3
|
||||
```
|
||||
rm -R ~/kwc/*
|
||||
cd ~/kwc
|
||||
wget -q -O kwc.zip https://github.com/meteyou/kwc/releases/download/V0.0.2/kwc-alpha-0.0.2.zip && unzip kwc.zip && rm kwc.zip
|
||||
wget -q -O kwc.zip https://github.com/meteyou/kwc/releases/download/v0.0.3/kwc-alpha-0.0.3.zip && unzip kwc.zip && rm kwc.zip
|
||||
```
|
||||
+28
-1
@@ -34,6 +34,8 @@
|
||||
solo
|
||||
class="gcode-command-field"
|
||||
v-on:keyup.enter="doSend"
|
||||
v-on:keyup.up="onKeyUp"
|
||||
v-on:keyup.down="onKeyDown"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
@@ -99,7 +101,11 @@
|
||||
],
|
||||
options: {
|
||||
|
||||
}
|
||||
},
|
||||
lastCommands: [
|
||||
|
||||
],
|
||||
lastCommandNumber: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -119,11 +125,32 @@
|
||||
doSend() {
|
||||
this.loadingSendGcode = true;
|
||||
this.$socket.sendObj('post_printer_gcode', { script: this.gcode }, "sendGcode");
|
||||
this.lastCommands.push(this.gcode);
|
||||
this.gcode = "";
|
||||
this.lastCommandNumber = null;
|
||||
},
|
||||
formatMessage(message) {
|
||||
message = message.replace(/(?:\r\n|\r|\n)/g, '<br>');
|
||||
|
||||
return message;
|
||||
},
|
||||
onKeyUp() {
|
||||
if (this.lastCommandNumber === null && this.lastCommands.length) {
|
||||
this.lastCommandNumber = this.lastCommands.length - 1;
|
||||
this.gcode = this.lastCommands[this.lastCommandNumber];
|
||||
} else if (this.lastCommandNumber > 0) {
|
||||
this.lastCommandNumber--;
|
||||
this.gcode = this.lastCommands[this.lastCommandNumber];
|
||||
}
|
||||
},
|
||||
onKeyDown() {
|
||||
if (this.lastCommandNumber !== null && this.lastCommandNumber < (this.lastCommands.length - 1)) {
|
||||
this.lastCommandNumber++;
|
||||
this.gcode = this.lastCommands[this.lastCommandNumber];
|
||||
} else if (this.lastCommandNumber !== null && this.lastCommandNumber === (this.lastCommands.length - 1)) {
|
||||
this.lastCommandNumber = null;
|
||||
this.gcode = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-5
@@ -227,11 +227,7 @@ export default new Vuex.Store({
|
||||
message: data
|
||||
});
|
||||
|
||||
if (data.substring(0,2) === "//") {
|
||||
data = data.replace("//", "");
|
||||
Vue.$toast.warning(data);
|
||||
} else if (data.substring(0,2) === "!!") {
|
||||
data = data.replace("!!", "");
|
||||
if (data.substring(0,2) === "!!") {
|
||||
Vue.$toast.error(data);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//export const hostname = window.location.host;
|
||||
export const hostname = "voron250.local:8080";
|
||||
export const hostname = window.location.host;
|
||||
//export const hostname = "voron250.local:8080";
|
||||
Reference in new issue
Block a user