From a2ed7045c809526a88bcf0587ad67be8b4bb6233 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 8 Aug 2025 16:00:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=BA=BF=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mainwindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index e8a9c1e..08f2c99 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -521,8 +521,10 @@ void MainWindow::on_pushButton_12_clicked() QThread::msleep(10); // 延时10毫秒 dacHandler->setDACReg(drvUart,cmd2); QThread::msleep(10); // 延时10毫秒 - QByteArray revData = dacHandler->getDACReg(drvUart,cmd3); - onLogPrint(" [UART] <-- Read Reg data is :"+revData.toHex(' ')); + QByteArray tmp = dacHandler->getDACReg(drvUart,cmd3); + QByteArray revData = tmp; + revData.detach(); + onLogPrint(" [UART] <-- Read Reg data is :"+tmp.toHex(' ')); if(revData.length()>=7){ regData[i-1]=revData; }else{