GCode - BufferType
This commit is contained in:
@@ -90,7 +90,7 @@ class GCode{
|
||||
|
||||
if(g == undefined) return;
|
||||
|
||||
//console.log("GCode: Empfange GCode: " + g);
|
||||
g = g.toString("utf8");
|
||||
|
||||
var multipleCommands = g.split(" G");
|
||||
var doProcessRest = false;
|
||||
@@ -98,7 +98,6 @@ class GCode{
|
||||
doProcessRest = true;
|
||||
g = multipleCommands[0];
|
||||
}
|
||||
//console.log("Command: " + g);
|
||||
|
||||
g = g.split(" ");
|
||||
|
||||
@@ -203,8 +202,7 @@ class GCode{
|
||||
if(s.includes("e")){ robot.e = Number(s.substring(1, s.length));}
|
||||
});
|
||||
}
|
||||
|
||||
if(g[0] == "G92"){ // G92 - Set Position
|
||||
else if(g[0] == "G92"){ // G92 - Set Position
|
||||
g.forEach((s) => {
|
||||
if(s.includes("X")){ robot.xMotor = Number(s.substring(1, s.length));}
|
||||
if(s.includes("x")){ robot.xMotor = Number(s.substring(1, s.length));}
|
||||
|
||||
Reference in New Issue
Block a user