From 66beffd5c4cde7433361e0d194f6cea857b36036 Mon Sep 17 00:00:00 2001 From: Albert Galimov Date: Fri, 3 Jan 2025 12:07:24 +0300 Subject: [PATCH] Fix heightmap probe regex. This will fix heightmap zeroes on machnies that have >3 axis. See topic https://github.com/Denvi/Candle/issues/589 --- src/frmmain_processresponse.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frmmain_processresponse.cpp b/src/frmmain_processresponse.cpp index afd8e5a..b0b2d32 100644 --- a/src/frmmain_processresponse.cpp +++ b/src/frmmain_processresponse.cpp @@ -569,7 +569,7 @@ void frmMain::ProcessGRBL1_1() { // Get probe Z coordinate // "[PRB:0.000,0.000,0.000:0];ok" - QRegExp rx(".*PRB:([^,]*),([^,]*),([^]^:]*)"); + QRegExp rx(".*PRB:([^,]*),([^,]*),([^,:\\]]*)"); double z = qQNaN(); if(rx.indexIn(response) != -1) { @@ -1405,7 +1405,7 @@ void frmMain::ProcessGRBL_ETH(QString data) { // Get probe Z coordinate // "[PRB:0.000,0.000,0.000:0];ok" - QRegExp rx(".*PRB:([^,]*),([^,]*),([^]^:]*)"); + QRegExp rx(".*PRB:([^,]*),([^,]*),([^,:\\]]*)"); double z = qQNaN(); if(rx.indexIn(response) != -1) {