same fix for T0/T1/G90/G91/G92
This commit is contained in:
parent
1d44ab2cf5
commit
6f4afa0cbe
1 changed files with 4 additions and 4 deletions
|
|
@ -190,8 +190,8 @@
|
||||||
let t1 = false;
|
let t1 = false;
|
||||||
for (let i=0; i<device.gcodePre.length; i++) {
|
for (let i=0; i<device.gcodePre.length; i++) {
|
||||||
let line = device.gcodePre[i];
|
let line = device.gcodePre[i];
|
||||||
if (line.indexOf('T0') >= 0) t0 = true; else
|
if (line.indexOf('T0') === 0) t0 = true; else
|
||||||
if (line.indexOf('T1') >= 0) t1 = true; else
|
if (line.indexOf('T1') === 0) t1 = true; else
|
||||||
if (line.indexOf('M82') === 0) {
|
if (line.indexOf('M82') === 0) {
|
||||||
extrudeAbs = true;
|
extrudeAbs = true;
|
||||||
extrudeSet = true;
|
extrudeSet = true;
|
||||||
|
|
@ -200,8 +200,8 @@
|
||||||
extrudeAbs = false;
|
extrudeAbs = false;
|
||||||
extrudeSet = true;
|
extrudeSet = true;
|
||||||
} else
|
} else
|
||||||
if (line.indexOf('G90') >= 0 && !extrudeSet) extrudeAbs = true; else
|
if (line.indexOf('G90') === 0 && !extrudeSet) extrudeAbs = true; else
|
||||||
if (line.indexOf('G91') >= 0 && !extrudeSet) extrudeAbs = false; else
|
if (line.indexOf('G91') === 0 && !extrudeSet) extrudeAbs = false; else
|
||||||
if (line.indexOf('G92') === 0) {
|
if (line.indexOf('G92') === 0) {
|
||||||
line.split(";")[0].split(' ').forEach(function (tok) {
|
line.split(";")[0].split(' ').forEach(function (tok) {
|
||||||
let val = parseFloat(tok.substring(1) || 0) || 0;
|
let val = parseFloat(tok.substring(1) || 0) || 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue