= ignorieren
This commit is contained in:
@@ -28,6 +28,7 @@ class GCode{
|
||||
}
|
||||
|
||||
static containsCommand(s){
|
||||
|
||||
if(s.indexOf('M1 ') !== -1){return true;} // M1-Commands = G1-Command only for Motor-Coordinates
|
||||
if(s.indexOf('G') !== 0){return false;}
|
||||
if(s.indexOf('G90') == 0){return true;}
|
||||
@@ -82,11 +83,17 @@ class GCode{
|
||||
static receiveGCode(robot, g){
|
||||
|
||||
if(g == undefined) return;
|
||||
if(g.length == 0) return;
|
||||
|
||||
console.log("🔵 GCode.receiveGCode: Incoming command: " + g);
|
||||
|
||||
g = g.toString("utf8");
|
||||
|
||||
if(g.startsWith("$J=")) {
|
||||
// Handle $J= GCode for jogging
|
||||
g = g.substring(3).trim(); // Remove "$J=" and trim whitespace
|
||||
}
|
||||
|
||||
var multipleCommands = g.split(" G");
|
||||
var doProcessRest = false;
|
||||
if(multipleCommands.length > 1){
|
||||
|
||||
Reference in New Issue
Block a user