Potential fix for #19 (and #32):

Multiple line Gcode commands must be sent as an array of strings.
This commit is contained in:
James Leach 2019-02-11 18:34:59 -06:00
parent a9edc04a47
commit 6c273f423c
1 changed files with 3 additions and 2 deletions

View File

@ -62,8 +62,9 @@ $(function() {
}
expanded = self.macro.replace(paramObjRegex, replaceParams)
expanded = expanded.replace(/(?:\r\n|\r|\n)/g, " ");
expanded = "[\"" + expanded + "\"]"
expanded = expanded.replace(/(?:\r\n|\r|\n)/g, "\",\"");
OctoPrint.control.sendGcode(expanded);
}
}