Horrible G91 G90 mistake

This commit is contained in:
ChK
2026-04-23 20:22:10 +02:00
parent d801e19ad0
commit a16eb53aeb
7 changed files with 1678 additions and 322 deletions

View File

@@ -331,11 +331,16 @@ module.exports = class TelnetSenderGRBL{
data += " f"+(maxSpeedF.toFixed(2).toString())
if(this.tSocket && data.toString("utf-8").length > 3){
//if(!this.isTestMode){
console.log("" + this.urlGRBLstr + " gets the message: " + data.toString("utf-8"))
//}
dataStr = data.toString("utf-8");
if(this.tSocket && dataStr.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;
}
console.log("Driver send to 🤖 " + this.urlGRBLstr + " the message: " + data.toString("utf-8"))
this.tSocket.write( data.toString("utf-8") + "\r\n");
}
}