= ignorieren

This commit is contained in:
ChK
2026-04-22 12:27:57 +02:00
parent 2af6432a44
commit c5e3ae262e
3 changed files with 5379 additions and 0 deletions

View File

@@ -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){