From: SnickerSun Date: Mon, 8 Dec 2025 06:18:58 +0000 (+0800) Subject: release雷鸟产测 V1.4 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=ad289ee0680056351f79f2e2f5526161eba0c71f;p=mirrors%2Ffactory_tool.git release雷鸟产测 V1.4 lcd测试结束后,主动息屏,解决亮屏造成的音频测试和震动测试卡顿现象。提高测试流畅度和通过率。 --- diff --git a/mainwindow.cpp b/mainwindow.cpp index 18ff20b..67a6f32 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -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 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 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 index 0000000..ad9e821 --- /dev/null +++ b/releasePackage/LN_Factorytool_V1.4/settings.json @@ -0,0 +1,36 @@ +{ + "bootDetectionKeywords": [ + "BuildVer", + "NAND flash ID", + "NAND ID:" + ], + "factoryModeCheckCommand": "AT^FACTORY", + "factoryModeKeywords": [ + "FACTORY TEST MODE:" + ], + "testCheckboxes": { + "4g": true, + "bt": true, + "btn": true, + "charge": true, + "lcd": true, + "mic": true, + "ntc": true, + "vib": true + }, + "testConfig": { + "audioLevelStandard": "静音", + "audioVolume": "2.0", + "bluetoothAddress": "", + "bluetoothRSSI": "", + "expectedModemVer": "EG800AKCN91LCR07A01M04_OCPU_QPY_BETA1022", + "expectedPYVer": "PY_SRV_V27", + "expectedVer": "", + "portName": "COM42 (USB-Enhanced-SERIAL CH343)" + }, + "versionInfoCommands": [ + "AT^CAT1GETVER", + "AT^CAT1GETSIGNAL", + "AT^FACTORY" + ] +}