Skip to content

Commit 1eeb7b1

Browse files
committed
Fix Marlin-embedded catching M503 output
1 parent 5061982 commit 1eeb7b1

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

index.html.gz

37 Bytes
Binary file not shown.

www/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
var target_firmware = "";
1111
</script>
1212
<script>
13-
var web_ui_version = "2.1b48";
13+
var web_ui_version = "2.1b49";
1414
</script>
1515
<script>
1616
var direct_sd = false;

www/js/app.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ function startSocket() {
151151
if ((bytes[i] == 10) || (bytes[i] == 13)) {
152152
wsmsg += msg;
153153
Monitor_output_Update(wsmsg);
154-
//msg = wsmsg.replace("\n", "");
155-
//wsmsg = msg.replace("\r", "");
156-
//console.log(wsmsg);
154+
msg = wsmsg.replace("\n", "");
155+
wsmsg = msg.replace("\r", "");
156+
console.log(wsmsg);
157157
if ((target_firmware == "grbl-embedded") || (target_firmware == "marlin-embedded")) process_socket_response(msg);
158158
wsmsg = "";
159159
msg = "";
@@ -680,22 +680,23 @@ function process_socket_response(msg) {
680680
}
681681
}
682682
if (target_firmware == "marlin-embedded") {
683-
if (socket_is_settings && !(msg.startsWith("echo:Unknown command:") || msg.startsWith("echo:enqueueing"))) socket_response += msg;
683+
if (socket_is_settings && !(msg.startsWith("echo:Unknown command:") || msg.startsWith("echo:enqueueing"))) socket_response += msg+"\n";
684684
if (!socket_is_settings && (msg.startsWith(" G21") || msg.startsWith(" G20"))) {
685685
socket_is_settings = true;
686-
socket_response = msg;
686+
socket_response = msg + "\n";
687687
//to stop waiting for data
688-
SendGetHttp("/command?commandText=echo");
688+
console.log("Got settings Start");
689689
}
690690
if (msg.startsWith("ok T:")) {
691691
process_Temperatures(msg);
692692
}
693693
if (msg.startsWith("X:")) {
694694
process_Position(msg);
695695
}
696-
if (msg.startsWith("echo:Unknown command: \"echo\"")) {
696+
if (msg.startsWith("ok")) {
697697
if (socket_is_settings) {
698698
//update settings
699+
console.log("Got settings End");
699700
console.log(socket_response);
700701
getESPconfigSuccess(socket_response);
701702
socket_is_settings = false;

0 commit comments

Comments
 (0)