From c6373f9f34df22f609c62c8a9676e0365ea3767f Mon Sep 17 00:00:00 2001
From: xue <2144439972@qq.com>
Date: Sat, 25 Apr 2026 16:42:53 +0800
Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E7=95=8C=E9=9D=A2=E9=80=BB?=
=?utf8?q?=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
---
mainwindow.cpp | 71 ++------------
mainwindow.h | 7 --
mainwindow.ui | 245 ++++++++++++++++++-------------------------------
3 files changed, 95 insertions(+), 228 deletions(-)
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 29965f2..9cf49f8 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -160,6 +160,13 @@ MainWindow::MainWindow(QWidget *parent)
connect(bluetoothTestTimer, &QTimer::timeout, this, &MainWindow::onBluetoothTestTimer);
connect(gpsTestTimer, &QTimer::timeout, this, &MainWindow::onGpsTestTimer);
connect(gpsPollTimer, &QTimer::timeout, this, &MainWindow::onGpsPollTimer);
+
+ connect(ui->testParamsToggleButton, &QPushButton::toggled, this, [this](bool checked) {
+ ui->testParamsDetailWidget->setVisible(checked);
+ ui->testParamsToggleButton->setText(checked ? QStringLiteral("éèåæ°")
+ : QStringLiteral("æ¾ç¤ºåæ°"));
+ });
+
// åå§åG-sensorééç¶æ
gSensorCollecting = false;
gSensorHasStart = false;
@@ -4313,56 +4320,6 @@ void MainWindow::clearProductionTestState()
qDebug() << "产æµç¶ææ¸
ç©ºå®æ";
}
-void MainWindow::on_agingTestButton_clicked()
-{
- // æ¸
ç©ºææ¬æ¡å
容
- ui->recvTextEdit->clear(); // æ¸
ç©ºä¸²å£æ¥æ¶ææ¬æ¡
- ui->sendTextEdit->clear(); // æ¸
空åéææ¬æ¡
- ui->statusbar->clearMessage(); // æ¸
ç©ºç¶ææ
-
- // æ¸
空设å¤ä¿¡æ¯
- ui->VerlineEdit->clear(); // æ¸
ç©ºçæ¬ä¿¡æ¯
-
- // é置弹çªç¶æ
- lcdTestPopupShown = false;
- motorTestPopupShown = false;
- touchTestPopupShown = false;
- brightTestPopupShown = false;
- deepsleepTestPopupShown = false;
- isWaitingForUserConfirm = false;
- keyTestStarted = false;
-
- // 䏿¸
é¤ç¶ææç¤ºå¨ï¼ä¿ç䏿¬¡æµè¯ç»æä¾æ¥ç
- // ç¨æ·å¯ä»¥ä¸è¾¹æ¥çæµè¯ç»æï¼ä¸è¾¹æ§è¡èåæµè¯
-
- serial->write("AT^FACTORY=2\r\n");
-}
-
-void MainWindow::on_agingTestButton_2_clicked()
-{
- // æ¸
ç©ºææ¬æ¡å
容
- ui->recvTextEdit->clear(); // æ¸
ç©ºä¸²å£æ¥æ¶ææ¬æ¡
- ui->sendTextEdit->clear(); // æ¸
空åéææ¬æ¡
- ui->statusbar->clearMessage(); // æ¸
ç©ºç¶ææ
-
- // æ¸
空设å¤ä¿¡æ¯
- ui->VerlineEdit->clear(); // æ¸
ç©ºçæ¬ä¿¡æ¯
-
- // é置弹çªç¶æ
- lcdTestPopupShown = false;
- motorTestPopupShown = false;
- touchTestPopupShown = false;
- brightTestPopupShown = false;
- deepsleepTestPopupShown = false;
- isWaitingForUserConfirm = false;
- keyTestStarted = false;
-
- // 䏿¸
é¤ç¶ææç¤ºå¨ï¼ä¿ç䏿¬¡æµè¯ç»æä¾æ¥ç
- // ç¨æ·å¯ä»¥ä¸è¾¹æ¥çæµè¯ç»æï¼ä¸è¾¹æ§è¡æ¢å¤åºåæä½
-
- serial->write("AT^RESTORE\r\n");
-}
-
void MainWindow::on_openButton_3_clicked()
{
// æ¸
ç©ºææ¬æ¡å
容
@@ -4524,20 +4481,6 @@ void MainWindow::on_getVersionInfoButton_clicked()
startVersionInfoFetch();
}
-// åãååæµè¯ãæé®ï¼åéå
³æºæä»¤ AT^POWEROFF
-void MainWindow::on_pushButtonStressTest_clicked()
-{
- if (!serial || !serial->isOpen()) {
- QMessageBox::warning(this, "å
³æº", "请å
æå¼ä¸²å£åååéå
³æºæä»¤");
- return;
- }
- ui->recvTextEdit->append(">>> åéæä»¤: AT^POWEROFF (æå¨å
³æº)");
- serial->write("AT^POWEROFF\r\n");
- qDebug() << "æå¨åéå
³æºæä»¤: AT^POWEROFF";
- ui->statusbar->showMessage("å·²åéå
³æºæä»¤ AT^POWEROFF", 3000);
- appendToLogFile("=== åéå
³æºæä»¤: AT^POWEROFF ===\n");
-}
-
// ä¿åæµè¯åæ°å°settings.json
void MainWindow::saveTestConfigToSettings()
{
diff --git a/mainwindow.h b/mainwindow.h
index 9c67733..a8d1ab7 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -116,17 +116,10 @@ private slots:
void parseWstpPrintData(const QString& data); // è§£æwstp_printæ ¼å¼çBTMACåCyweeChipInfoæ°æ®
- void on_agingTestButton_clicked();
-
- void on_agingTestButton_2_clicked();
-
void on_openButton_3_clicked();
// çæ¬ä¿¡æ¯è·åæé®
void on_getVersionInfoButton_clicked();
-
- // å
³æºæé®ï¼çé¢åãååæµè¯ãæ§½åæªæ¹ï¼é¿å
ç ´å uic èªå¨è¿æ¥ï¼
- void on_pushButtonStressTest_clicked();
private:
Ui::MainWindow *ui;
diff --git a/mainwindow.ui b/mainwindow.ui
index 2381a98..90107d3 100644
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -45,106 +45,21 @@
6
- -
-
-
- Qt::Horizontal
-
-
-
- -
-
-
-
-
-
-
- Arial Black
- 75
- true
-
-
-
- èåæµè¯ï¼
-
-
-
- -
-
-
- false
-
-
- QPushButton {
-background-color: #C62828;
-color: white;
-border-radius: 4px;
-font-weight: bold;
-}
-QPushButton:hover {
-background-color: #B71C1C;
-}
-
-
- å
³æº
-
-
-
- -
-
-
-
- Agra
- 14
-
-
-
- èåç»æ
-
-
-
- -
-
-
-
- Agra
- 14
- 75
- true
-
-
-
- QPushButton {
-background-color: #9C27B0;
-color: white;
-border-radius: 4px;
-font-weight: bold;
-}
-QPushButton:hover {
-background-color: #7B1FA2;
-}
-
-
- èåæµè¯
-
-
-
-
-
- -
-
+
-
+
- Agra
+ Arial
14
-
- æ¸
ç©ºæ°æ®
+
+ QComboBox::AdjustToContentsOnFirstShow
- -
-
+
-
+
Agra
@@ -152,7 +67,7 @@ background-color: #7B1FA2;
- è·å设å¤ä¿¡æ¯
+ æå¼ä¸²å£
@@ -169,34 +84,21 @@ background-color: #7B1FA2;
- -
-
+
-
+
Agra
14
- 75
- true
-
- QPushButton {
-background-color: #9C27B0;
-color: white;
-border-radius: 4px;
-font-weight: bold;
-}
-QPushButton:hover {
-background-color: #7B1FA2;
-}
-
- æ¢å¤åºå
+ æ¸
ç©ºæ°æ®
- -
-
+
-
+
Agra
@@ -204,31 +106,11 @@ background-color: #7B1FA2;
- æå¼ä¸²å£
-
-
-
- -
-
-
-
- Arial
- 14
-
-
-
- QComboBox::AdjustToContentsOnFirstShow
-
-
-
- -
-
-
- Qt::Horizontal
+ è·å设å¤ä¿¡æ¯
- -
+
-
@@ -244,6 +126,8 @@ background-color: #FF9800;
color: white;
border-radius: 4px;
font-weight: bold;
+padding: 10px 12px;
+min-height: 48px;
}
QPushButton:hover {
background-color: #F57C00;
@@ -266,21 +150,65 @@ background-color: #F57C00;
-
-
-
-
- Arial Black
- 75
- true
-
-
-
- æµè¯åæ°åéè¿æ åï¼
+
+
+ 6
-
+
-
+
+
+
+ Arial Black
+ 75
+ true
+
+
+
+
+ 1
+ 0
+
+
+
+ æµè¯åæ°åéè¿æ åï¼
+
+
+
+ -
+
+
+ éèåæ°
+
+
+ true
+
+
+ true
+
+
+
+
-
-
+
+
+
+ 6
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
å½é³é³é:
@@ -319,19 +247,17 @@ background-color: #F57C00;
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- -
-
-
-
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
-
+
ç®æ åºä»¶çæ¬:
@@ -625,6 +551,11 @@ background-color: #F57C00;
+
+
+
+
+
-
--
2.17.1