handle comments w/ Exx in prefix
This commit is contained in:
parent
9e0c263ee8
commit
3eecf09f12
1 changed files with 4 additions and 2 deletions
|
|
@ -338,9 +338,11 @@ var gs_kiri_fdm = exports;
|
|||
for (var i=0; i<device.gcodePre.length; i++) {
|
||||
var line = device.gcodePre[i];
|
||||
if (device.extrudeAbs && line.indexOf('E') > 0) {
|
||||
line.split(' ').forEach(function (tok) {
|
||||
line.split(";")[0].split(' ').forEach(function (tok) {
|
||||
// use max E position from gcode-preamble
|
||||
if (tok[0] == 'E') outputLength = Math.max(outputLength, parseFloat(tok.substring(1)));
|
||||
if (tok[0] == 'E') {
|
||||
outputLength = Math.max(outputLength, parseFloat(tok.substring(1)) || 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
append(constReplace(line, consts));
|
||||
|
|
|
|||
Loading…
Reference in a new issue