release雷鸟产测 V1.4
authorSnickerSun <snickersun@163.com>
Mon, 8 Dec 2025 06:18:58 +0000 (14:18 +0800)
committerSnickerSun <snickersun@163.com>
Mon, 8 Dec 2025 06:18:58 +0000 (14:18 +0800)
lcd测试结束后,主动息屏,解决亮屏造成的音频测试和震动测试卡顿现象。提高测试流畅度和通过率。

mainwindow.cpp
releasePackage/LN_Factorytool_V1.4.zip [new file with mode: 0644]
releasePackage/LN_Factorytool_V1.4/LeiNiaoFactoryTool.exe [new file with mode: 0644]
releasePackage/LN_Factorytool_V1.4/settings.json [new file with mode: 0644]

index 18ff20b..67a6f32 100644 (file)
@@ -27,7 +27,7 @@ MainWindow::MainWindow(QWidget *parent)
     , ui(new Ui::MainWindow)
 {
     ui->setupUi(this);
-    setWindowTitle("雷鸟产测工具 V1.3");
+    setWindowTitle("雷鸟产测工具 V1.4");
     
     // 确保控制台输出使用UTF-8编码
     QTextCodec *utf8Codec = QTextCodec::codecForName("UTF-8");
@@ -1477,6 +1477,15 @@ void MainWindow::onLcdTestTimer()
         serial->write("AT^LCDTEST=2\r\n");
         qDebug() << "发送LCD退出指令: AT^LCDTEST=2";
         
+        // 发送关闭LCD指令,确保其他测试时LCD是关闭的
+        QTimer::singleShot(100, this, [this]() {
+            if (isProductionTestRunning && serial && serial->isOpen()) {
+                serial->write("AT^LCDOFF\r\n");
+                qDebug() << "发送指令: AT^LCDOFF (关闭LCD)";
+                ui->recvTextEdit->append(">>> 发送指令: AT^LCDOFF (关闭LCD)");
+            }
+        });
+        
         // LCD颜色测试完成,检查用户是否已确认
         if (!isWaitingForUserConfirm) {
             // 用户已确认,可以继续下一个测试
@@ -2013,6 +2022,15 @@ void MainWindow::showLcdTestConfirmDialog()
         serial->write("AT^LCDTEST=2\r\n");
         qDebug() << "LCD测试通过,发送停止LCD测试指令: AT^LCDTEST=2";
         
+        // 发送关闭LCD指令,确保其他测试时LCD是关闭的
+        QTimer::singleShot(100, this, [this]() {
+            if (isProductionTestRunning && serial && serial->isOpen()) {
+                serial->write("AT^LCDOFF\r\n");
+                qDebug() << "发送指令: AT^LCDOFF (关闭LCD)";
+                ui->recvTextEdit->append(">>> 发送指令: AT^LCDOFF (关闭LCD)");
+            }
+        });
+        
         // 停止LCD定时器,防止继续切换颜色和重复调用马达测试
         if (lcdTestTimer->isActive()) {
             lcdTestTimer->stop();
@@ -2044,6 +2062,15 @@ void MainWindow::showLcdTestConfirmDialog()
         serial->write("AT^LCDTEST=2\r\n");
         qDebug() << "LCD测试失败,发送停止LCD测试指令: AT^LCDTEST=2";
         
+        // 发送关闭LCD指令,确保其他测试时LCD是关闭的
+        QTimer::singleShot(100, this, [this]() {
+            if (isProductionTestRunning && serial && serial->isOpen()) {
+                serial->write("AT^LCDOFF\r\n");
+                qDebug() << "发送指令: AT^LCDOFF (关闭LCD)";
+                ui->recvTextEdit->append(">>> 发送指令: AT^LCDOFF (关闭LCD)");
+            }
+        });
+        
         // 停止LCD定时器,防止重复调用马达测试
         if (lcdTestTimer->isActive()) {
             lcdTestTimer->stop();
@@ -3366,12 +3393,19 @@ void MainWindow::performAudioTest()
     qDebug() << "音频测试通过标准设置为:" << audioLevelStandard;
 
     // 发送录音测试指令:先 AT^AUDIOTEST=5 再 AT^AUDIOTEST=7 <音量>
-    QString audioCmd1 = "AT^AUDIOTEST=5\r\n";
-    serial->write(audioCmd1.toUtf8());
-    qDebug() << "发送录音测试指令1:" << audioCmd1.trimmed();
-
-    // 稍微延迟后发送第二条指令(带音量参数)
-    QTimer::singleShot(200, this, [this]() {
+    QTimer::singleShot(0, this, [this]() {
+        if (!isProductionTestRunning || currentTestStep != TEST_AUDIO) {
+            qDebug() << "录音测试已结束或步骤变化,取消发送AUDIOTEST指令";
+            return;
+        }
+        
+        QString audioCmd1 = "AT^AUDIOTEST=5\r\n";
+        serial->write(audioCmd1.toUtf8());
+        qDebug() << "发送录音测试指令1:" << audioCmd1.trimmed();
+        ui->recvTextEdit->append(">>> 发送指令: AT^AUDIOTEST=5");
+        
+        // 稍微延迟后发送第二条指令(带音量参数)
+        QTimer::singleShot(200, this, [this]() {
         if (!isProductionTestRunning || currentTestStep != TEST_AUDIO) {
             qDebug() << "录音测试已结束或步骤变化,取消发送第二条AUDIOTEST指令";
             return;
@@ -3399,9 +3433,11 @@ void MainWindow::performAudioTest()
         QString audioCmd2 = QString("AT^AUDIOTEST=7 %1\r\n").arg(volume);
         serial->write(audioCmd2.toUtf8());
         qDebug() << "发送录音测试指令2:" << audioCmd2.trimmed();
+        ui->recvTextEdit->append(QString(">>> 发送指令: AT^AUDIOTEST=7 %1").arg(volume));
+        });
     });
 
-    // 启动 8 秒定时器,在此期间统计“fac:mic level:中”
+    // 启动 8 秒定时器,在此期间统计"fac:mic level:中"
     if (audioRecordTimer->isActive()) {
         audioRecordTimer->stop();
     }
diff --git a/releasePackage/LN_Factorytool_V1.4.zip b/releasePackage/LN_Factorytool_V1.4.zip
new file mode 100644 (file)
index 0000000..9dc414c
Binary files /dev/null and b/releasePackage/LN_Factorytool_V1.4.zip differ
diff --git a/releasePackage/LN_Factorytool_V1.4/LeiNiaoFactoryTool.exe b/releasePackage/LN_Factorytool_V1.4/LeiNiaoFactoryTool.exe
new file mode 100644 (file)
index 0000000..d2d8524
Binary files /dev/null and b/releasePackage/LN_Factorytool_V1.4/LeiNiaoFactoryTool.exe differ
diff --git a/releasePackage/LN_Factorytool_V1.4/settings.json b/releasePackage/LN_Factorytool_V1.4/settings.json
new file mode 100644 (file)
index 0000000..ad9e821
--- /dev/null
@@ -0,0 +1,36 @@
+{\r
+    "bootDetectionKeywords": [\r
+        "BuildVer",\r
+        "NAND flash ID",\r
+        "NAND ID:"\r
+    ],\r
+    "factoryModeCheckCommand": "AT^FACTORY",\r
+    "factoryModeKeywords": [\r
+        "FACTORY TEST MODE:"\r
+    ],\r
+    "testCheckboxes": {\r
+        "4g": true,\r
+        "bt": true,\r
+        "btn": true,\r
+        "charge": true,\r
+        "lcd": true,\r
+        "mic": true,\r
+        "ntc": true,\r
+        "vib": true\r
+    },\r
+    "testConfig": {\r
+        "audioLevelStandard": "静音",\r
+        "audioVolume": "2.0",\r
+        "bluetoothAddress": "",\r
+        "bluetoothRSSI": "",\r
+        "expectedModemVer": "EG800AKCN91LCR07A01M04_OCPU_QPY_BETA1022",\r
+        "expectedPYVer": "PY_SRV_V27",\r
+        "expectedVer": "",\r
+        "portName": "COM42 (USB-Enhanced-SERIAL CH343)"\r
+    },\r
+    "versionInfoCommands": [\r
+        "AT^CAT1GETVER",\r
+        "AT^CAT1GETSIGNAL",\r
+        "AT^FACTORY"\r
+    ]\r
+}\r