UnitTest aktualisieren

This commit is contained in:
ChK
2026-04-23 20:45:49 +02:00
parent a16eb53aeb
commit 355925ebb4
8 changed files with 1660 additions and 16 deletions

View File

@@ -331,17 +331,16 @@ module.exports = class TelnetSenderGRBL{
data += " f"+(maxSpeedF.toFixed(2).toString())
dataStr = data.toString("utf-8");
if(this.tSocket && dataStr.length > 3){
if(this.tSocket && data.length > 3){
// Ensure that the command starts with G90 (absolute positioning) if it's not already included
if(dataStr.indexOf("G90") == -1){
dataStr = "G90 " + dataStr;
if(data.indexOf("G90") == -1){
data = "G90 " + data;
}
console.log("Driver send to 🤖 " + this.urlGRBLstr + " the message: " + data.toString("utf-8"))
console.log("Driver send to 🤖 " + this.urlGRBLstr + " the message: " + data)
this.tSocket.write( data.toString("utf-8") + "\r\n");
this.tSocket.write( data + "\r\n");
}
}
}