中间版本
authorSnickerSun <snickersun@163.com>
Sun, 10 Nov 2024 20:51:24 +0000 (04:51 +0800)
committerSnickerSun <snickersun@163.com>
Sun, 10 Nov 2024 20:51:24 +0000 (04:51 +0800)
15 files changed:
CMakeLists.txt
HiBTMacWriteTool.pro [moved from factory_tool.pro with 64% similarity]
dialogsettings.cpp [new file with mode: 0644]
dialogsettings.h [new file with mode: 0644]
mac_settings.ui [new file with mode: 0644]
mainwindow.cpp
mainwindow.h
mainwindow.ui
mythread.h
result_thread.cpp
result_thread.h
settings.cpp [new file with mode: 0644]
settings.h [new file with mode: 0644]
sqldbmanager.cpp [new file with mode: 0644]
sqldbmanager.h [new file with mode: 0644]

index b893ae5..fc23893 100644 (file)
@@ -27,7 +27,7 @@ set(RC_ICONS windows.ico)
 find_package(Qt5 COMPONENTS Widgets LinguistTools REQUIRED)\r
 \r
 set(TS_FILES untitled_zh_CN.ts)\r
-include_directories(${CMAKE_SOURCE_DIR})\r
+include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})\r
 if(ANDROID)\r
   add_library(SHARED\r
     main.cpp\r
@@ -45,24 +45,18 @@ else()
     mainwindow.ui\r
     mythread.h\r
     mythread.cpp\r
-    custom.h\r
-    custom.cpp\r
     Demoqrc.qrc\r
     demopng.rc\r
-    at_data.cpp\r
-    at_data.h\r
     result_thread.cpp\r
     result_thread.h\r
-    common.h\r
     ${TS_FILES}\r
   )\r
 endif()\r
 \r
 target_link_libraries( PRIVATE\r
                       Qt5::Widgets\r
-                      ${CMAKE_SOURCE_DIR}/lib/libwireless_tools.dll)\r
-target_link_libraries( PRIVATE\r
-                      Qt5::Widgets\r
-                      ${CMAKE_SOURCE_DIR}/lib/libsecurec.a)\r
+                      Qt5::SerialPort\r
+                      )\r
+\r
 \r
 qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})\r
similarity index 64%
rename from factory_tool.pro
rename to HiBTMacWriteTool.pro
index 4b23984..15bd036 100644 (file)
@@ -4,34 +4,37 @@
 #\r
 #-------------------------------------------------\r
 \r
-QT       += core gui\r
+QT       += core gui sql serialport\r
 \r
 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets\r
 \r
-TARGET = factory_tool\r
+TARGET = HiBTMacWriteTool\r
 TEMPLATE = app\r
 \r
 \r
 SOURCES += main.cpp\\r
         mainwindow.cpp \\r
-    at_data.cpp \\r
-    custom.cpp \\r
     mythread.cpp \\r
     result_thread.cpp \\r
-    wrtm_class.cpp\r
+    custom.cpp \\r
+    sqldbmanager.cpp \\r
+    settings.cpp \\r
+    dialogsettings.cpp\r
 \r
 HEADERS  += mainwindow.h \\r
-    Library_global.h \\r
-    at_data.h \\r
-    common.h \\r
-    custom.h \\r
-    info.h \\r
-    interface.h \\r
     mythread.h \\r
     result_thread.h \\r
-    header.h\r
+    common.h \\r
+    custom.h \\r
+    sqldbmanager.h \\r
+    settings.h \\r
+    dialogsettings.h\r
+\r
+#HEADERS  +=  ui_mac_settings.h \\r
+#    ui_mainwindow.h\r
 \r
-FORMS    += mainwindow.ui\r
+FORMS    += mainwindow.ui \\r
+    mac_settings.ui\r
 \r
 DISTFILES += \\r
     CMakeLists.txt \\r
@@ -43,8 +46,8 @@ DEPENDPATH += $$PWD/.
 \r
 \r
 LIBS += -L$$PWD/lib/\r
-LIBS += libsecurec.a\r
-LIBS += -ldiag\r
+\r
+\r
 LIBS += -lAdvapi32\r
 \r
 \r
diff --git a/dialogsettings.cpp b/dialogsettings.cpp
new file mode 100644 (file)
index 0000000..b9f402b
--- /dev/null
@@ -0,0 +1,58 @@
+#include "dialogsettings.h"\r
+#include <QDebug>\r
+#include "settings.h"\r
+DialogSettings::DialogSettings():g_dialogSettings(new Ui::Dialog())\r
+{\r
+    g_dialogSettings->setupUi(this);\r
+    update_view();\r
+}\r
+\r
+void DialogSettings::accept()\r
+{\r
+  qDebug()<<"accept ";\r
+//  this->close();\r
+ settings::getInstance().create_new_database();\r
+  this->done(1);\r
+}\r
+\r
+void DialogSettings::reject()\r
+{\r
+    qDebug()<<"reject";\r
+//    this->close();\r
+    this->done(0);\r
+}\r
+\r
+void DialogSettings::update_view()\r
+{\r
+    qDebug()<<"update_view";\r
+    QString prefix=g_dialogSettings->lineedit_prefix->text();\r
+    QString mac_start=g_dialogSettings->lineedit_mac_start->text();\r
+    QString mac_count=g_dialogSettings->lineedit_mac_count->text();\r
+    bool num_is_ok=true;\r
+    QString status="";\r
+    if (mac_start.length() != 6 )\r
+    {\r
+        qDebug()<< "mac_start !=  6";\r
+        status.append("mac地址开始长度只能为6!\n");\r
+        num_is_ok = false;\r
+    }\r
+    if (prefix.length() != 6)\r
+    {\r
+        qDebug()<< "prefix !=  6";\r
+        status.append("mac地址固定头长度只能为6!\n");\r
+        num_is_ok = false;\r
+    }\r
+    if (num_is_ok == true)\r
+    {\r
+        int ret = settings::getInstance().mac_config(prefix,mac_count,mac_start);\r
+        qDebug()<< "save settings ret "<<ret;\r
+        if (ret == 0)\r
+            status.append(settings::getInstance().getmacStatus());\r
+        else if (ret == 1)\r
+            status.append("mac 地址数量过大");\r
+        else\r
+            status.append("mac地址生成失败,错误码 ").append(ret);\r
+    }\r
+     g_dialogSettings->label_mac_status->setText(status);\r
+\r
+}\r
diff --git a/dialogsettings.h b/dialogsettings.h
new file mode 100644 (file)
index 0000000..853aecf
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef DIALOGSETTINGS_H\r
+#define DIALOGSETTINGS_H\r
+\r
+#include "ui_mac_settings.h"\r
+#include "settings.h"\r
+QT_BEGIN_NAMESPACE\r
+namespace Ui {\r
+class Dialog;\r
+}\r
+QT_END_NAMESPACE\r
+class DialogSettings : public QDialog\r
+{\r
+    Q_OBJECT\r
+public:\r
+    DialogSettings();\r
+\r
+private slots:\r
+    void accept();\r
+    void reject();\r
+    void update_view();\r
+private:\r
+    Ui::Dialog  *g_dialogSettings;\r
+};\r
+\r
+#endif // DIALOGSETTINGS_H\r
diff --git a/mac_settings.ui b/mac_settings.ui
new file mode 100644 (file)
index 0000000..db2950e
--- /dev/null
@@ -0,0 +1,280 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<ui version="4.0">\r
+ <class>Dialog</class>\r
+ <widget class="QDialog" name="Dialog">\r
+  <property name="geometry">\r
+   <rect>\r
+    <x>0</x>\r
+    <y>0</y>\r
+    <width>506</width>\r
+    <height>400</height>\r
+   </rect>\r
+  </property>\r
+  <property name="windowTitle">\r
+   <string>Dialog</string>\r
+  </property>\r
+  <widget class="QDialogButtonBox" name="buttonBox">\r
+   <property name="geometry">\r
+    <rect>\r
+     <x>130</x>\r
+     <y>340</y>\r
+     <width>341</width>\r
+     <height>32</height>\r
+    </rect>\r
+   </property>\r
+   <property name="layoutDirection">\r
+    <enum>Qt::LeftToRight</enum>\r
+   </property>\r
+   <property name="orientation">\r
+    <enum>Qt::Horizontal</enum>\r
+   </property>\r
+   <property name="standardButtons">\r
+    <set>QDialogButtonBox::Cancel|QDialogButtonBox::Save</set>\r
+   </property>\r
+  </widget>\r
+  <widget class="QLabel" name="label_2">\r
+   <property name="geometry">\r
+    <rect>\r
+     <x>30</x>\r
+     <y>98</y>\r
+     <width>304</width>\r
+     <height>32</height>\r
+    </rect>\r
+   </property>\r
+   <property name="sizePolicy">\r
+    <sizepolicy hsizetype="Preferred" vsizetype="Fixed">\r
+     <horstretch>0</horstretch>\r
+     <verstretch>0</verstretch>\r
+    </sizepolicy>\r
+   </property>\r
+   <property name="font">\r
+    <font>\r
+     <family>Arial</family>\r
+     <pointsize>14</pointsize>\r
+    </font>\r
+   </property>\r
+   <property name="text">\r
+    <string>蓝牙地址开始:</string>\r
+   </property>\r
+  </widget>\r
+  <widget class="QLabel" name="label">\r
+   <property name="geometry">\r
+    <rect>\r
+     <x>30</x>\r
+     <y>10</y>\r
+     <width>304</width>\r
+     <height>32</height>\r
+    </rect>\r
+   </property>\r
+   <property name="sizePolicy">\r
+    <sizepolicy hsizetype="Preferred" vsizetype="Fixed">\r
+     <horstretch>0</horstretch>\r
+     <verstretch>0</verstretch>\r
+    </sizepolicy>\r
+   </property>\r
+   <property name="font">\r
+    <font>\r
+     <family>Arial</family>\r
+     <pointsize>14</pointsize>\r
+    </font>\r
+   </property>\r
+   <property name="text">\r
+    <string>蓝牙Mac地址Prefix:</string>\r
+   </property>\r
+  </widget>\r
+  <widget class="QLineEdit" name="lineedit_mac_start">\r
+   <property name="geometry">\r
+    <rect>\r
+     <x>30</x>\r
+     <y>139</y>\r
+     <width>441</width>\r
+     <height>38</height>\r
+    </rect>\r
+   </property>\r
+   <property name="font">\r
+    <font>\r
+     <family>Arial</family>\r
+     <pointsize>14</pointsize>\r
+    </font>\r
+   </property>\r
+   <property name="text">\r
+    <string>01012D</string>\r
+   </property>\r
+  </widget>\r
+  <widget class="QLineEdit" name="lineedit_prefix">\r
+   <property name="geometry">\r
+    <rect>\r
+     <x>30</x>\r
+     <y>51</y>\r
+     <width>441</width>\r
+     <height>38</height>\r
+    </rect>\r
+   </property>\r
+   <property name="font">\r
+    <font>\r
+     <family>Arial</family>\r
+     <pointsize>14</pointsize>\r
+    </font>\r
+   </property>\r
+   <property name="text">\r
+    <string>281106</string>\r
+   </property>\r
+  </widget>\r
+  <widget class="QLineEdit" name="lineedit_mac_count">\r
+   <property name="geometry">\r
+    <rect>\r
+     <x>30</x>\r
+     <y>227</y>\r
+     <width>441</width>\r
+     <height>38</height>\r
+    </rect>\r
+   </property>\r
+   <property name="font">\r
+    <font>\r
+     <family>Arial</family>\r
+     <pointsize>14</pointsize>\r
+    </font>\r
+   </property>\r
+   <property name="text">\r
+    <string>1000</string>\r
+   </property>\r
+  </widget>\r
+  <widget class="QLabel" name="label_3">\r
+   <property name="geometry">\r
+    <rect>\r
+     <x>30</x>\r
+     <y>186</y>\r
+     <width>304</width>\r
+     <height>32</height>\r
+    </rect>\r
+   </property>\r
+   <property name="sizePolicy">\r
+    <sizepolicy hsizetype="Preferred" vsizetype="Fixed">\r
+     <horstretch>0</horstretch>\r
+     <verstretch>0</verstretch>\r
+    </sizepolicy>\r
+   </property>\r
+   <property name="font">\r
+    <font>\r
+     <family>Arial</family>\r
+     <pointsize>14</pointsize>\r
+    </font>\r
+   </property>\r
+   <property name="text">\r
+    <string>蓝牙地址个数</string>\r
+   </property>\r
+  </widget>\r
+  <widget class="QLabel" name="label_mac_status">\r
+   <property name="geometry">\r
+    <rect>\r
+     <x>30</x>\r
+     <y>270</y>\r
+     <width>441</width>\r
+     <height>61</height>\r
+    </rect>\r
+   </property>\r
+   <property name="sizePolicy">\r
+    <sizepolicy hsizetype="Preferred" vsizetype="Fixed">\r
+     <horstretch>0</horstretch>\r
+     <verstretch>0</verstretch>\r
+    </sizepolicy>\r
+   </property>\r
+   <property name="font">\r
+    <font>\r
+     <family>Arial</family>\r
+     <pointsize>14</pointsize>\r
+    </font>\r
+   </property>\r
+   <property name="text">\r
+    <string>28110601012D 至 2811060287CD\r
+ 共 100000 个地址</string>\r
+   </property>\r
+  </widget>\r
+ </widget>\r
+ <resources/>\r
+ <connections>\r
+  <connection>\r
+   <sender>buttonBox</sender>\r
+   <signal>accepted()</signal>\r
+   <receiver>Dialog</receiver>\r
+   <slot>accept()</slot>\r
+   <hints>\r
+    <hint type="sourcelabel">\r
+     <x>248</x>\r
+     <y>254</y>\r
+    </hint>\r
+    <hint type="destinationlabel">\r
+     <x>157</x>\r
+     <y>274</y>\r
+    </hint>\r
+   </hints>\r
+  </connection>\r
+  <connection>\r
+   <sender>buttonBox</sender>\r
+   <signal>rejected()</signal>\r
+   <receiver>Dialog</receiver>\r
+   <slot>reject()</slot>\r
+   <hints>\r
+    <hint type="sourcelabel">\r
+     <x>316</x>\r
+     <y>260</y>\r
+    </hint>\r
+    <hint type="destinationlabel">\r
+     <x>286</x>\r
+     <y>274</y>\r
+    </hint>\r
+   </hints>\r
+  </connection>\r
+  <connection>\r
+   <sender>lineedit_prefix</sender>\r
+   <signal>textChanged(QString)</signal>\r
+   <receiver>Dialog</receiver>\r
+   <slot>update_view()</slot>\r
+   <hints>\r
+    <hint type="sourcelabel">\r
+     <x>250</x>\r
+     <y>69</y>\r
+    </hint>\r
+    <hint type="destinationlabel">\r
+     <x>252</x>\r
+     <y>199</y>\r
+    </hint>\r
+   </hints>\r
+  </connection>\r
+  <connection>\r
+   <sender>lineedit_mac_start</sender>\r
+   <signal>textChanged(QString)</signal>\r
+   <receiver>Dialog</receiver>\r
+   <slot>update_view()</slot>\r
+   <hints>\r
+    <hint type="sourcelabel">\r
+     <x>250</x>\r
+     <y>157</y>\r
+    </hint>\r
+    <hint type="destinationlabel">\r
+     <x>252</x>\r
+     <y>199</y>\r
+    </hint>\r
+   </hints>\r
+  </connection>\r
+  <connection>\r
+   <sender>lineedit_mac_count</sender>\r
+   <signal>textChanged(QString)</signal>\r
+   <receiver>Dialog</receiver>\r
+   <slot>update_view()</slot>\r
+   <hints>\r
+    <hint type="sourcelabel">\r
+     <x>250</x>\r
+     <y>245</y>\r
+    </hint>\r
+    <hint type="destinationlabel">\r
+     <x>252</x>\r
+     <y>199</y>\r
+    </hint>\r
+   </hints>\r
+  </connection>\r
+ </connections>\r
+ <slots>\r
+  <slot>update_view()</slot>\r
+ </slots>\r
+</ui>\r
index 0ccf2cf..0d0b57f 100644 (file)
@@ -1,17 +1,54 @@
 #include "mainwindow.h"\r
-#include "./ui_mainwindow.h"\r
+#include "ui_mainwindow.h"\r
+#include "dialogsettings.h"\r
+#include <QDesktopServices>\r
 // 初始化线程、状态寄存器、配置信息\r
 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)\r
 {\r
     ui->setupUi(this);\r
-    result_thread = new Result_Thread(this);\r
-    result_thread->start();\r
-    result_thread->pause();\r
-    at_handler = new At_Process(this);\r
+    serialport1 = new QSerialPort();\r
+    serialport2 = new QSerialPort();\r
+    serialport3 = new QSerialPort();\r
+    serialport4 = new QSerialPort();\r
+    result_thread1 = new Result_Thread(this,1);\r
+    result_thread2 = new Result_Thread(this,2);\r
+    result_thread3 = new Result_Thread(this,3);\r
+    result_thread4 = new Result_Thread(this,4);\r
+    result_thread1->start();\r
+    result_thread1->pause();\r
+    result_thread2->start();\r
+    result_thread2->pause();\r
+    result_thread3->start();\r
+    result_thread3->pause();\r
+    result_thread4->start();\r
+    result_thread4->pause();\r
     ui_setting_read();\r
-    at_set_bt_format();\r
+    connect(serialport1, &QSerialPort::readyRead, this, &MainWindow::readData1);\r
+}\r
+void MainWindow::readData1()\r
+{\r
+    const QByteArray data = serialport1->readAll();\r
+    qDebug()<<data;\r
+//    m_console->putData(data);\r
+}\r
+void MainWindow::readData2()\r
+{\r
+    const QByteArray data = serialport2->readAll();\r
+    qDebug()<<data;\r
+//    m_console->putData(data);\r
+}\r
+void MainWindow::readData3()\r
+{\r
+    const QByteArray data = serialport3->readAll();\r
+    qDebug()<<data;\r
+//    m_console->putData(data);\r
+}\r
+void MainWindow::readData4()\r
+{\r
+    const QByteArray data = serialport4->readAll();\r
+    qDebug()<<data;\r
+//    m_console->putData(data);\r
 }\r
-\r
 //  结束线程\r
 MainWindow::~MainWindow()\r
 {\r
@@ -24,22 +61,24 @@ MainWindow::~MainWindow()
         spp_connected_handle = NULL;\r
     }\r
     ui_setting_save();\r
-    result_thread->stop();\r
-    result_thread->wait();\r
-    if (transmit_timer_handle != NULL) {\r
-        transmit_timer_handle->stop();\r
-        transmit_timer_handle = NULL;\r
-    }\r
-    if (ui->pbtn_open_uart->isChecked()) {\r
-        if (uapi_uart_close() == TRUE) {\r
-        }\r
-    }\r
-    delete result_thread;\r
-    delete at_handler;\r
+    result_thread1->stop();\r
+    result_thread1->wait();\r
+    result_thread2->stop();\r
+    result_thread2->wait();\r
+    result_thread3->stop();\r
+    result_thread3->wait();\r
+    result_thread4->stop();\r
+    result_thread4->wait();\r
+\r
+\r
+    delete result_thread1;\r
+    delete result_thread2;\r
+    delete result_thread3;\r
+    delete result_thread4;\r
     delete ui;\r
 }\r
 \r
-void MainWindow::ui_display(QString str,bool inOrOut)\r
+void MainWindow::ui_display1(QString str,bool inOrOut)\r
 {\r
 //    QTime Time= QTime::currentTime();//获取系统当前的时间\r
 //    QString str_time = Time.toString("[hh:mm:ss ");//格式化时间\r
@@ -59,47 +98,67 @@ void MainWindow::ui_display(QString str,bool inOrOut)
     ui->txtb_dispaly->insertPlainText(str);\r
     ui->txtb_dispaly->moveCursor(QTextCursor::End);\r
 }\r
-\r
-void MainWindow::ui_tab_mainwindow_complete()\r
+void MainWindow::ui_display2(QString str,bool inOrOut)\r
 {\r
-    if (ui->stkw_stage->currentIndex() == PAGE_COMPLETE) {\r
-        ui->action_complete->setChecked(true);\r
-        return;\r
-    }\r
-    ui->stkw_stage->setCurrentIndex(PAGE_COMPLETE);\r
-    ui->ledit_spp_addr->setEnabled(true);\r
-    ui->connected_flag->setStyleSheet("QPushButton{background-color: rgb(255, 0, 0);}");\r
-    if (spp_connected_handle != NULL) {\r
-        spp_connected_handle->start(1500);\r
-    }\r
-    if (ui->action_board->isChecked()) {\r
-        ui->action_board->setChecked(false);\r
-    }\r
-    if(ui->pbtn_open_uart->isChecked()){\r
-        uart_close();\r
+//    QTime Time= QTime::currentTime();//获取系统当前的时间\r
+//    QString str_time = Time.toString("[hh:mm:ss ");//格式化时间\r
+    ui->txtb_dispaly_2->moveCursor(QTextCursor::End);\r
+    if(inOrOut){\r
+        ui->txtb_dispaly_2->setTextColor(QColor(127, 255, 0));\r
+    }else{\r
+        ui->txtb_dispaly_2->setTextColor(Qt::red);\r
     }\r
+//    if(inOrOut){\r
+//        str_time.append("IN] : ");\r
+//    }else{\r
+//        str_time.append("OUT] : ");\r
+//    }\r
+//    str.prepend(str_time);\r
+//    str+="\r\n";\r
+    ui->txtb_dispaly_2->insertPlainText(str);\r
+    ui->txtb_dispaly_2->moveCursor(QTextCursor::End);\r
 }\r
-void MainWindow::ui_tab_mainwindow_board()\r
+void MainWindow::ui_display3(QString str,bool inOrOut)\r
 {\r
-    if (ui->stkw_stage->currentIndex() == PAGE_BOARD) {\r
-        ui->action_board->setChecked(true);\r
-        return;\r
-    }\r
-    ui->stkw_stage->setCurrentIndex(PAGE_BOARD);\r
-    ui->ledit_spp_addr->setEnabled(false);\r
-    ui->connected_flag->setStyleSheet("QPushButton{background-color: rgb(240, 240, 240);}");\r
-    if (spp_connected_handle != NULL) {\r
-        spp_connected_handle->stop();\r
-    }\r
-    dongle_is_connected = false;\r
-    if (ui->action_complete->isChecked()) {\r
-        ui->action_complete->setChecked(false);\r
+//    QTime Time= QTime::currentTime();//获取系统当前的时间\r
+//    QString str_time = Time.toString("[hh:mm:ss ");//格式化时间\r
+    ui->txtb_dispaly_3->moveCursor(QTextCursor::End);\r
+    if(inOrOut){\r
+        ui->txtb_dispaly_3->setTextColor(QColor(127, 255, 0));\r
+    }else{\r
+        ui->txtb_dispaly_3->setTextColor(Qt::red);\r
     }\r
-    if(ui->pbtn_open_uart->isChecked()){\r
-        uart_close();\r
+//    if(inOrOut){\r
+//        str_time.append("IN] : ");\r
+//    }else{\r
+//        str_time.append("OUT] : ");\r
+//    }\r
+//    str.prepend(str_time);\r
+//    str+="\r\n";\r
+    ui->txtb_dispaly_3->insertPlainText(str);\r
+    ui->txtb_dispaly_3->moveCursor(QTextCursor::End);\r
+}\r
+void MainWindow::ui_display4(QString str,bool inOrOut)\r
+{\r
+//    QTime Time= QTime::currentTime();//获取系统当前的时间\r
+//    QString str_time = Time.toString("[hh:mm:ss ");//格式化时间\r
+    ui->txtb_dispaly_4->moveCursor(QTextCursor::End);\r
+    if(inOrOut){\r
+        ui->txtb_dispaly_4->setTextColor(QColor(127, 255, 0));\r
+    }else{\r
+        ui->txtb_dispaly_4->setTextColor(Qt::red);\r
     }\r
-\r
+//    if(inOrOut){\r
+//        str_time.append("IN] : ");\r
+//    }else{\r
+//        str_time.append("OUT] : ");\r
+//    }\r
+//    str.prepend(str_time);\r
+//    str+="\r\n";\r
+    ui->txtb_dispaly_4->insertPlainText(str);\r
+    ui->txtb_dispaly_4->moveCursor(QTextCursor::End);\r
 }\r
+\r
 void MainWindow::ui_save_windows()\r
 {\r
     QString fname = QFileDialog::getExistingDirectory(this, "请选择文件");\r
@@ -120,36 +179,11 @@ void MainWindow::ui_setting_save()
 \r
     // 写入第一组数据\r
     settings->beginGroup("Uart_setting");\r
-    settings->setValue("uart_com", ui->cbox_uart_com_select->currentText());\r
+    settings->setValue("uart_com", ui->cbox_uart_com_select_1->currentText());\r
     settings->setValue("uart_baud", ui->cbox_uart_baud_select->currentIndex());\r
-    settings->setValue("spp_addr", ui->ledit_spp_addr->text());\r
+//    settings->setValue("spp_addr", ui->ledit_spp_addr->text());\r
     settings->sync();\r
     settings->endGroup();\r
-    // 写入第二组数据\r
-    settings->beginGroup("Download_Setting");\r
-    settings->setValue("download_board_path", ui->ledit_formboad_bordpath->text());\r
-    settings->setValue("download_local_path", ui->ledit_frombord_savefilepath->text());\r
-    settings->sync();\r
-    settings->endGroup();\r
-\r
-    settings->beginGroup("Upload_Setting");\r
-    settings->setValue("upload_board_path", ui->ledit_toboard_boardpath->text());\r
-    settings->setValue("upload_local_path", ui->ledit_toboard_filepath->text());\r
-    settings->sync();\r
-    settings->endGroup();\r
-\r
-    settings->beginGroup("At_Setting");\r
-    settings->setValue("at_mediamusicplay", ui->ledit_at_mediamusicplay->text());\r
-    settings->setValue("at_mediaaudiorecord", ui->ledit_at_mediaaudiorecord->text());\r
-    settings->setValue("at_fsrm", ui->ledit_at_fsrm->text());\r
-    settings->setValue("at_delay_ms", ui->ledit_delay_ms->text());\r
-    settings->setValue("at_spp_addr", ui->ledit_dongle_mac->text());\r
-    settings->setValue("custom_module_id", ui->ledit_at_custom_moduleId->text());\r
-    settings->setValue("custom_cmd_id", ui->ledit_at_custom_CmdId->text());\r
-    settings->setValue("custom_payload", ui->ledit_at_custom_Payload->text());\r
-    settings->sync();\r
-    settings->endGroup();\r
-\r
     delete settings;\r
     settings = nullptr;\r
 }\r
@@ -158,38 +192,51 @@ void MainWindow::ui_setting_read()
 {\r
     uart_com_select();\r
     QSettings *settings = new QSettings("Setting.ini", QSettings::IniFormat);\r
-    ui->cbox_uart_com_select->ChangeItem(settings->value("Uart_setting/uart_com").toString());\r
+    ui->cbox_uart_com_select_1->ChangeItem(settings->value("Uart_setting/uart_com").toString());\r
     ui->cbox_uart_baud_select->setCurrentIndex(settings->value("Uart_setting/uart_baud").toInt());\r
-    ui->ledit_spp_addr->setText(settings->value("Uart_setting/spp_addr").toString());\r
-    ui->tbw_stage_complete->setEnabled(true);\r
-    ui->ledit_formboad_bordpath->setText(settings->value("Download_Setting/download_board_path").toString());\r
-    ui->ledit_frombord_savefilepath->setText(settings->value("Download_Setting/download_local_path").toString());\r
-    ui->ledit_toboard_boardpath->setText(settings->value("Upload_Setting/upload_board_path").toString());\r
-    ui->ledit_toboard_filepath->setText(settings->value("Upload_Setting/upload_local_path").toString());\r
-    ui->ledit_at_mediamusicplay->setText(settings->value("At_Setting/at_mediamusicplay").toString());\r
-    ui->ledit_at_mediaaudiorecord->setText(settings->value("At_Setting/at_mediaaudiorecord").toString());\r
-    ui->ledit_at_fsrm->setText(settings->value("At_Setting/at_fsrm").toString());\r
-    ui->ledit_delay_ms->setText(settings->value("At_Setting/at_delay_ms").toString());\r
-    ui->ledit_dongle_mac->setText(settings->value("At_Setting/at_spp_addr").toString());\r
-    ui->ledit_at_custom_moduleId->setText(settings->value("At_Setting/custom_module_id").toString());\r
-    ui->ledit_at_custom_CmdId->setText(settings->value("At_Setting/custom_cmd_id").toString());\r
-    ui->ledit_at_custom_Payload->setText(settings->value("At_Setting/custom_payload").toString());\r
-    ui->tbw_stage_complete->setEnabled(false);\r
-    ui->ledit_btlo_channel->setText("0");\r
-    ui->ledit_btpwr_powerchip->setText("2");\r
 }\r
 \r
 \r
 /* --------------------------------uart操作--------------------------- */\r
-void MainWindow::uart_process()\r
+void MainWindow::uart_process1()\r
 {\r
-    if (ui->pbtn_open_uart->isChecked()) {\r
-        QString str_com = ui->cbox_uart_com_select->currentText();\r
+//    if (ui->pbtn_open_uart->isChecked()) {\r
+        QString str_com = ui->cbox_uart_com_select_1->currentText();\r
         QString str_uart_baud = ui->cbox_uart_baud_select->currentText();\r
-        uart_open(str_com,str_uart_baud);\r
-    } else {\r
-        uart_close();\r
-    }\r
+//        uart_open(str_com,str_uart_baud);\r
+//    } else {\r
+//        uart_close();\r
+//    }\r
+}\r
+void MainWindow::uart_process2()\r
+{\r
+//    if (ui->pbtn_open_uart->isChecked()) {\r
+        QString str_com = ui->cbox_uart_com_select_1->currentText();\r
+        QString str_uart_baud = ui->cbox_uart_baud_select->currentText();\r
+//        uart_open(str_com,str_uart_baud);\r
+//    } else {\r
+//        uart_close();\r
+//    }\r
+}\r
+void MainWindow::uart_process3()\r
+{\r
+//    if (ui->pbtn_open_uart->isChecked()) {\r
+        QString str_com = ui->cbox_uart_com_select_1->currentText();\r
+        QString str_uart_baud = ui->cbox_uart_baud_select->currentText();\r
+//        uart_open(str_com,str_uart_baud);\r
+//    } else {\r
+//        uart_close();\r
+//    }\r
+}\r
+void MainWindow::uart_process4()\r
+{\r
+//    if (ui->pbtn_open_uart->isChecked()) {\r
+        QString str_com = ui->cbox_uart_com_select_1->currentText();\r
+        QString str_uart_baud = ui->cbox_uart_baud_select->currentText();\r
+//        uart_open(str_com,str_uart_baud);\r
+//    } else {\r
+//        uart_close();\r
+//    }\r
 }\r
 void MainWindow::uart_open(QString com,QString com_baud)\r
 {\r
@@ -202,6 +249,7 @@ void MainWindow::uart_open(QString com,QString com_baud)
     } else {\r
       (void)sprintf_s(buf, "\\\\.\\COM%d", comNumber);\r
     }\r
+   #if 0\r
     if (uapi_uart_open(buf, band)) {\r
        uapi_uart_callback_register(uart_callback);\r
        result_thread->resume();\r
@@ -214,7 +262,6 @@ void MainWindow::uart_open(QString com,QString com_baud)
            ui->tbw_stage_board->setEnabled(true);\r
 //           uapi_uart_set_currentMode(0);\r
        }\r
-\r
        ui->pbtn_open_uart->setText("关闭串口");\r
        ui_display("open uart success.\r\n",false);\r
        if(!ui->pbtn_open_uart->isChecked()){\r
@@ -225,9 +272,12 @@ void MainWindow::uart_open(QString com,QString com_baud)
             QMessageBox::warning(this, tr("SerialPort"), tr("Open SerialPort failed"), QMessageBox::Ok);\r
             ui->pbtn_open_uart->setChecked(false);\r
     }\r
+    #endif\r
+\r
 }\r
 void MainWindow::uart_close()\r
 {\r
+    #if 0\r
         if (uapi_uart_close() == TRUE) {\r
             result_thread->pause();\r
 //            ui_display("close uart success.\r\n",false);\r
@@ -249,106 +299,160 @@ void MainWindow::uart_close()
         } else {\r
 //            ui_display("close uart fail.\r\n",false);\r
         }\r
+        #endif\r
 }\r
-void MainWindow::uart_send_data()\r
+void MainWindow::uart_send_data1(QString cmd)\r
 {\r
     QString str;\r
     int buf_len = 0;\r
     char* buf = nullptr;\r
-    if(ui->stkw_stage->currentIndex() == PAGE_COMPLETE){\r
-        str = ui->tedit_input_data->toPlainText();\r
-    }else{\r
-        str = ui->tedit_input_data_board->toPlainText();\r
-    }\r
-    uapi_uart_callback_register(uart_callback);\r
-    if (ui->ckbox_hex_send->isChecked()) {\r
-        QByteArray array = str.toLatin1();\r
-        QByteArray hex_bytes = QByteArray::fromHex(array.data());\r
-        buf_len = hex_bytes.size();\r
-        buf = hex_bytes.data();\r
-        str=str.toUpper();\r
-        uapi_uart_tx_data(buf, buf_len);\r
-    } else {\r
-        if ((ui->stkw_stage->currentIndex() == PAGE_COMPLETE &&ui->ckbox_word_wrap->isChecked())||\r
-                (ui->stkw_stage->currentIndex() ==PAGE_BOARD && ui->ckbox_word_wrap_board->isChecked())) {\r
-            str+="\r\n";\r
-        }\r
-        std::string bufstr = str.toStdString();\r
-        buf =(char*) bufstr.c_str();\r
-        buf_len = strlen(buf);\r
-        uapi_uart_tx_data(buf, buf_len);\r
-    }\r
+//    if(ui->stkw_stage->currentIndex() == PAGE_COMPLETE){\r
+//        str = ui->tedit_input_data->toPlainText();\r
+//    }else{\r
+//        str = ui->tedit_input_data_board->toPlainText();\r
+//    }\r
 \r
+    ui_display1(str,false);\r
+}\r
+void MainWindow::uart_send_data2(QString cmd)\r
+{\r
 \r
+}\r
+void MainWindow::uart_send_data3(QString cmd)\r
+{\r
 \r
-    ui_display(str,false);\r
 }\r
+void MainWindow::uart_send_data4(QString cmd)\r
+{\r
 \r
+}\r
 // uart收到的数据进行回显到显示栏\r
-void MainWindow::uart_rx_dispaly(int buf_len, u8Piont buf)\r
+void MainWindow::uart_rx_dispaly1(int buf_len, u8Piont buf)\r
 {\r
     uart_rx_flag = true;\r
     if (uart_rx_Ignoring_display) {\r
         QString str((char *)buf);\r
         if(str.contains("ADDR")){\r
-            ui->ledit_dongle_mac->setText(str.mid(str.indexOf("=",0)+1,12));\r
+//            ui->ledit_dongle_mac->setText(str.mid(str.indexOf("=",0)+1,12));\r
         }\r
         return;\r
     }\r
     QString str;\r
     QByteArray data((const char*)buf, buf_len);\r
-    if (ui->ckbox_Hex_Display->isChecked()) {\r
-        for (int i = 0; i < data.size(); i++) {\r
-           str += QString("%1 ").arg((quint8)data.at(i), 2, 16, QChar('0'));\r
-        }\r
-        str=str.toUpper();\r
-    } else {\r
-        for (int i = 0; i < data.size(); i++) {\r
-           str += QString(data.at(i));\r
-        }\r
-    }\r
-    ui_display(str,true);\r
+//    if (ui->ckbox_Hex_Display->isChecked()) {\r
+//        for (int i = 0; i < data.size(); i++) {\r
+//           str += QString("%1 ").arg((quint8)data.at(i), 2, 16, QChar('0'));\r
+//        }\r
+//        str=str.toUpper();\r
+//    } else {\r
+//        for (int i = 0; i < data.size(); i++) {\r
+//           str += QString(data.at(i));\r
+//        }\r
+//    }\r
+    ui_display1(str,true);\r
     free(buf);\r
 }\r
 \r
-void MainWindow::uart_check_dtr_rts()\r
+void MainWindow::uart_rx_dispaly2(int buf_len, u8Piont buf)\r
 {\r
-    bool rts = false, dtr = false;\r
-    if (ui->ckbox_rts->isChecked()) {\r
-        rts = true;\r
+    uart_rx_flag = true;\r
+    if (uart_rx_Ignoring_display) {\r
+        QString str((char *)buf);\r
+        if(str.contains("ADDR")){\r
+//            ui->ledit_dongle_mac->setText(str.mid(str.indexOf("=",0)+1,12));\r
+        }\r
+        return;\r
     }\r
-    if (ui->ckbox_dtr->isChecked()) {\r
-        dtr = true;\r
+    QString str;\r
+    QByteArray data((const char*)buf, buf_len);\r
+//    if (ui->ckbox_Hex_Display->isChecked()) {\r
+//        for (int i = 0; i < data.size(); i++) {\r
+//           str += QString("%1 ").arg((quint8)data.at(i), 2, 16, QChar('0'));\r
+//        }\r
+//        str=str.toUpper();\r
+//    } else {\r
+//        for (int i = 0; i < data.size(); i++) {\r
+//           str += QString(data.at(i));\r
+//        }\r
+//    }\r
+    ui_display2(str,true);\r
+    free(buf);\r
+}\r
+void MainWindow::uart_rx_dispaly3(int buf_len, u8Piont buf)\r
+{\r
+    uart_rx_flag = true;\r
+    if (uart_rx_Ignoring_display) {\r
+        QString str((char *)buf);\r
+        if(str.contains("ADDR")){\r
+//            ui->ledit_dongle_mac->setText(str.mid(str.indexOf("=",0)+1,12));\r
+        }\r
+        return;\r
     }\r
-    if (uapi_uart_set_rts_dtr(rts, dtr) == TRUE) {\r
-//        ui_display("set rts dtr success.\r\n",false);\r
+    QString str;\r
+    QByteArray data((const char*)buf, buf_len);\r
+//    if (ui->ckbox_Hex_Display->isChecked()) {\r
+//        for (int i = 0; i < data.size(); i++) {\r
+//           str += QString("%1 ").arg((quint8)data.at(i), 2, 16, QChar('0'));\r
+//        }\r
+//        str=str.toUpper();\r
+//    } else {\r
+//        for (int i = 0; i < data.size(); i++) {\r
+//           str += QString(data.at(i));\r
+//        }\r
+//    }\r
+    ui_display3(str,true);\r
+    free(buf);\r
+}\r
+void MainWindow::uart_rx_dispaly4(int buf_len, u8Piont buf)\r
+{\r
+    uart_rx_flag = true;\r
+    if (uart_rx_Ignoring_display) {\r
+        QString str((char *)buf);\r
+        if(str.contains("ADDR")){\r
+//            ui->ledit_dongle_mac->setText(str.mid(str.indexOf("=",0)+1,12));\r
+        }\r
+        return;\r
     }\r
+    QString str;\r
+    QByteArray data((const char*)buf, buf_len);\r
+//    if (ui->ckbox_Hex_Display->isChecked()) {\r
+//        for (int i = 0; i < data.size(); i++) {\r
+//           str += QString("%1 ").arg((quint8)data.at(i), 2, 16, QChar('0'));\r
+//        }\r
+//        str=str.toUpper();\r
+//    } else {\r
+//        for (int i = 0; i < data.size(); i++) {\r
+//           str += QString(data.at(i));\r
+//        }\r
+//    }\r
+    ui_display4(str,true);\r
+    free(buf);\r
 }\r
 \r
 void MainWindow::uart_com_select()\r
 {\r
-    ui->cbox_uart_com_select->clear();\r
+    ui->cbox_uart_com_select_1->clear();\r
     QStringList strlist = uart_get_enable_comm_or_port();\r
     qSort(strlist.begin(), strlist.end(),[](const QString& s1, const QString& s2){\r
         QString a1=s1;QString a2=s2;\r
         return a1.replace("COM","").toInt() < a2.replace("COM","").toInt(); });\r
-        ui->cbox_uart_com_select->addItems(strlist);\r
+        ui->cbox_uart_com_select_1->addItems(strlist);\r
 }\r
 void MainWindow::uart_com_switch(QString com)\r
 {\r
     QString str_uart_baud = ui->cbox_uart_baud_select->currentText();\r
-    if(ui->pbtn_open_uart->isChecked()){\r
-        uart_close();\r
-        uart_open(com,str_uart_baud);\r
-    }\r
+//    if(ui->pbtn_open_uart->isChecked()){\r
+//        uart_close();\r
+//        uart_open(com,str_uart_baud);\r
+//    }\r
 }\r
 void MainWindow::uart_baud_switch(QString baud)\r
 {\r
-   QString str_com = ui->cbox_uart_com_select->currentText();\r
-    if(ui->pbtn_open_uart->isChecked()){\r
-        uart_close();\r
-        uart_open(str_com,baud);\r
-    }\r
+   QString str_com = ui->cbox_uart_com_select_1->currentText();\r
+//    if(ui->pbtn_open_uart->isChecked()){\r
+//        uart_close();\r
+//        uart_open(str_com,baud);\r
+//    }\r
 }\r
 // nIndex为索引号 bValue选择返回值为key还是value,默认为value\r
 QString MainWindow::uart_get_comm_or_port(int nIndex, bool bValue)\r
@@ -389,6 +493,11 @@ QString MainWindow::uart_get_comm_or_port(int nIndex, bool bValue)
     }\r
     return strCommRet;\r
 }\r
+void MainWindow::openLogfolder()\r
+{\r
+    QString path = QCoreApplication::applicationDirPath();\r
+    QDesktopServices::openUrl( QUrl::fromLocalFile( path ) );\r
+}\r
 \r
 QStringList MainWindow::uart_get_enable_comm_or_port()\r
 {\r
@@ -406,40 +515,52 @@ QStringList MainWindow::uart_get_enable_comm_or_port()
 /* ------------------------------------------------------------------- */\r
 void MainWindow::spp_connected_callback()\r
 {\r
-    at_handler->at_send_cmd_string(MODULE_MCU,MCU_CMD_CHECK_CONNECTED,NULL);\r
+//    at_handler->at_send_cmd_string(MODULE_MCU,MCU_CMD_CHECK_CONNECTED,NULL);\r
     dongle_connected_times++;\r
     if (dongle_connected_times > 5) {\r
-        ui_display("Dongle has been disconnected.\r\n",false);\r
+        ui_display1("Dongle has been disconnected.\r\n",false);\r
         dongle_is_connected = false;\r
     }\r
     if (dongle_is_connected == true) {\r
-        ui->connected_flag->setStyleSheet("QPushButton{background-color: rgb(0, 255, 64);}");\r
-        uapi_uart_set_currentMode(1);//设置整机模式,通过蓝牙透传指令\r
+//        ui->connected_flag->setStyleSheet("QPushButton{background-color: rgb(0, 255, 64);}");\r
+//        uapi_uart_set_currentMode(1);//设置整机模式,通过蓝牙透传指令\r
     } else {\r
-        ui->connected_flag->setStyleSheet("QPushButton{background-color: rgb(255, 0, 0);}");\r
+//        ui->connected_flag->setStyleSheet("QPushButton{background-color: rgb(255, 0, 0);}");\r
     }\r
 }\r
+void MainWindow::spp_timer_callback2()\r
+{\r
 \r
-void MainWindow::spp_timer_callback()\r
+}\r
+void MainWindow::spp_timer_callback3()\r
+{\r
+\r
+}\r
+void MainWindow::spp_timer_callback4()\r
+{\r
+\r
+}\r
+\r
+void MainWindow::spp_timer_callback1()\r
 {\r
     bool final_ret = false;\r
     if (dongle_try_count > 5) {\r
-        ui_display("\r\nNo device, check the dongle is connected.\r\n",false);\r
+        ui_display1("\r\nNo device, check the dongle is connected.\r\n",false);\r
         final_ret = true;\r
     }\r
     if (uart_rx_flag == false) {\r
-        at_handler->at_send_cmd_string(MODULE_MCU,MCU_CMD_CHECK_CONNECTED,NULL);\r
+//        at_handler->at_send_cmd_string(MODULE_MCU,MCU_CMD_CHECK_CONNECTED,NULL);\r
         dongle_try_count++;\r
     } else if (spp_try_count % 3 == 0) { // 每3次重新发送一次连接AT命令\r
-        QString str = ui->ledit_spp_addr->text();\r
-        at_handler->at_send_cmd_board(DONGLE_MODE_SPPCONN,str);\r
+//        QString str = ui->ledit_spp_addr->text();\r
+//        at_handler->at_send_cmd_board(DONGLE_MODE_SPPCONN,str);\r
     } else if (spp_try_count > 10) { // 循环10次还有数据上报则表示连接失败\r
-        ui_display("\r\nconnect fail.\r\n",false);\r
+        ui_display1("\r\nconnect fail.\r\n",false);\r
         final_ret = true;\r
     }\r
     if (dongle_is_connected == true) {\r
         final_ret = true;\r
-        ui_display("\r\nDongle has been connected.\r\n",false);\r
+        ui_display1("\r\nDongle has been connected.\r\n",false);\r
         if (spp_connected_handle == NULL) {\r
             spp_connected_handle = new QTimer(this);\r
             connect(spp_connected_handle, SIGNAL(timeout()), this, SLOT(spp_connected_callback()));\r
@@ -447,639 +568,72 @@ void MainWindow::spp_timer_callback()
         }\r
     }\r
     if (final_ret == false) {\r
-        at_handler->at_send_cmd_board(DONGLE_MODE_AT,NULL);\r
+//        at_handler->at_send_cmd_board(DONGLE_MODE_AT,NULL);\r
         spp_try_count++;\r
         uart_rx_flag = false;\r
-        ui_display(".",false);\r
+        ui_display1(".",false);\r
     } else {\r
         spp_timer_handle->stop();\r
         spp_timer_handle = NULL;\r
         uart_rx_Ignoring_display = false;\r
-        ui->pbtn_spp_connect->setEnabled(true);\r
-    }\r
-}\r
-\r
-void MainWindow::spp_connect()\r
-{\r
-    uart_rx_Ignoring_display = true;\r
-    dongle_is_connected = false;\r
-    dongle_try_count = 0;\r
-    spp_try_count = 0;\r
-    uapi_uart_callback_register(uart_callback);\r
-    at_handler->at_send_cmd_board(DONGLE_MODE_ADDR,NULL);\r
-    ui_display("spp connectting...",false);\r
-    spp_timer_handle = new QTimer(this);\r
-    connect(spp_timer_handle, SIGNAL(timeout()), this, SLOT(spp_timer_callback()));\r
-    // spp查询定时器周期为1500ms\r
-    spp_timer_handle->start(1500);\r
-    ui->pbtn_spp_connect->setEnabled(false);\r
-}\r
-\r
-/* ------------------------------------------------------------------------ */\r
-/* -------------------------业务处理部分------------------------------------- */\r
-\r
-void MainWindow::transmit_ls_rx_diaplay(int transmit_ls_size, vPiont transmit_ls_buff)\r
-{\r
-    if(transmit_ls_size>0){\r
-        ui_display("文件名            大小\r\n",true);\r
-    }\r
-    uapi_ls_info_t *transmit_ls_buff_temp = (uapi_ls_info_t *)transmit_ls_buff;\r
-    for (int i = 0; i < transmit_ls_size; i++) {\r
-        QString strName = QString::fromUtf8((char *)(transmit_ls_buff_temp[i].name));\r
-        QString strFileLen = QString::number(transmit_ls_buff_temp[i].file_size,10);\r
-        if (transmit_ls_buff_temp[i].is_dir) {\r
-            strName.append("/");\r
-        }\r
-        ui_display(strName+"            "+strFileLen+"\r\n",true);\r
-        ui->cbox_fromborad_filelist->addItem(strName,strFileLen);\r
+//        ui->pbtn_spp_connect->setEnabled(true);\r
     }\r
-    free(transmit_ls_buff);\r
 }\r
-\r
-void MainWindow::transmit_rx_display(bool transmit_result_flag)\r
+void MainWindow::spp_connect_1()\r
 {\r
-    uint32_t total_size=0;\r
-    uint32_t current_size=0;\r
-    transmit_get_data_count(&total_size,&current_size);\r
-    uint32_t value = transmit_result_flag ? total_size : 0;\r
-    if (transmit_timer_handle) {\r
-        transmit_timer_handle->stop();\r
-        transmit_timer_handle = NULL;\r
-    }\r
-    if (transmit_download_or_upload == TRANSMIT_UPLOAD) {\r
-        ui->pbar_toboard->setValue(value);\r
-        ui->pbtn_toboard_Upload->setEnabled(true);\r
-    }\r
-    if (transmit_download_or_upload == TRANSMIT_DOWNLOAD) {\r
-        ui->pbar_fromboard->setValue(value);\r
-        ui->pbtn_fromboard_download->setEnabled(true);\r
-    }\r
-    if (transmit_result_flag) {\r
-        ui_display("download or upload file success.\r\n",false);\r
-    } else {\r
-        ui_display("download or upload file fail.\r\n",false);\r
-    }\r
-    transmit_download_or_upload = TRANSMIT_IDLE;\r
-    ui->pbtn_fromboard_delete->setEnabled(true);\r
-    ui->pbtn_fromboard_getfilelist->setEnabled(true);\r
-}\r
-\r
-void MainWindow::transmit_fromboard_name_change()\r
-{\r
-    ui->cbox_fromborad_filelist->clear();\r
-}\r
+    qDebug()<<this->ui->cbox_uart_baud_select->currentText();\r
+    qDebug()<<this->ui->cbox_uart_com_select_1->currentText();\r
 \r
-void MainWindow::transmit_fromboard_selectfilepath()\r
-{\r
-    QString fname = QFileDialog::getExistingDirectory(this, "请选择文件");\r
-    ui->ledit_frombord_savefilepath->setText(fname);\r
+//    this->serialport1->setBaudRate()\r
+ui_display1("connect com1 ",false);\r
 }\r
-\r
-void MainWindow::transmit_fromboard_getfilelist()\r
+void MainWindow::spp_connect_2()\r
 {\r
-    QString str = ui->ledit_formboad_bordpath->text();\r
-    if (str.isEmpty()) {\r
-        QMessageBox::warning(this, tr("File Path"), tr("文件路径为空!"), QMessageBox::Ok);\r
-        return;\r
-    }\r
-    ui->cbox_fromborad_filelist->clear();\r
-\r
-    std::string bufstr = str.toStdString();\r
-    char* buf =(char*) bufstr.c_str();\r
+    ui_display2("connect com1 ",false);\r
 \r
-    int ret = uapi_ls_send(buf, strlen(buf), ls_callback);\r
-    if (ret == FAIL) {\r
-        QMessageBox::warning(this, tr("ls"), tr("ls fail!\r\n"), QMessageBox::Ok);\r
-    }\r
-    tansmit_fromborad_borad_list.push_back(str);\r
-    QCompleter *com = new QCompleter(tansmit_fromborad_borad_list, this);\r
-    com->setCaseSensitivity(Qt::CaseInsensitive);\r
-    delete ui->ledit_formboad_bordpath->completer();\r
-    ui->ledit_formboad_bordpath->setCompleter(com);\r
 }\r
-\r
-void MainWindow::transmit_fromboard_download()\r
+void MainWindow::spp_connect_3()\r
 {\r
-    QString str_savepath = ui->ledit_frombord_savefilepath->text();\r
-    QString str_file_path = ui->ledit_formboad_bordpath->text();\r
-    QString str_file_name = ui->cbox_fromborad_filelist->currentText();\r
-    if (str_savepath.isEmpty() || str_file_path.isEmpty() || str_file_name.isEmpty()) {\r
-        QMessageBox::warning(this, tr("File Path"), tr("文件路径为空!"), QMessageBox::Ok);\r
-        return;\r
-    }\r
-    if (str_file_name.contains("/")) {\r
-        QMessageBox::warning(this, tr("Board File Name"), tr("请选择正确的文件!"), QMessageBox::Ok);\r
-        return;\r
-    }\r
-    qDebug()<<ui->cbox_fromborad_filelist->currentData().toInt();\r
-    if(ui->cbox_fromborad_filelist->currentData().toInt()==0){\r
-        QMessageBox::warning(this, tr("Board File Name"), tr("filesize 0"), QMessageBox::Ok);\r
-        return;\r
-    }\r
-    if(!str_file_path.endsWith("/")){\r
-        str_file_path.append("/");\r
-    }\r
-    str_file_path.append(str_file_name);\r
-    std::string buf_temp = str_file_path.toStdString();\r
-//    QByteArray buf_temp  = str_file_path.toUtf8() ;\r
-    char *str_file_buff = (char *)buf_temp.c_str();\r
-    std::string buf_temp2 = str_savepath.toStdString();\r
-//    QByteArray buf_temp2  = str_file_path.toUtf8();\r
-    char *str_save_buff = (char *)buf_temp2.c_str();\r
-    int ret = uapi_file_download(str_file_buff, str_save_buff, transmit_callback);\r
-    if (ret == FAIL) {\r
-        QMessageBox::warning(this, tr("Downloade"), tr("文件下载启动失败!"), QMessageBox::Ok);\r
-        return;\r
-    }\r
-    transmit_progress_start();\r
-    transmit_download_or_upload = TRANSMIT_DOWNLOAD;\r
-    transmit_fromborad_local_list.push_back(str_savepath);\r
-    QCompleter *com = new QCompleter(transmit_fromborad_local_list, this);\r
-    com->setCaseSensitivity(Qt::CaseInsensitive);\r
-    delete ui->ledit_frombord_savefilepath->completer();\r
-    ui->ledit_frombord_savefilepath->setCompleter(com);\r
-    ui->pbtn_fromboard_download->setEnabled(false);\r
-    ui->pbtn_fromboard_delete->setEnabled(false);\r
-    ui->pbtn_fromboard_getfilelist->setEnabled(false);\r
-}\r
-\r
-void MainWindow::transmit_fromboard_delete()\r
-{\r
-    QString str_file_path = ui->ledit_formboad_bordpath->text();\r
-    QString str_file_name = ui->cbox_fromborad_filelist->currentText();\r
-    if (str_file_path.isEmpty() || str_file_name.isEmpty()) {\r
-        QMessageBox::warning(this, tr("File Path"), tr("文件路径为空!"), QMessageBox::Ok);\r
-        return;\r
-    }\r
-    if (str_file_name.contains("/")) {\r
-        str_file_name.chop(1);\r
-    } else {\r
-        str_file_path.append("/");\r
-    }\r
-    str_file_path.append(str_file_name);\r
-\r
-    std::string bufstr = str_file_path.toStdString();\r
-    char* str_file_buff =(char*) bufstr.c_str();\r
-\r
-//    char *str_file_buff = (char *)str_file_path.toUtf8().data();//.toStdString().c_str();\r
-    int buflen = strlen(str_file_buff);\r
-    int ret = uapi_file_delete(str_file_buff, buflen); // ls\r
-    if (ret == FAIL) {\r
-        QMessageBox::warning(this, tr("delete"), tr("delete file fail!\r\n"), QMessageBox::Ok);\r
-    }\r
-    ui->cbox_fromborad_filelist->removeItem(ui->cbox_fromborad_filelist->currentIndex());\r
-}\r
-\r
-void MainWindow::transmit_fromboard_stop()\r
-{\r
-    if (transmit_timer_handle) {\r
-        transmit_timer_handle->stop();\r
-        transmit_timer_handle = NULL;\r
-    }\r
-    transmit_download_or_upload = TRANSMIT_IDLE;\r
-    ui->pbar_fromboard->setValue(0);\r
-    ui->pbtn_fromboard_download->setEnabled(true);\r
-    ui->pbtn_fromboard_delete->setEnabled(true);\r
-    ui->pbtn_fromboard_getfilelist->setEnabled(true);\r
-    uapi_file_transmit_stop();\r
-}\r
+    ui_display3("connect com1 ",false);\r
 \r
-void MainWindow::transmit_toboard_choosefile()\r
-{\r
-    QString fname = QFileDialog::getOpenFileName(this, "请选择文件");\r
-    ui->ledit_toboard_filepath->setText(fname);\r
 }\r
-\r
-void MainWindow::transmit_toboard_upload()\r
+void MainWindow::spp_connect_4()\r
 {\r
-    QString board_file_path = ui->ledit_toboard_boardpath->text();\r
-    QString local_file_path = ui->ledit_toboard_filepath->text();\r
-    if (board_file_path.isEmpty() || local_file_path.isEmpty()) {\r
-        QMessageBox::warning(this, tr("File Path"), tr("File Path Empty!"), QMessageBox::Ok);\r
-        return;\r
-    }\r
-\r
-    std::string bufboard_file_path = board_file_path.toStdString();\r
-    char* buf_board_file_path =(char*) bufboard_file_path.c_str();\r
-\r
-    std::string buflocal_file_path = local_file_path.toStdString();\r
-    char* buf_local_file_path =(char*) buflocal_file_path.c_str();\r
+    ui_display4("connect com1 ",false);\r
 \r
-//    char *buf_board_file_path = (char *)board_file_path.toUtf8().data();//.toStdString().c_str();\r
-//    char *buf_local_file_path = (char *)local_file_path.toUtf8().data();//.toStdString().c_str();\r
-    int ret = uapi_file_upload(buf_board_file_path, buf_local_file_path, transmit_callback);\r
-    if (ret == FAIL) {\r
-        QMessageBox::warning(this, tr("Upload"), tr("文件上传启动失败!\r\n"), QMessageBox::Ok);\r
-        return;\r
-    }\r
-    transmit_progress_start();\r
-    transmit_download_or_upload = TRANSMIT_UPLOAD;\r
-    transmit_toboard_local_list.push_back(local_file_path);\r
-    transmit_toboard_borad_list.push_back(board_file_path);\r
-    QCompleter *com1 = new QCompleter(transmit_toboard_local_list, this);\r
-    com1->setCaseSensitivity(Qt::CaseInsensitive);\r
-    delete ui->ledit_toboard_filepath->completer();\r
-    ui->ledit_toboard_filepath->setCompleter(com1);\r
-    QCompleter *com2 = new QCompleter(transmit_toboard_borad_list, this);\r
-    com2->setCaseSensitivity(Qt::CaseInsensitive);\r
-    delete ui->ledit_toboard_boardpath->completer();\r
-    ui->ledit_toboard_boardpath->setCompleter(com2);\r
-    ui->pbtn_toboard_Upload->setEnabled(false);\r
 }\r
 \r
-void MainWindow::transmit_toboard_stop()\r
+void MainWindow::spp_connect_all()\r
 {\r
-    if (transmit_timer_handle) {\r
-        transmit_timer_handle->stop();\r
-        transmit_timer_handle = NULL;\r
-    }\r
-    transmit_download_or_upload = TRANSMIT_IDLE;\r
-    ui->pbar_toboard->setValue(0);\r
-    ui->pbtn_toboard_Upload->setEnabled(true);\r
-    uapi_file_transmit_stop();\r
+    uart_rx_Ignoring_display = true;\r
+    dongle_is_connected = false;\r
+    dongle_try_count = 0;\r
+    spp_try_count = 0;\r
+//    uapi_uart_callback_register(uart_callback);\r
+//    at_handler->at_send_cmd_board(DONGLE_MODE_ADDR,NULL);\r
+    ui_display1("spp connectting...",false);\r
+    spp_timer_handle = new QTimer(this);\r
+    connect(spp_timer_handle, SIGNAL(timeout()), this, SLOT(spp_timer_callback()));\r
+    // spp查询定时器周期为1500ms\r
+    spp_timer_handle->start(1500);\r
+//    ui->pbtn_spp_connect->setEnabled(false);\r
 }\r
 \r
-void MainWindow::transmit_update_progress()\r
-{\r
-    uint32_t total_size=0;\r
-    uint32_t current_size=0;\r
-    transmit_get_data_count(&total_size,&current_size);\r
-    if (transmit_download_or_upload == TRANSMIT_UPLOAD) {\r
-        ui->pbar_toboard->setMaximum(total_size);\r
-        ui->pbar_toboard->setValue(current_size);\r
-    }\r
-    if (transmit_download_or_upload == TRANSMIT_DOWNLOAD) {\r
-        ui->pbar_fromboard->setMaximum(total_size);\r
-        ui->pbar_fromboard->setValue(current_size);\r
-    }\r
-}\r
-void MainWindow::transmit_progress_start()\r
-{\r
-    transmit_timer_handle = new QTimer(this);\r
-    connect(transmit_timer_handle, SIGNAL(timeout()), this, SLOT(transmit_update_progress()));\r
-    // 进度条更新时间为60ms\r
-    transmit_timer_handle->start(60);\r
-}\r
 void MainWindow::at_check_send_status(bool flag)\r
 {\r
     if(flag){\r
-        ui_display("at cmd send success.\r\n",false);\r
+        ui_display1("at cmd send success.\r\n",false);\r
     }else{\r
         QMessageBox::warning(this, tr("AT"), tr("AT send fail!\r\n"), QMessageBox::Ok);\r
-        ui_display("at cmd send fail.\r\n",false);\r
-    }\r
-}\r
-\r
-void MainWindow::dongle_suspend()\r
-{\r
-    if(ui->stkw_stage->currentIndex() == PAGE_COMPLETE){\r
-         ui->tbw_stage_complete->setEnabled(false);\r
-         ui->pbtn_spp_connect->setEnabled(true);\r
-    }else if(ui->stkw_stage->currentIndex() == PAGE_BOARD){\r
-        ui->tbw_stage_board->setEnabled(false);\r
-    }\r
-}\r
-\r
-void MainWindow::dongle_resume()\r
-{\r
-    if(ui->stkw_stage->currentIndex() == PAGE_COMPLETE){\r
-         ui->tbw_stage_complete->setEnabled(true);\r
-         ui->pbtn_spp_connect->setEnabled(true);\r
-    }else if(ui->stkw_stage->currentIndex() == PAGE_BOARD){\r
-        ui->tbw_stage_board->setEnabled(true);\r
-    }\r
-}\r
-\r
-void MainWindow::at_rx_display(int at_buf_len, u8Piont at_buf)\r
-{\r
-    Q_UNUSED(at_buf_len);\r
-    at_module_id at_module_id_temp;\r
-    at_cmd_id at_cmd_id_temp;\r
-    at_handler->at_get_id(&at_module_id_temp, &at_cmd_id_temp);\r
-    if (at_buf[0] == MODULE_BT && at_buf[1] == BT_CMD_RX_RESULT) { // 耦合测试RxCount\r
-        uint32_t rx_count = at_buf[2] + (at_buf[3] << 8);\r
-        ui->ledit_display_rx_count->setText(QString::number(rx_count));\r
-    } else if (at_buf[0] == MODULE_MCU && at_buf[1] == MCU_CMD_CHECK_CONNECTED) { // Dongle是否已连接\r
-        dongle_is_connected = true;\r
-        dongle_connected_times = 0;\r
-        dongle_resume();\r
-    } else if (at_buf[0] == MODULE_MCU && at_buf[1] == MCU_CMD_RETURN_VALUE) {\r
-        for (int i = 0; i < 40; i++) {\r
-            qDebug("buf[%d] is %d.\r\n", i, at_buf[i]);\r
-        }\r
-        ui_display("cmd executed " + (QString)(at_buf[2] == 0 ? "Succ!" : "Fail!") + "\r\n",false);\r
-        if (at_buf[3] != 0) {\r
-            QByteArray data((const char*)&at_buf[4], at_buf[3]);\r
-            ui_display(QString(data),false);\r
-        }\r
-    } else if (at_buf[0] == at_module_id_temp && at_buf[1] == at_cmd_id_temp) {\r
-        ui_display("at receive success.\r\n",false);\r
-    } else {\r
-        ui_display("at receive fail.\r\n",false);\r
-    }\r
-    free(at_buf);\r
-}\r
-\r
-void MainWindow::at_stackinfo_send()\r
-{\r
-    at_check_send_status(at_handler->at_send_cmd_string(MODULE_MCU,MCU_CMD_STACKINFO,NULL));\r
-}\r
-\r
-void MainWindow::at_fsrm_send()\r
-{\r
-    QString str = ui->ledit_at_fsrm->text();\r
-    if (str.isEmpty()) {\r
-        QMessageBox::warning(this, tr("File Path"), tr("文件路径为空!"), QMessageBox::Ok);\r
-        return;\r
-    }\r
-    at_check_send_status(at_handler->at_send_cmd_string(MODULE_MCU,MCU_CMD_FSRM,str));\r
-}\r
-\r
-void MainWindow::at_mediamusicplay_send()\r
-{\r
-    uint8_t media_buf_cmd[2] = {0x00, 0x00};\r
-    QString str = ui->ledit_at_mediamusicplay->text();\r
-    if (str.isEmpty()) {\r
-        QMessageBox::warning(this, tr("File Path"), tr("文件路径为空!"), QMessageBox::Ok);\r
-        return;\r
-    }\r
-    QString media_sub_str;\r
-    QByteArray data((const char*)media_buf_cmd, 2);\r
-    for (int i = 0; i < data.size(); i++) {\r
-        media_sub_str += QString(data.at(i));\r
-    }\r
-    str.prepend(media_sub_str);\r
-    at_check_send_status(at_handler->at_send_cmd_string(MODULE_AUDIO,AUDIO_CMD,str));\r
-}\r
-\r
-void MainWindow::at_mediamusicstop_send()\r
-{\r
-    uint8_t media_buf_cmd[2] = {0x00, 0x03};\r
-    QString media_sub_str;\r
-    QByteArray data((const char*)media_buf_cmd, 2);\r
-    for (int i = 0; i < data.size(); i++) {\r
-        media_sub_str += QString(data.at(i));\r
-    }\r
-    at_check_send_status(at_handler->at_send_cmd_string(MODULE_AUDIO,AUDIO_CMD,media_sub_str));\r
-}\r
-\r
-void MainWindow::at_mediaaudiorecord_send()\r
-{\r
-    uint8_t media_buf_cmd[2] = {0x01, 0x00};\r
-    QString str = ui->ledit_at_mediaaudiorecord->text();\r
-    if (str.isEmpty()) {\r
-        QMessageBox::warning(this, tr("File Path"), tr("文件路径为空!"), QMessageBox::Ok);\r
-        return;\r
-    }\r
-    QString media_sub_str;\r
-    QByteArray data((const char*)media_buf_cmd, 2);\r
-    for (int i = 0; i < data.size(); i++) {\r
-        media_sub_str += QString(data.at(i));\r
-    }\r
-    str.prepend(media_sub_str);\r
-    at_check_send_status(at_handler->at_send_cmd_string(MODULE_AUDIO,AUDIO_CMD,str));\r
-}\r
-\r
-/* ----------------------- 耦合测试设置 ------------------------------------------------- */\r
-void MainWindow::at_bt_delay_ms_complete()\r
-{\r
-    QString str = ui->ledit_delay_ms->text();\r
-    at_check_send_status(at_handler->at_send_cmd_string(MODULE_BT,BT_CMD_DELAY_MS,str));\r
-}\r
-\r
-void MainWindow::at_set_dongle_addr_complete()\r
-{\r
-    QString str = ui->ledit_dongle_mac->text();\r
-    if (str.isEmpty() || str.size() != 12) {\r
-        QMessageBox::warning(this, tr("File Path"), tr("MAC地址为空!"), QMessageBox::Ok);\r
-        return;\r
-    }\r
-    at_check_send_status(at_handler->at_send_cmd_string(MODULE_BT,BT_CMD_DONGLE_MAC,str));\r
-}\r
-void MainWindow::at_set_bt_format()\r
-{\r
-    ui->ledit_br_rx_channel_complete->setValidator(new MyValidator(0,78,this));\r
-    ui->ledit_br_tx_channel_complete->setValidator(new MyValidator(0,78,this));\r
-    ui->ledit_ble_rx_channel_complete->setValidator(new MyValidator(0,39,this));\r
-    ui->ledit_ble_tx_channel_complete->setValidator(new MyValidator(0,39,this));\r
-    ui->ledit_br_rx_PayloadLen_complete->setValidator(new MyValidator(0,27,this));\r
-    ui->ledit_br_tx_PayloadLen_complete->setValidator(new MyValidator(0,27,this));\r
-    ui->ledit_ble_tx_PayloadLen_complete->setValidator(new MyValidator(0,255,this));\r
-\r
-    ui->ledit_br_rx_channel_board->setValidator(new MyValidator(0,78,this));\r
-    ui->ledit_br_tx_channel_board->setValidator(new MyValidator(0,78,this));\r
-    ui->ledit_ble_rx_channel_board->setValidator(new MyValidator(0,39,this));\r
-    ui->ledit_ble_tx_channel_board->setValidator(new MyValidator(0,39,this));\r
-    ui->ledit_br_rx_PayloadLen_board->setValidator(new MyValidator(0,27,this));\r
-    ui->ledit_br_tx_PayloadLen_board->setValidator(new MyValidator(0,27,this));\r
-    ui->ledit_ble_tx_PayloadLen_board->setValidator(new MyValidator(0,255,this));\r
-    ui->ledit_btlo_channel->setValidator(new MyValidator(0,78,this));\r
-}\r
-\r
-void MainWindow::at_check_bt_len(int packtype_index)\r
-{\r
-    QComboBox *cbox = qobject_cast<QComboBox *>(sender());\r
-    int len=at_handler->at_get_packet_len(packtype_index);\r
-    QString name = cbox->objectName();\r
-    if(name == "cbox_br_tx_PacketType_complete"){\r
-        const MyValidator *validator=(MyValidator *)ui->ledit_br_tx_PayloadLen_complete->validator();\r
-        delete validator;\r
-        ui->ledit_br_tx_PayloadLen_complete->setPlaceholderText("Length(0-"+QString::number(len)+")");\r
-        ui->ledit_br_tx_PayloadLen_complete->setValidator(new MyValidator(0,len,this));\r
-    }else if(name == "cbox_br_rx_PacketType_complete"){\r
-        const MyValidator *validator=(MyValidator *)ui->ledit_br_rx_PayloadLen_complete->validator();\r
-        delete validator;\r
-        ui->ledit_br_rx_PayloadLen_complete->setPlaceholderText("Length(0-"+QString::number(len)+")");\r
-        ui->ledit_br_rx_PayloadLen_complete->setValidator(new MyValidator(0,len,this));\r
-    }else if(name == "cbox_br_tx_PacketType_board"){\r
-        const MyValidator *validator=(MyValidator *)ui->ledit_br_tx_PayloadLen_board->validator();\r
-        delete validator;\r
-        ui->ledit_br_tx_PayloadLen_board->setPlaceholderText("Length(0-"+QString::number(len)+")");\r
-        ui->ledit_br_tx_PayloadLen_board->setValidator(new MyValidator(0,len,this));\r
-    }else if(name == "cbox_br_rx_PacketType_board"){\r
-        const MyValidator *validator=(MyValidator *)ui->ledit_br_rx_PayloadLen_board->validator();\r
-        delete validator;\r
-        ui->ledit_br_rx_PayloadLen_board->setPlaceholderText("Length(0-"+QString::number(len)+")");\r
-        ui->ledit_br_rx_PayloadLen_board->setValidator(new MyValidator(0,len,this));\r
-    }\r
-}\r
-\r
-/* -----------------------耦合测试-整机段------------------------------------------------ */\r
-void MainWindow::at_get_rx_count_complete()\r
-{\r
-    at_check_send_status(at_handler->at_send_cmd_string(MODULE_BT,BT_CMD_GET_RX, NULL));\r
-}\r
-\r
-void MainWindow::at_bt_tx_complete()\r
-{\r
-    QString br_tx_switch = ui->cbox_br_tx_on_or_off_complete->currentText();\r
-    QString channel = ui->ledit_br_tx_channel_complete->text();\r
-    int packet_type_index = ui->cbox_br_tx_PacketType_complete->currentIndex();\r
-    QString payload_len = ui->ledit_br_tx_PayloadLen_complete->text();\r
-    int pattern_type_index = ui->cbox_br_tx_pattern_type_complete->currentIndex();\r
-    QString format=at_handler->at_get_br_format(BT_MODE_BR_TX,br_tx_switch,channel,packet_type_index,payload_len,pattern_type_index);\r
-    if(format==NULL){\r
-        QMessageBox::warning(this, tr("AT"), tr("length错误!"), QMessageBox::Ok);\r
-    }\r
-    at_check_send_status(at_handler->at_send_cmd_string(MODULE_BT,BT_CMD_BR_TX,format));\r
-    dongle_is_connected = false;\r
-    dongle_suspend();\r
-}\r
-\r
-void MainWindow::at_bt_rx_complete()\r
-{\r
-    QString br_tx_switch = ui->cbox_br_tx_on_or_off_complete->currentText();\r
-    QString channel = ui->ledit_br_rx_channel_complete->text();\r
-    int packet_type_index = ui->cbox_br_rx_PacketType_complete->currentIndex();\r
-    QString payload_len = ui->ledit_br_rx_PayloadLen_complete->text();\r
-    int pattern_type_index = ui->cbox_br_rx_pattern_type_complete->currentIndex();\r
-    QString format=at_handler->at_get_br_format(BT_MODE_BR_RX,br_tx_switch,channel,packet_type_index,payload_len,pattern_type_index);\r
-    if(format==NULL){\r
-        QMessageBox::warning(this, tr("AT"), tr("length错误!"), QMessageBox::Ok);\r
+        ui_display1("at cmd send fail.\r\n",false);\r
     }\r
-    at_check_send_status(at_handler->at_send_cmd_string(MODULE_BT,BT_CMD_BR_RX,format));\r
-    dongle_is_connected = false;\r
-    dongle_suspend();\r
 }\r
 \r
-void MainWindow::at_ble_tx_complete()\r
+void MainWindow::ui_open_mac_config()\r
 {\r
-    QString br_tx_switch = ui->cbox_ble_tx_on_or_off_complete->currentText();\r
-    QString channel = ui->ledit_ble_tx_channel_complete->text();\r
-    int pattern_type_index = ui->cbox_ble_tx_pattern_type_complete->currentIndex();\r
-    QString payload_len = ui->ledit_ble_tx_PayloadLen_complete->text();\r
-    int phy_type_index = ui->cbox_ble_tx_PacketType_complete->currentIndex();\r
-    QString format=at_handler->at_get_ble_format(BT_MODE_BLE_TX,br_tx_switch,channel,pattern_type_index,payload_len,phy_type_index);\r
-    at_check_send_status(at_handler->at_send_cmd_string(MODULE_BT,BT_CMD_BLE_TX,format));\r
-    dongle_is_connected = false;\r
-    dongle_suspend();\r
-}\r
+    DialogSettings *diag=new DialogSettings();\r
 \r
-void MainWindow::at_ble_rx_complete()\r
-{\r
-    QString br_tx_switch = ui->cbox_ble_rx_on_or_off_complete->currentText();\r
-    QString channel = ui->ledit_ble_rx_channel_complete->text();\r
-    int phy_type_index = ui->cbox_ble_rx_PacketType_complete->currentIndex();\r
-    QString format=at_handler->at_get_ble_format(BT_MODE_BLE_RX,br_tx_switch,channel,0,0,phy_type_index);\r
-    at_check_send_status(at_handler->at_send_cmd_string(MODULE_BT,BT_CMD_BLE_RX,format));\r
-    dongle_is_connected = false;\r
-    dongle_suspend();\r
-}\r
+    diag->show();\r
 \r
-void MainWindow::at_custom_send()\r
-{\r
-    QString moduleId = ui->ledit_at_custom_moduleId->text();\r
-    QString cmdId = ui->ledit_at_custom_CmdId->text();\r
-    QString payload = ui->ledit_at_custom_Payload->text();\r
-    bool ok;\r
-    at_check_send_status(at_handler->at_send_cmd_string((at_module_id)moduleId.toUInt(&ok,16),(at_cmd_id)cmdId.toUInt(&ok,16),payload));\r
-}\r
-/* -----------------------传导测试-单板段------------------------------------------------ */\r
-void MainWindow::at_bt_tx_board()\r
-{\r
-    QString br_tx_switch = ui->cbox_br_tx_on_or_off_board->currentText();\r
-    if (br_tx_switch.contains("ON") && bt_test_switch == true) {\r
-        QMessageBox::warning(this, tr("操作错误"), tr("应先关闭射频测试项!"), QMessageBox::Ok);\r
-    }\r
-    bt_test_switch = br_tx_switch.contains("ON") ? true : false;\r
-    QString channel = ui->ledit_br_tx_channel_board->text();\r
-    int packet_type_index = ui->cbox_br_tx_PacketType_board->currentIndex();\r
-    QString payload_len = ui->ledit_br_tx_PayloadLen_board->text();\r
-    int pattern_type_index = ui->cbox_br_tx_pattern_type_board->currentIndex();\r
-    QString format=at_handler->at_get_br_format(BT_MODE_BR_TX,br_tx_switch,channel,packet_type_index,payload_len,pattern_type_index);\r
-    if(format==NULL){\r
-        QMessageBox::warning(this, tr("AT"), tr("length错误!"), QMessageBox::Ok);\r
-    }\r
-    at_check_send_status(at_handler->at_send_cmd_board(BT_MODE_BR_TX,format));\r
-}\r
-void MainWindow::at_bt_rx_board()\r
-{\r
-    QString br_rx_switch = ui->cbox_br_rx_on_or_off_board->currentText();\r
-    if (br_rx_switch.contains("ON") && bt_test_switch == true) {\r
-        QMessageBox::warning(this, tr("操作错误"), tr("应先关闭射频测试项!"), QMessageBox::Ok);\r
-    }\r
-    bt_test_switch = br_rx_switch.contains("ON") ? true : false;\r
-    QString channel = ui->ledit_br_rx_channel_board->text();\r
-    int packet_type_index = ui->cbox_br_rx_PacketType_board->currentIndex();\r
-    QString payload_len = ui->ledit_br_rx_PayloadLen_board->text();\r
-    int pattern_type_index = ui->cbox_br_rx_pattern_type_board->currentIndex();\r
-    QString format=at_handler->at_get_br_format(BT_MODE_BR_RX,br_rx_switch,channel,packet_type_index,payload_len,pattern_type_index);\r
-    if(format==NULL){\r
-        QMessageBox::warning(this, tr("AT"), tr("length错误!"), QMessageBox::Ok);\r
-    }\r
-    at_check_send_status(at_handler->at_send_cmd_board(BT_MODE_BR_RX,format));\r
-}\r
-void MainWindow::at_ble_tx_board()\r
-{\r
-    QString ble_tx_switch = ui->cbox_ble_tx_on_or_off_board->currentText();\r
-    if (ble_tx_switch.contains("ON") && bt_test_switch == true) {\r
-        QMessageBox::warning(this, tr("操作错误"), tr("应先关闭射频测试项!"), QMessageBox::Ok);\r
-    }\r
-    bt_test_switch = ble_tx_switch.contains("ON") ? true : false;\r
-    QString channel = ui->ledit_ble_tx_channel_board->text();\r
-    int pattern_type_index = ui->cbox_ble_tx_pattern_type_board->currentIndex();\r
-    QString payload_len = ui->ledit_ble_tx_PayloadLen_board->text();\r
-    int phy_type_index = ui->cbox_ble_tx_PacketType_board->currentIndex();\r
-    QString format=at_handler->at_get_ble_format(BT_MODE_BLE_TX,ble_tx_switch,channel,pattern_type_index,payload_len,phy_type_index);\r
-    at_check_send_status(at_handler->at_send_cmd_board(BT_MODE_BLE_TX,format));\r
-}\r
-void MainWindow::at_ble_rx_board()\r
-{\r
-    QString ble_rx_switch = ui->cbox_ble_rx_on_or_off_board->currentText();\r
-    if (ble_rx_switch.contains("ON") && bt_test_switch == true) {\r
-        QMessageBox::warning(this, tr("操作错误"), tr("应先关闭射频测试项!"), QMessageBox::Ok);\r
-    }\r
-    bt_test_switch = ble_rx_switch.contains("ON") ? true : false;\r
-    QString channel = ui->ledit_ble_rx_channel_board->text();\r
-    int phy_type_index = ui->cbox_ble_rx_PacketType_board->currentIndex();\r
-    QString format=at_handler->at_get_ble_format(BT_MODE_BLE_RX,ble_rx_switch,channel,0,0,phy_type_index);\r
-    at_check_send_status(at_handler->at_send_cmd_board(BT_MODE_BLE_RX,format));\r
-}\r
-\r
-void MainWindow::at_bt_dutmode_board()\r
-{\r
-    QString bt_dutmode_switch = ui->cbox_btdutmode_on_or_off_board->currentText();\r
-    if (bt_dutmode_switch.contains("ON") && bt_test_switch == true) {\r
-        QMessageBox::warning(this, tr("操作错误"), tr("应先关闭射频测试项!"), QMessageBox::Ok);\r
-    }\r
-    bt_test_switch = bt_dutmode_switch.contains("ON") ? true : false;\r
-    QString format=at_handler->at_get_switch_format(bt_dutmode_switch);\r
-    at_check_send_status(at_handler->at_send_cmd_board(BT_MODE_BTDUTMODE,format));\r
-}\r
-void MainWindow::at_bt_btlo_board()\r
-{\r
-    QString format;\r
-    format += ui->ledit_btlo_channel->text()+",";\r
-    format += "7,";\r
-    if(ui->cbox_btlo_on_or_off_board->currentText().contains("ON")){\r
-        format+="1";\r
-    }else{\r
-        format+="2";\r
-    }\r
-    at_check_send_status(at_handler->at_send_cmd_board(BT_MODE_BTLO,format));\r
-}\r
-\r
-void MainWindow::at_bt_btpwr_board()\r
-{\r
-    QString format;\r
-    format += ui->ledit_btpwr_powerchip->text()+",";\r
-    if(ui->cbox_btpwr_on_or_off_board->currentText().contains("ON")){\r
-        format+="1";\r
-    }else{\r
-        format+="0";\r
-    }\r
-    at_check_send_status(at_handler->at_send_cmd_board(BT_MODE_BTPWR,format));\r
-}\r
-\r
-void MainWindow::at_bt_wakeup()\r
-{\r
-    QString format= "012345678901234567890123456789";\r
-    at_check_send_status(at_handler->at_send_cmd_board(MODE_MAX,format));\r
-}\r
-\r
-void MainWindow::at_bt_sleep()\r
-{\r
-    QString format= "AT^RMVO";\r
-    at_check_send_status(at_handler->at_send_cmd_board(MODE_MAX,format));\r
 }\r
 /* ----------------------------------------------------------------------------------- */\r
index 8a58b37..781207a 100644 (file)
@@ -2,19 +2,23 @@
 #define MAINWINDOW_H\r
 \r
 #include <Windows.h>\r
-#include <custom.h>\r
 #include <stdio.h>\r
 #include <QCompleter>\r
 #include <QMainWindow>\r
 #include <QSettings>\r
 #include <QTimer>\r
-#include "header.h"\r
 #include "result_thread.h"\r
-#include "common.h"\r
-#include "at_data.h"\r
 #include "QFileDialog"\r
 #include "QMessageBox"\r
 #include "QTime"\r
+#include "common.h"\r
+#include <qt_windows.h>\r
+#include <QSerialPortInfo>\r
+#include <QSerialPort>\r
+\r
+#include "sqldbmanager.h"\r
+\r
+#include "settings.h"\r
 \r
 #define COM_NUMBER 10\r
 \r
@@ -34,8 +38,18 @@ public:
 \r
 private:\r
     Ui::MainWindow *ui;\r
+\r
     /* ------------------------uart------------------------------- */\r
-    Result_Thread *result_thread;\r
+    Result_Thread *result_thread1;\r
+    Result_Thread *result_thread2;\r
+    Result_Thread *result_thread3;\r
+    Result_Thread *result_thread4;\r
+\r
+    QSerialPort *serialport1;\r
+    QSerialPort *serialport2;\r
+    QSerialPort *serialport3;\r
+    QSerialPort *serialport4;\r
+\r
     // 是否忽略uart数据,不回显\r
     bool uart_rx_Ignoring_display {false};\r
     // 是否有uart通路数据上报\r
@@ -52,20 +66,6 @@ private:
     int dongle_try_count {0};\r
     int spp_try_count {0};\r
 \r
-    /* -----------------------transmit---------------------------- */\r
-    QStringList transmit_fromborad_local_list;\r
-    QStringList tansmit_fromborad_borad_list;\r
-    QStringList transmit_toboard_local_list;\r
-    QStringList transmit_toboard_borad_list;\r
-    typedef enum{\r
-        TRANSMIT_IDLE,\r
-        TRANSMIT_DOWNLOAD,\r
-        TRANSMIT_UPLOAD,\r
-    }transmit_mode;\r
-    // download is 1,uplaod is 2\r
-    transmit_mode transmit_download_or_upload {TRANSMIT_IDLE};\r
-    QTimer *transmit_timer_handle {NULL};\r
-    void transmit_progress_start();\r
     /* -------------------------UI------------------------------- */\r
     enum ui_page{\r
         PAGE_COMPLETE,\r
@@ -73,73 +73,54 @@ private:
     };\r
     void ui_setting_save();\r
     void ui_setting_read();\r
-    void ui_display(QString str,bool inOrOut);\r
-    /* -------------------------AT------------------------------- */\r
-    At_Process *at_handler;\r
+    void ui_display1(QString str,bool inOrOut);\r
+    void ui_display2(QString str,bool inOrOut);\r
+    void ui_display3(QString str,bool inOrOut);\r
+    void ui_display4(QString str,bool inOrOut);\r
     void at_check_send_status(bool flag);\r
-    void at_set_bt_format();\r
-    bool bt_test_switch {false};\r
+\r
+\r
+    void uart_send_data1(QString cmd);\r
+    void uart_send_data2(QString cmd);\r
+    void uart_send_data3(QString cmd);\r
+    void uart_send_data4(QString cmd);\r
     /* ------------------------end------------------------------ */\r
 \r
 private slots:\r
     /* --------------------------UI------------------------------ */\r
-    void ui_tab_mainwindow_complete();\r
-    void ui_tab_mainwindow_board();\r
     void ui_save_windows();\r
     /* -------------------------uart----------------------------- */\r
-    void uart_process();\r
-    void uart_send_data();\r
-    void uart_rx_dispaly(int buf_len, u8Piont buf);\r
-    void uart_check_dtr_rts();\r
+    void uart_process1();\r
+    void uart_process2();\r
+    void uart_process3();\r
+    void uart_process4();\r
+    void readData1();\r
+    void readData2();\r
+    void readData3();\r
+    void readData4();\r
+    void uart_rx_dispaly1(int buf_len, u8Piont buf);\r
+    void uart_rx_dispaly2(int buf_len, u8Piont buf);\r
+    void uart_rx_dispaly3(int buf_len, u8Piont buf);\r
+    void uart_rx_dispaly4(int buf_len, u8Piont buf);\r
     void uart_com_select();\r
     void uart_com_switch(QString com);\r
     void uart_baud_switch(QString baud);\r
     /* -------------------------spp------------------------------- */\r
-    void spp_connect();\r
-    void spp_timer_callback();\r
+    void spp_connect_all();\r
+    void spp_connect_1();\r
+    void spp_connect_2();\r
+    void spp_connect_3();\r
+    void spp_connect_4();\r
+    void spp_timer_callback1();\r
+    void spp_timer_callback2();\r
+    void spp_timer_callback3();\r
+    void spp_timer_callback4();\r
+\r
     void spp_connected_callback();\r
-    void dongle_suspend();\r
-    void dongle_resume();\r
-    /* -----------------------at/transmit---------------------------- */\r
-    void at_rx_display(int at_buf_len, u8Piont at_buf);\r
-    void at_stackinfo_send();\r
-    void at_fsrm_send();\r
-    void at_mediamusicplay_send();\r
-    void at_mediamusicstop_send();\r
-    void at_mediaaudiorecord_send();\r
-    void at_custom_send();\r
-    void transmit_ls_rx_diaplay(int transmit_ls_size, vPiont transmit_ls_buff);\r
-    void transmit_rx_display(bool transmit_result_flag);\r
-    void transmit_update_progress();\r
-    void transmit_fromboard_name_change();\r
-    void transmit_fromboard_selectfilepath();\r
-    void transmit_fromboard_getfilelist();\r
-    void transmit_fromboard_download();\r
-    void transmit_fromboard_delete();\r
-    void transmit_fromboard_stop();\r
-    void transmit_toboard_choosefile();\r
-    void transmit_toboard_upload();\r
-    void transmit_toboard_stop();\r
-    /* ----------------------- 耦合测试设置 --------------------------- */\r
-    void at_set_dongle_addr_complete();\r
-    void at_bt_delay_ms_complete();\r
-    void at_check_bt_len(int packtype_index);\r
-    /* -----------------------耦合测试-整机段-------------------------- */\r
-    void at_get_rx_count_complete();\r
-    void at_bt_tx_complete();  // BT长发(非信令)\r
-    void at_bt_rx_complete();  // BT长收(非信令)\r
-    void at_ble_tx_complete(); // BLE长发(非信令)\r
-    void at_ble_rx_complete(); // BLE长收(非信令)\r
-    /* -----------------------传导测试-单板段-------------------------- */\r
-    void at_bt_tx_board();  // BT长发(非信令)\r
-    void at_bt_rx_board();  // BT长收(非信令)\r
-    void at_ble_tx_board(); // BLE长发(非信令)\r
-    void at_ble_rx_board(); // BLE长收(非信令)\r
-    void at_bt_dutmode_board();\r
-    void at_bt_btlo_board();\r
-    void at_bt_btpwr_board();\r
-    void at_bt_wakeup();\r
-    void at_bt_sleep();\r
+    /* -------------------------cfg------------------------------- */\r
+    void ui_open_mac_config();\r
+\r
     /* ------------------------------------------------------------- */\r
+    void openLogfolder();\r
 };\r
 #endif // MAINWINDOW_H\r
index 0eaae6b..17eba52 100644 (file)
@@ -6,8 +6,8 @@
    <rect>\r
     <x>0</x>\r
     <y>0</y>\r
-    <width>890</width>\r
-    <height>707</height>\r
+    <width>1354</width>\r
+    <height>694</height>\r
    </rect>\r
   </property>\r
   <property name="font">\r
@@ -18,7 +18,7 @@
    </font>\r
   </property>\r
   <property name="windowTitle">\r
-   <string>Factory_Tools</string>\r
+   <string>BTMacWriteTool V1.0</string>\r
   </property>\r
   <property name="windowIcon">\r
    <iconset>\r
    <enum>Qt::LeftToRight</enum>\r
   </property>\r
   <widget class="QWidget" name="centralwidget">\r
-   <widget class="QTextBrowser" name="txtb_dispaly">\r
+   <widget class="QWidget" name="verticalLayoutWidget_2">\r
     <property name="geometry">\r
      <rect>\r
-      <x>0</x>\r
-      <y>0</y>\r
-      <width>631</width>\r
-      <height>371</height>\r
-     </rect>\r
-    </property>\r
-    <property name="font">\r
-     <font>\r
-      <family>Times New Roman</family>\r
-      <pointsize>10</pointsize>\r
-     </font>\r
-    </property>\r
-    <property name="mouseTracking">\r
-     <bool>true</bool>\r
-    </property>\r
-    <property name="styleSheet">\r
-     <string notr="true">QTextBrowser{background-color:rgb(26, 26, 26);\r
-                       color:rgb(127, 255, 0)}</string>\r
-    </property>\r
-    <property name="verticalScrollBarPolicy">\r
-     <enum>Qt::ScrollBarAlwaysOn</enum>\r
-    </property>\r
-    <property name="textInteractionFlags">\r
-     <set>Qt::TextBrowserInteraction</set>\r
-    </property>\r
-   </widget>\r
-   <widget class="QStackedWidget" name="stkw_stage">\r
-    <property name="geometry">\r
-     <rect>\r
-      <x>0</x>\r
-      <y>370</y>\r
-      <width>891</width>\r
-      <height>311</height>\r
+      <x>1040</x>\r
+      <y>10</y>\r
+      <width>306</width>\r
+      <height>621</height>\r
      </rect>\r
     </property>\r
     <property name="font">\r
      <font>\r
-      <family>黑体</family>\r
-      <weight>50</weight>\r
-      <bold>false</bold>\r
+      <family>Arial</family>\r
+      <pointsize>14</pointsize>\r
      </font>\r
     </property>\r
-    <property name="currentIndex">\r
-     <number>0</number>\r
-    </property>\r
-    <widget class="QWidget" name="page_compelte">\r
-     <widget class="QTabWidget" name="tbw_stage_complete">\r
-      <property name="enabled">\r
-       <bool>false</bool>\r
-      </property>\r
-      <property name="geometry">\r
-       <rect>\r
-        <x>0</x>\r
-        <y>0</y>\r
-        <width>891</width>\r
-        <height>291</height>\r
-       </rect>\r
-      </property>\r
-      <property name="sizePolicy">\r
-       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">\r
-        <horstretch>0</horstretch>\r
-        <verstretch>0</verstretch>\r
-       </sizepolicy>\r
-      </property>\r
-      <property name="font">\r
-       <font>\r
-        <family>黑体</family>\r
-        <pointsize>12</pointsize>\r
-        <weight>50</weight>\r
-        <bold>false</bold>\r
-       </font>\r
-      </property>\r
-      <property name="cursor">\r
-       <cursorShape>ArrowCursor</cursorShape>\r
-      </property>\r
-      <property name="currentIndex">\r
-       <number>3</number>\r
-      </property>\r
-      <widget class="QWidget" name="tab_complete_debug">\r
-       <attribute name="title">\r
-        <string>Debug</string>\r
-       </attribute>\r
-       <widget class="QTextEdit" name="tedit_input_data">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>0</x>\r
-          <y>0</y>\r
-          <width>771</width>\r
-          <height>261</height>\r
-         </rect>\r
-        </property>\r
-       </widget>\r
-       <widget class="QPushButton" name="pbtn_send_data">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>790</x>\r
-          <y>30</y>\r
-          <width>75</width>\r
-          <height>23</height>\r
-         </rect>\r
-        </property>\r
-        <property name="font">\r
-         <font>\r
-          <family>Times New Roman</family>\r
-          <pointsize>10</pointsize>\r
-          <weight>50</weight>\r
-          <bold>false</bold>\r
-         </font>\r
-        </property>\r
-        <property name="text">\r
-         <string>发送</string>\r
-        </property>\r
-       </widget>\r
-       <widget class="QPushButton" name="pbtn_clear_senddata">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>790</x>\r
-          <y>83</y>\r
-          <width>75</width>\r
-          <height>23</height>\r
-         </rect>\r
-        </property>\r
-        <property name="font">\r
-         <font>\r
-          <family>Times New Roman</family>\r
-          <pointsize>10</pointsize>\r
-          <weight>50</weight>\r
-          <bold>false</bold>\r
-         </font>\r
-        </property>\r
-        <property name="text">\r
-         <string>清除发送</string>\r
-        </property>\r
-       </widget>\r
-       <widget class="QCheckBox" name="ckbox_word_wrap">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>789</x>\r
-          <y>157</y>\r
-          <width>88</width>\r
-          <height>16</height>\r
-         </rect>\r
-        </property>\r
-        <property name="font">\r
-         <font>\r
-          <family>Times New Roman</family>\r
-          <pointsize>10</pointsize>\r
-          <weight>50</weight>\r
-          <bold>false</bold>\r
-         </font>\r
-        </property>\r
-        <property name="text">\r
-         <string>加回车换行</string>\r
-        </property>\r
-        <property name="tristate">\r
-         <bool>false</bool>\r
-        </property>\r
-       </widget>\r
-      </widget>\r
-      <widget class="QWidget" name="tab_complete_toboard">\r
-       <attribute name="title">\r
-        <string>To Board</string>\r
-       </attribute>\r
-       <widget class="QProgressBar" name="pbar_toboard">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>20</x>\r
-          <y>210</y>\r
-          <width>831</width>\r
-          <height>23</height>\r
-         </rect>\r
-        </property>\r
-        <property name="value">\r
-         <number>0</number>\r
-        </property>\r
-        <property name="invertedAppearance">\r
-         <bool>false</bool>\r
-        </property>\r
-       </widget>\r
-       <widget class="QGroupBox" name="groupBox_4">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>20</x>\r
-          <y>20</y>\r
-          <width>831</width>\r
-          <height>161</height>\r
-         </rect>\r
-        </property>\r
-        <property name="font">\r
-         <font>\r
-          <family>Times New Roman</family>\r
-          <pointsize>10</pointsize>\r
-          <weight>50</weight>\r
-          <bold>false</bold>\r
-         </font>\r
-        </property>\r
-        <property name="title">\r
-         <string>Upload File</string>\r
-        </property>\r
-        <widget class="QLabel" name="label">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>10</x>\r
-           <y>40</y>\r
-           <width>121</width>\r
-           <height>21</height>\r
-          </rect>\r
-         </property>\r
-         <property name="font">\r
-          <font>\r
-           <family>Times New Roman</family>\r
-           <pointsize>10</pointsize>\r
-           <weight>50</weight>\r
-           <bold>false</bold>\r
-          </font>\r
-         </property>\r
-         <property name="text">\r
-          <string>Local File Path:</string>\r
-         </property>\r
-        </widget>\r
-        <widget class="QLabel" name="label_2">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>10</x>\r
-           <y>100</y>\r
-           <width>121</width>\r
-           <height>20</height>\r
-          </rect>\r
-         </property>\r
-         <property name="font">\r
-          <font>\r
-           <family>Times New Roman</family>\r
-           <pointsize>10</pointsize>\r
-           <weight>50</weight>\r
-           <bold>false</bold>\r
-          </font>\r
-         </property>\r
-         <property name="text">\r
-          <string>Board File Path:</string>\r
-         </property>\r
-        </widget>\r
-        <widget class="QPushButton" name="pbtn_toboard_stop">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>730</x>\r
-           <y>100</y>\r
-           <width>75</width>\r
-           <height>23</height>\r
-          </rect>\r
-         </property>\r
-         <property name="font">\r
-          <font>\r
-           <family>Times New Roman</family>\r
-           <pointsize>10</pointsize>\r
-           <weight>50</weight>\r
-           <bold>false</bold>\r
-          </font>\r
-         </property>\r
-         <property name="text">\r
-          <string>stop</string>\r
-         </property>\r
-        </widget>\r
-        <widget class="QLineEdit" name="ledit_toboard_boardpath">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>140</x>\r
-           <y>100</y>\r
-           <width>471</width>\r
-           <height>20</height>\r
-          </rect>\r
-         </property>\r
-        </widget>\r
-        <widget class="QPushButton" name="pbtn_toboard_choosefile">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>640</x>\r
-           <y>40</y>\r
-           <width>161</width>\r
-           <height>23</height>\r
-          </rect>\r
-         </property>\r
-         <property name="font">\r
-          <font>\r
-           <family>Times New Roman</family>\r
-           <pointsize>10</pointsize>\r
-           <weight>50</weight>\r
-           <bold>false</bold>\r
-          </font>\r
-         </property>\r
-         <property name="text">\r
-          <string>Choose File</string>\r
-         </property>\r
-        </widget>\r
-        <widget class="QPushButton" name="pbtn_toboard_Upload">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>640</x>\r
-           <y>100</y>\r
-           <width>75</width>\r
-           <height>23</height>\r
-          </rect>\r
-         </property>\r
-         <property name="font">\r
-          <font>\r
-           <family>Times New Roman</family>\r
-           <pointsize>10</pointsize>\r
-           <weight>50</weight>\r
-           <bold>false</bold>\r
-          </font>\r
-         </property>\r
-         <property name="text">\r
-          <string>Upload</string>\r
-         </property>\r
-         <property name="checkable">\r
-          <bool>false</bool>\r
-         </property>\r
-        </widget>\r
-        <widget class="QLineEdit" name="ledit_toboard_filepath">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>140</x>\r
-           <y>40</y>\r
-           <width>471</width>\r
-           <height>20</height>\r
-          </rect>\r
-         </property>\r
-        </widget>\r
-       </widget>\r
-      </widget>\r
-      <widget class="QWidget" name="tab_complete_fromboard">\r
-       <attribute name="title">\r
-        <string>From Board</string>\r
-       </attribute>\r
-       <widget class="QGroupBox" name="groupBox_2">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>20</x>\r
-          <y>20</y>\r
-          <width>701</width>\r
-          <height>71</height>\r
-         </rect>\r
-        </property>\r
-        <property name="font">\r
-         <font>\r
-          <family>Times New Roman</family>\r
-          <pointsize>10</pointsize>\r
-          <weight>50</weight>\r
-          <bold>false</bold>\r
-         </font>\r
-        </property>\r
-        <property name="title">\r
-         <string>File Storage</string>\r
-        </property>\r
-        <widget class="QLabel" name="label_4">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>10</x>\r
-           <y>30</y>\r
-           <width>121</width>\r
-           <height>21</height>\r
-          </rect>\r
-         </property>\r
-         <property name="font">\r
-          <font>\r
-           <family>Times New Roman</family>\r
-           <pointsize>10</pointsize>\r
-           <weight>50</weight>\r
-           <bold>false</bold>\r
-          </font>\r
-         </property>\r
-         <property name="text">\r
-          <string>Local File Path:</string>\r
-         </property>\r
-        </widget>\r
-        <widget class="QLineEdit" name="ledit_frombord_savefilepath">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>140</x>\r
-           <y>30</y>\r
-           <width>421</width>\r
-           <height>20</height>\r
-          </rect>\r
-         </property>\r
-        </widget>\r
-        <widget class="QPushButton" name="pbtn_fromboard_selectfilepath">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>580</x>\r
-           <y>30</y>\r
-           <width>91</width>\r
-           <height>23</height>\r
-          </rect>\r
-         </property>\r
-         <property name="font">\r
-          <font>\r
-           <family>Times New Roman</family>\r
-           <pointsize>10</pointsize>\r
-           <weight>50</weight>\r
-           <bold>false</bold>\r
-          </font>\r
-         </property>\r
-         <property name="text">\r
-          <string>....</string>\r
-         </property>\r
-        </widget>\r
-       </widget>\r
-       <widget class="QGroupBox" name="groupBox_3">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>20</x>\r
-          <y>110</y>\r
-          <width>701</width>\r
-          <height>101</height>\r
-         </rect>\r
-        </property>\r
-        <property name="font">\r
-         <font>\r
-          <family>Times New Roman</family>\r
-          <pointsize>10</pointsize>\r
-          <weight>50</weight>\r
-          <bold>false</bold>\r
-         </font>\r
-        </property>\r
-        <property name="title">\r
-         <string>File Selector</string>\r
-        </property>\r
-        <widget class="QLabel" name="label_11">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>40</x>\r
-           <y>20</y>\r
-           <width>71</width>\r
-           <height>20</height>\r
-          </rect>\r
-         </property>\r
-         <property name="font">\r
-          <font>\r
-           <family>Times New Roman</family>\r
-           <pointsize>10</pointsize>\r
-           <weight>50</weight>\r
-           <bold>false</bold>\r
-          </font>\r
-         </property>\r
-         <property name="text">\r
-          <string>File Path:</string>\r
-         </property>\r
-        </widget>\r
-        <widget class="QLineEdit" name="ledit_formboad_bordpath">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>140</x>\r
-           <y>20</y>\r
-           <width>531</width>\r
-           <height>20</height>\r
-          </rect>\r
-         </property>\r
-        </widget>\r
-        <widget class="QComboBox" name="cbox_fromborad_filelist">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>140</x>\r
-           <y>60</y>\r
-           <width>411</width>\r
-           <height>22</height>\r
-          </rect>\r
-         </property>\r
-        </widget>\r
-        <widget class="QPushButton" name="pbtn_fromboard_getfilelist">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>570</x>\r
-           <y>60</y>\r
-           <width>101</width>\r
-           <height>23</height>\r
-          </rect>\r
-         </property>\r
-         <property name="font">\r
-          <font>\r
-           <family>Times New Roman</family>\r
-           <pointsize>9</pointsize>\r
-           <weight>50</weight>\r
-           <bold>false</bold>\r
-          </font>\r
-         </property>\r
-         <property name="text">\r
-          <string>Get file List</string>\r
-         </property>\r
-        </widget>\r
-        <widget class="QLabel" name="label_12">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>40</x>\r
-           <y>60</y>\r
-           <width>71</width>\r
-           <height>20</height>\r
-          </rect>\r
-         </property>\r
-         <property name="font">\r
-          <font>\r
-           <family>Times New Roman</family>\r
-           <pointsize>10</pointsize>\r
-           <weight>50</weight>\r
-           <bold>false</bold>\r
-          </font>\r
-         </property>\r
-         <property name="text">\r
-          <string>File Name:</string>\r
-         </property>\r
-        </widget>\r
-        <widget class="QPushButton" name="pushButton_29">\r
-         <property name="geometry">\r
-          <rect>\r
-           <x>290</x>\r
-           <y>130</y>\r
-           <width>75</width>\r
-           <height>23</height>\r
-          </rect>\r
-         </property>\r
-         <property name="text">\r
-          <string>PushButton</string>\r
-         </property>\r
-        </widget>\r
-       </widget>\r
-       <widget class="QProgressBar" name="pbar_fromboard">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>20</x>\r
-          <y>220</y>\r
-          <width>711</width>\r
-          <height>20</height>\r
-         </rect>\r
-        </property>\r
-        <property name="value">\r
-         <number>0</number>\r
-        </property>\r
-       </widget>\r
-       <widget class="QWidget" name="layoutWidget">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>760</x>\r
-          <y>20</y>\r
-          <width>95</width>\r
-          <height>201</height>\r
-         </rect>\r
-        </property>\r
-        <layout class="QVBoxLayout" name="verticalLayout">\r
-         <item>\r
-          <widget class="QPushButton" name="pbtn_fromboard_download">\r
-           <property name="font">\r
-            <font>\r
-             <family>Times New Roman</family>\r
-             <pointsize>10</pointsize>\r
-             <weight>50</weight>\r
-             <bold>false</bold>\r
-            </font>\r
-           </property>\r
-           <property name="text">\r
-            <string>Download</string>\r
-           </property>\r
-           <property name="checkable">\r
-            <bool>false</bool>\r
-           </property>\r
-          </widget>\r
-         </item>\r
-         <item>\r
-          <widget class="QPushButton" name="pbtn_fromboard_delete">\r
-           <property name="font">\r
-            <font>\r
-             <family>Times New Roman</family>\r
-             <pointsize>10</pointsize>\r
-             <weight>50</weight>\r
-             <bold>false</bold>\r
-            </font>\r
-           </property>\r
-           <property name="text">\r
-            <string>Delete</string>\r
-           </property>\r
-          </widget>\r
-         </item>\r
-         <item>\r
-          <widget class="QPushButton" name="pbtn_fromboard_stop">\r
-           <property name="font">\r
-            <font>\r
-             <family>Times New Roman</family>\r
-             <pointsize>10</pointsize>\r
-             <weight>50</weight>\r
-             <bold>false</bold>\r
-            </font>\r
-           </property>\r
-           <property name="text">\r
-            <string>Stop</string>\r
-           </property>\r
-          </widget>\r
-         </item>\r
-        </layout>\r
-       </widget>\r
-      </widget>\r
-      <widget class="QWidget" name="tab_complete_at_cmd">\r
-       <attribute name="title">\r
-        <string>AT命令</string>\r
-       </attribute>\r
-       <widget class="QTabWidget" name="tbw_at_cmd">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>0</x>\r
-          <y>0</y>\r
-          <width>891</width>\r
-          <height>271</height>\r
-         </rect>\r
-        </property>\r
-        <property name="font">\r
-         <font>\r
-          <family>黑体</family>\r
-          <pointsize>10</pointsize>\r
-          <weight>50</weight>\r
-          <bold>false</bold>\r
-         </font>\r
-        </property>\r
-        <property name="tabPosition">\r
-         <enum>QTabWidget::West</enum>\r
-        </property>\r
-        <property name="tabShape">\r
-         <enum>QTabWidget::Triangular</enum>\r
-        </property>\r
-        <property name="currentIndex">\r
-         <number>0</number>\r
-        </property>\r
-        <property name="elideMode">\r
-         <enum>Qt::ElideNone</enum>\r
-        </property>\r
-        <widget class="QWidget" name="tab_at_cmd_mcu">\r
-         <attribute name="title">\r
-          <string>MCU</string>\r
-         </attribute>\r
-         <widget class="QGroupBox" name="groupBox">\r
-          <property name="geometry">\r
-           <rect>\r
-            <x>20</x>\r
-            <y>10</y>\r
-            <width>831</width>\r
-            <height>211</height>\r
-           </rect>\r
-          </property>\r
-          <property name="title">\r
-           <string>Debug</string>\r
-          </property>\r
-          <widget class="QWidget" name="horizontalLayoutWidget">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>20</x>\r
-             <y>30</y>\r
-             <width>791</width>\r
-             <height>31</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1,1,1,1">\r
-            <property name="spacing">\r
-             <number>10</number>\r
-            </property>\r
-            <item>\r
-             <widget class="QPushButton" name="pbtn_at_stackinfo">\r
-              <property name="text">\r
-               <string>StackInfo</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item>\r
-             <widget class="QPushButton" name="pushButton_2">\r
-              <property name="text">\r
-               <string>待开发</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item>\r
-             <widget class="QPushButton" name="pushButton_7">\r
-              <property name="text">\r
-               <string>待开发</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item>\r
-             <widget class="QPushButton" name="pushButton_6">\r
-              <property name="text">\r
-               <string>待开发</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item>\r
-             <widget class="QPushButton" name="pushButton_9">\r
-              <property name="text">\r
-               <string>待开发</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-          <widget class="QWidget" name="layoutWidget">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>20</x>\r
-             <y>90</y>\r
-             <width>371</width>\r
-             <height>30</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QGridLayout" name="gridLayout_3">\r
-            <item row="0" column="0">\r
-             <widget class="QLineEdit" name="ledit_at_fsrm"/>\r
-            </item>\r
-            <item row="0" column="1">\r
-             <widget class="QPushButton" name="pbtn_at_fsrm">\r
-              <property name="text">\r
-               <string>FSRM</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-          <widget class="QWidget" name="layoutWidget">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>20</x>\r
-             <y>150</y>\r
-             <width>731</width>\r
-             <height>25</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QHBoxLayout" name="horizontalLayout_4" stretch="2,0,1,1,6">\r
-            <item>\r
-             <widget class="QPushButton" name="pbtn_at_custom_send">\r
-              <property name="text">\r
-               <string>发送</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item>\r
-             <spacer name="horizontalSpacer_4">\r
-              <property name="orientation">\r
-               <enum>Qt::Horizontal</enum>\r
-              </property>\r
-              <property name="sizeType">\r
-               <enum>QSizePolicy::Minimum</enum>\r
-              </property>\r
-              <property name="sizeHint" stdset="0">\r
-               <size>\r
-                <width>30</width>\r
-                <height>20</height>\r
-               </size>\r
-              </property>\r
-             </spacer>\r
-            </item>\r
-            <item>\r
-             <widget class="QLineEdit" name="ledit_at_custom_moduleId">\r
-              <property name="font">\r
-               <font>\r
-                <family>黑体</family>\r
-                <pointsize>8</pointsize>\r
-                <weight>50</weight>\r
-                <bold>false</bold>\r
-               </font>\r
-              </property>\r
-              <property name="placeholderText">\r
-               <string>module id</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item>\r
-             <widget class="QLineEdit" name="ledit_at_custom_CmdId">\r
-              <property name="font">\r
-               <font>\r
-                <family>黑体</family>\r
-                <pointsize>8</pointsize>\r
-                <weight>50</weight>\r
-                <bold>false</bold>\r
-               </font>\r
-              </property>\r
-              <property name="placeholderText">\r
-               <string>cmd id</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item>\r
-             <widget class="QLineEdit" name="ledit_at_custom_Payload">\r
-              <property name="placeholderText">\r
-               <string>payload</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-         </widget>\r
-        </widget>\r
-        <widget class="QWidget" name="tab_at_cmd_media">\r
-         <attribute name="title">\r
-          <string>MEDIA</string>\r
-         </attribute>\r
-         <widget class="QGroupBox" name="groupBox_5">\r
-          <property name="geometry">\r
-           <rect>\r
-            <x>20</x>\r
-            <y>10</y>\r
-            <width>821</width>\r
-            <height>161</height>\r
-           </rect>\r
-          </property>\r
-          <property name="title">\r
-           <string>Media</string>\r
-          </property>\r
-          <widget class="QWidget" name="layoutWidget">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>20</x>\r
-             <y>30</y>\r
-             <width>591</width>\r
-             <height>32</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QGridLayout" name="gridLayout_2" columnstretch="4,1,1">\r
-            <property name="leftMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <property name="topMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <property name="rightMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <property name="bottomMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <item row="0" column="0">\r
-             <widget class="QLineEdit" name="ledit_at_mediamusicplay"/>\r
-            </item>\r
-            <item row="0" column="1">\r
-             <widget class="QPushButton" name="pbtn_at_mediamusicplay">\r
-              <property name="text">\r
-               <string>Music Play</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="2">\r
-             <widget class="QPushButton" name="pbtn_at_mediamusicstop">\r
-              <property name="text">\r
-               <string>Music Stop</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-          <widget class="QWidget" name="layoutWidget">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>20</x>\r
-             <y>80</y>\r
-             <width>591</width>\r
-             <height>32</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QGridLayout" name="gridLayout_4" columnstretch="5,1">\r
-            <property name="leftMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <property name="topMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <property name="rightMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <property name="bottomMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <item row="0" column="0">\r
-             <widget class="QLineEdit" name="ledit_at_mediaaudiorecord"/>\r
-            </item>\r
-            <item row="0" column="1">\r
-             <widget class="QPushButton" name="pbtn_at_mediaaudiorecord">\r
-              <property name="text">\r
-               <string>Audio Record</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-         </widget>\r
-        </widget>\r
-        <widget class="QWidget" name="tab_at_cmd_bt">\r
-         <attribute name="title">\r
-          <string>BT</string>\r
-         </attribute>\r
-         <widget class="QGroupBox" name="groupBox_7">\r
-          <property name="geometry">\r
-           <rect>\r
-            <x>20</x>\r
-            <y>10</y>\r
-            <width>821</width>\r
-            <height>111</height>\r
-           </rect>\r
-          </property>\r
-          <property name="title">\r
-           <string>耦合测试设置</string>\r
-          </property>\r
-          <widget class="QWidget" name="layoutWidget">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>20</x>\r
-             <y>40</y>\r
-             <width>671</width>\r
-             <height>25</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,2,3,1,2">\r
-            <item>\r
-             <widget class="QPushButton" name="pbtn_delay_time">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>延时时间</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item>\r
-             <widget class="QLineEdit" name="ledit_delay_ms">\r
-              <property name="text">\r
-               <string/>\r
-              </property>\r
-              <property name="alignment">\r
-               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>\r
-              </property>\r
-              <property name="placeholderText">\r
-               <string>ms</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item>\r
-             <spacer name="horizontalSpacer">\r
-              <property name="orientation">\r
-               <enum>Qt::Horizontal</enum>\r
-              </property>\r
-              <property name="sizeHint" stdset="0">\r
-               <size>\r
-                <width>40</width>\r
-                <height>20</height>\r
-               </size>\r
-              </property>\r
-             </spacer>\r
-            </item>\r
-            <item>\r
-             <widget class="QPushButton" name="pbtn_donglemac">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>DongleMAC</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item>\r
-             <widget class="QLineEdit" name="ledit_dongle_mac">\r
-              <property name="text">\r
-               <string/>\r
-              </property>\r
-              <property name="alignment">\r
-               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-         </widget>\r
-        </widget>\r
-        <widget class="QWidget" name="tab_at_cmd_rftest">\r
-         <attribute name="title">\r
-          <string>耦合测试</string>\r
-         </attribute>\r
-         <widget class="QGroupBox" name="groupBox_13">\r
-          <property name="geometry">\r
-           <rect>\r
-            <x>20</x>\r
-            <y>10</y>\r
-            <width>831</width>\r
-            <height>121</height>\r
-           </rect>\r
-          </property>\r
-          <property name="title">\r
-           <string>BR EDR</string>\r
-          </property>\r
-          <widget class="QWidget" name="layoutWidget">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>20</x>\r
-             <y>20</y>\r
-             <width>761</width>\r
-             <height>81</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QGridLayout" name="gridLayout_5" columnstretch="2,1,4,2,4,2">\r
-            <item row="0" column="3">\r
-             <widget class="QComboBox" name="cbox_br_tx_PacketType_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="contextMenuPolicy">\r
-               <enum>Qt::DefaultContextMenu</enum>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>DH1</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>DH3</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>DH5</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>2-DH1</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>2-DH3</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>2-DH5</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>3-DH1</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>3-DH3</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>3-DH5</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="1" column="4">\r
-             <widget class="MyLineEdit" name="ledit_br_rx_PayloadLen_complete">\r
-              <property name="placeholderText">\r
-               <string>Length(0-27)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="1" column="1">\r
-             <widget class="QComboBox" name="cbox_br_rx_on_or_off_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>ON</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="1" column="5">\r
-             <widget class="QComboBox" name="cbox_br_rx_pattern_type_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>10101010</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>PRBS9</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>11110000</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="1" column="0">\r
-             <widget class="QPushButton" name="pbtn_br_rx_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>BR RX</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="1">\r
-             <widget class="QComboBox" name="cbox_br_tx_on_or_off_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="minimumContentsLength">\r
-               <number>0</number>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>ON</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="0">\r
-             <widget class="QPushButton" name="pbtn_br_tx_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>BR TX</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="2">\r
-             <widget class="MyLineEdit" name="ledit_br_tx_channel_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string/>\r
-              </property>\r
-              <property name="frame">\r
-               <bool>true</bool>\r
-              </property>\r
-              <property name="echoMode">\r
-               <enum>QLineEdit::Normal</enum>\r
-              </property>\r
-              <property name="placeholderText">\r
-               <string>Channel(0-78)</string>\r
-              </property>\r
-              <property name="cursorMoveStyle">\r
-               <enum>Qt::LogicalMoveStyle</enum>\r
-              </property>\r
-              <property name="clearButtonEnabled">\r
-               <bool>false</bool>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="1" column="2">\r
-             <widget class="MyLineEdit" name="ledit_br_rx_channel_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string/>\r
-              </property>\r
-              <property name="placeholderText">\r
-               <string>Channel(0-78)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="1" column="3">\r
-             <widget class="QComboBox" name="cbox_br_rx_PacketType_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="contextMenuPolicy">\r
-               <enum>Qt::DefaultContextMenu</enum>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>DH1</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>DH3</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>DH5</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>2-DH1</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>2-DH3</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>2-DH5</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>3-DH1</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>3-DH3</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>3-DH5</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="5">\r
-             <widget class="QComboBox" name="cbox_br_tx_pattern_type_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>10101010</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>PRBS9</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>11110000</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="4">\r
-             <widget class="MyLineEdit" name="ledit_br_tx_PayloadLen_complete">\r
-              <property name="placeholderText">\r
-               <string>Length(0-27)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-         </widget>\r
-         <widget class="QGroupBox" name="groupBox_14">\r
-          <property name="geometry">\r
-           <rect>\r
-            <x>20</x>\r
-            <y>140</y>\r
-            <width>831</width>\r
-            <height>111</height>\r
-           </rect>\r
-          </property>\r
-          <property name="title">\r
-           <string>BLE</string>\r
-          </property>\r
-          <widget class="QWidget" name="layoutWidget_8">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>20</x>\r
-             <y>70</y>\r
-             <width>461</width>\r
-             <height>26</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QGridLayout" name="gridLayout_13" columnstretch="2,1,4,2">\r
-            <property name="rightMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <item row="0" column="1">\r
-             <widget class="QComboBox" name="cbox_ble_rx_on_or_off_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>ON</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="2">\r
-             <widget class="MyLineEdit" name="ledit_ble_rx_channel_complete">\r
-              <property name="placeholderText">\r
-               <string>Channel(0-39)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="3">\r
-             <widget class="QComboBox" name="cbox_ble_rx_PacketType_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="contextMenuPolicy">\r
-               <enum>Qt::DefaultContextMenu</enum>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>BLE 1M</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>BLE 2M</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="0">\r
-             <widget class="QPushButton" name="pbtn_ble_rx_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>BLE RX</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-          <widget class="QWidget" name="layoutWidget">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>20</x>\r
-             <y>21</y>\r
-             <width>761</width>\r
-             <height>25</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QGridLayout" name="gridLayout_6" columnstretch="2,1,4,2,4,2">\r
-            <item row="0" column="0">\r
-             <widget class="QPushButton" name="pbtn_ble_tx_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>BLE TX</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="1">\r
-             <widget class="QComboBox" name="cbox_ble_tx_on_or_off_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>ON</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="2">\r
-             <widget class="MyLineEdit" name="ledit_ble_tx_channel_complete">\r
-              <property name="placeholderText">\r
-               <string>Channel(0-39)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="3">\r
-             <widget class="QComboBox" name="cbox_ble_tx_pattern_type_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>10101010</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>PRBS9</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>11110000</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="4">\r
-             <widget class="MyLineEdit" name="ledit_ble_tx_PayloadLen_complete">\r
-              <property name="placeholderText">\r
-               <string>Length(0-255)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="5">\r
-             <widget class="QComboBox" name="cbox_ble_tx_PacketType_complete">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="contextMenuPolicy">\r
-               <enum>Qt::DefaultContextMenu</enum>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>BLE 1M</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>BLE 2M</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-          <widget class="QWidget" name="layoutWidget">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>560</x>\r
-             <y>70</y>\r
-             <width>221</width>\r
-             <height>25</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QHBoxLayout" name="horizontalLayout_3" stretch="1,2">\r
-            <item>\r
-             <widget class="QPushButton" name="pbtn_get_rx_count">\r
-              <property name="text">\r
-               <string>获取RX Count</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item>\r
-             <widget class="QLineEdit" name="ledit_display_rx_count">\r
-              <property name="text">\r
-               <string/>\r
-              </property>\r
-              <property name="alignment">\r
-               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>\r
-              </property>\r
-              <property name="placeholderText">\r
-               <string/>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-         </widget>\r
-        </widget>\r
-       </widget>\r
-      </widget>\r
-     </widget>\r
-    </widget>\r
-    <widget class="QWidget" name="page_board">\r
-     <widget class="QTabWidget" name="tbw_stage_board">\r
-      <property name="enabled">\r
-       <bool>false</bool>\r
-      </property>\r
-      <property name="geometry">\r
-       <rect>\r
-        <x>0</x>\r
-        <y>0</y>\r
-        <width>911</width>\r
-        <height>291</height>\r
-       </rect>\r
-      </property>\r
-      <property name="font">\r
-       <font>\r
-        <family>黑体</family>\r
-        <pointsize>12</pointsize>\r
-        <weight>50</weight>\r
-        <bold>false</bold>\r
-       </font>\r
-      </property>\r
-      <property name="currentIndex">\r
-       <number>2</number>\r
-      </property>\r
-      <widget class="QWidget" name="tab_board_debug">\r
-       <attribute name="title">\r
-        <string>Debug</string>\r
-       </attribute>\r
-       <widget class="QTextEdit" name="tedit_input_data_board">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>0</x>\r
-          <y>0</y>\r
-          <width>771</width>\r
-          <height>261</height>\r
-         </rect>\r
-        </property>\r
-       </widget>\r
-       <widget class="QPushButton" name="pbtn_send_data_board">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>790</x>\r
-          <y>30</y>\r
-          <width>75</width>\r
-          <height>23</height>\r
-         </rect>\r
-        </property>\r
-        <property name="font">\r
-         <font>\r
-          <family>黑体</family>\r
-          <pointsize>10</pointsize>\r
-          <weight>50</weight>\r
-          <bold>false</bold>\r
-         </font>\r
-        </property>\r
-        <property name="text">\r
-         <string>发送</string>\r
-        </property>\r
-       </widget>\r
-       <widget class="QPushButton" name="pbtn_board">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>790</x>\r
-          <y>83</y>\r
-          <width>75</width>\r
-          <height>23</height>\r
-         </rect>\r
-        </property>\r
-        <property name="font">\r
-         <font>\r
-          <family>黑体</family>\r
-          <pointsize>10</pointsize>\r
-          <weight>50</weight>\r
-          <bold>false</bold>\r
-         </font>\r
-        </property>\r
-        <property name="text">\r
-         <string>清除发送</string>\r
-        </property>\r
-       </widget>\r
-       <widget class="QCheckBox" name="ckbox_word_wrap_board">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>789</x>\r
-          <y>157</y>\r
-          <width>88</width>\r
-          <height>16</height>\r
-         </rect>\r
-        </property>\r
-        <property name="font">\r
-         <font>\r
-          <family>黑体</family>\r
-          <pointsize>10</pointsize>\r
-          <weight>50</weight>\r
-          <bold>false</bold>\r
-         </font>\r
-        </property>\r
-        <property name="text">\r
-         <string>加回车换行</string>\r
-        </property>\r
-        <property name="tristate">\r
-         <bool>false</bool>\r
-        </property>\r
-       </widget>\r
-      </widget>\r
-      <widget class="QWidget" name="tab_board_mcu">\r
-       <attribute name="title">\r
-        <string>MCU</string>\r
-       </attribute>\r
-      </widget>\r
-      <widget class="QWidget" name="tab_board_bt">\r
-       <attribute name="title">\r
-        <string>BT</string>\r
-       </attribute>\r
-       <widget class="QTabWidget" name="tabWidget_BT">\r
-        <property name="geometry">\r
-         <rect>\r
-          <x>0</x>\r
-          <y>0</y>\r
-          <width>911</width>\r
-          <height>281</height>\r
-         </rect>\r
-        </property>\r
-        <property name="font">\r
-         <font>\r
-          <family>黑体</family>\r
-          <pointsize>10</pointsize>\r
-          <weight>50</weight>\r
-          <bold>false</bold>\r
-         </font>\r
-        </property>\r
-        <property name="tabPosition">\r
-         <enum>QTabWidget::West</enum>\r
-        </property>\r
-        <property name="tabShape">\r
-         <enum>QTabWidget::Triangular</enum>\r
-        </property>\r
-        <property name="currentIndex">\r
-         <number>2</number>\r
-        </property>\r
-        <property name="elideMode">\r
-         <enum>Qt::ElideNone</enum>\r
-        </property>\r
-        <property name="tabBarAutoHide">\r
-         <bool>false</bool>\r
-        </property>\r
-        <widget class="QWidget" name="tab_bt_rftest">\r
-         <attribute name="title">\r
-          <string>非信令测试</string>\r
-         </attribute>\r
-         <widget class="QGroupBox" name="groupBox_11">\r
-          <property name="geometry">\r
-           <rect>\r
-            <x>20</x>\r
-            <y>140</y>\r
-            <width>831</width>\r
-            <height>111</height>\r
-           </rect>\r
-          </property>\r
-          <property name="title">\r
-           <string>BLE</string>\r
-          </property>\r
-          <widget class="QWidget" name="layoutWidget_2">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>20</x>\r
-             <y>20</y>\r
-             <width>761</width>\r
-             <height>25</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QGridLayout" name="gridLayout_7" columnstretch="2,1,4,2,4,2">\r
-            <item row="0" column="0">\r
-             <widget class="QPushButton" name="pbtn_ble_tx_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>BLE TX</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="1">\r
-             <widget class="QComboBox" name="cbox_ble_tx_on_or_off_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>ON</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>OFF</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="2">\r
-             <widget class="MyLineEdit" name="ledit_ble_tx_channel_board">\r
-              <property name="whatsThis">\r
-               <string/>\r
-              </property>\r
-              <property name="placeholderText">\r
-               <string>Channel(0-39)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="3">\r
-             <widget class="QComboBox" name="cbox_ble_tx_pattern_type_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>10101010</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>PRBS9</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>11110000</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="4">\r
-             <widget class="MyLineEdit" name="ledit_ble_tx_PayloadLen_board">\r
-              <property name="placeholderText">\r
-               <string>Length(0-255)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="5">\r
-             <widget class="QComboBox" name="cbox_ble_tx_PacketType_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="contextMenuPolicy">\r
-               <enum>Qt::DefaultContextMenu</enum>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>BLE 1M</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>BLE 2M</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-          <widget class="QWidget" name="layoutWidget_9">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>20</x>\r
-             <y>69</y>\r
-             <width>461</width>\r
-             <height>26</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QGridLayout" name="gridLayout_14" columnstretch="2,1,4,2">\r
-            <property name="rightMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <item row="0" column="1">\r
-             <widget class="QComboBox" name="cbox_ble_rx_on_or_off_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>ON</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>OFF</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="2">\r
-             <widget class="MyLineEdit" name="ledit_ble_rx_channel_board">\r
-              <property name="placeholderText">\r
-               <string>Channel(0-39)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="3">\r
-             <widget class="QComboBox" name="cbox_ble_rx_PacketType_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="contextMenuPolicy">\r
-               <enum>Qt::DefaultContextMenu</enum>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>BLE 1M</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>BLE 2M</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="0">\r
-             <widget class="QPushButton" name="pbtn_ble_rx_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>BLE RX</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-         </widget>\r
-         <widget class="QGroupBox" name="groupBox_15">\r
-          <property name="geometry">\r
-           <rect>\r
-            <x>20</x>\r
-            <y>10</y>\r
-            <width>831</width>\r
-            <height>121</height>\r
-           </rect>\r
-          </property>\r
-          <property name="title">\r
-           <string>BR EDR</string>\r
-          </property>\r
-          <widget class="QWidget" name="layoutWidget_3">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>20</x>\r
-             <y>20</y>\r
-             <width>761</width>\r
-             <height>81</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QGridLayout" name="gridLayout_8" columnstretch="2,1,4,2,4,2">\r
-            <item row="1" column="1">\r
-             <widget class="QComboBox" name="cbox_br_rx_on_or_off_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>ON</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>OFF</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="1" column="5">\r
-             <widget class="QComboBox" name="cbox_br_rx_pattern_type_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>10101010</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>PRBS9</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>11110000</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="3">\r
-             <widget class="QComboBox" name="cbox_br_tx_PacketType_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="contextMenuPolicy">\r
-               <enum>Qt::DefaultContextMenu</enum>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>DH1</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>DH3</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>DH5</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>2-DH1</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>2-DH3</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>2-DH5</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>3-DH1</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>3-DH3</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>3-DH5</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="2">\r
-             <widget class="MyLineEdit" name="ledit_br_tx_channel_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string/>\r
-              </property>\r
-              <property name="placeholderText">\r
-               <string>Channel(0-78)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="5">\r
-             <widget class="QComboBox" name="cbox_br_tx_pattern_type_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>10101010</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>PRBS9</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>11110000</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="1" column="0">\r
-             <widget class="QPushButton" name="pbtn_br_rx_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>BR RX</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="4">\r
-             <widget class="MyLineEdit" name="ledit_br_tx_PayloadLen_board">\r
-              <property name="placeholderText">\r
-               <string>Length(0-27)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="1">\r
-             <widget class="QComboBox" name="cbox_br_tx_on_or_off_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="minimumContentsLength">\r
-               <number>0</number>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>ON</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>OFF</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="1" column="4">\r
-             <widget class="MyLineEdit" name="ledit_br_rx_PayloadLen_board">\r
-              <property name="placeholderText">\r
-               <string>Length(0-27)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="0">\r
-             <widget class="QPushButton" name="pbtn_br_tx_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>BR TX</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="1" column="3">\r
-             <widget class="QComboBox" name="cbox_br_rx_PacketType_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="contextMenuPolicy">\r
-               <enum>Qt::DefaultContextMenu</enum>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>DH1</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>DH3</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>DH5</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>2-DH1</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>2-DH3</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>2-DH5</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>3-DH1</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>3-DH3</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>3-DH5</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="1" column="2">\r
-             <widget class="MyLineEdit" name="ledit_br_rx_channel_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string/>\r
-              </property>\r
-              <property name="placeholderText">\r
-               <string>Channel(0-78)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-         </widget>\r
-        </widget>\r
-        <widget class="QWidget" name="tab_bt_duttest">\r
-         <attribute name="title">\r
-          <string>信令测试</string>\r
-         </attribute>\r
-         <widget class="QGroupBox" name="groupBox_12">\r
-          <property name="geometry">\r
-           <rect>\r
-            <x>20</x>\r
-            <y>10</y>\r
-            <width>831</width>\r
-            <height>111</height>\r
-           </rect>\r
-          </property>\r
-          <property name="title">\r
-           <string>信令</string>\r
-          </property>\r
-          <widget class="QWidget" name="layoutWidget_5">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>20</x>\r
-             <y>30</y>\r
-             <width>371</width>\r
-             <height>29</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QGridLayout" name="gridLayout_11" columnstretch="2,2,1,2">\r
-            <property name="leftMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <property name="topMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <property name="rightMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <property name="bottomMargin">\r
-             <number>3</number>\r
-            </property>\r
-            <item row="0" column="1">\r
-             <widget class="QPushButton" name="pbtn_btdutmode_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>BTDUTMODE</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="0">\r
-             <widget class="QLabel" name="label_7">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Preferred">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>信令测试:</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="3">\r
-             <widget class="QComboBox" name="cbox_btdutmode_on_or_off_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>ON</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>OFF</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="2">\r
-             <spacer name="horizontalSpacer_3">\r
-              <property name="orientation">\r
-               <enum>Qt::Horizontal</enum>\r
-              </property>\r
-              <property name="sizeHint" stdset="0">\r
-               <size>\r
-                <width>30</width>\r
-                <height>20</height>\r
-               </size>\r
-              </property>\r
-             </spacer>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-         </widget>\r
-        </widget>\r
-        <widget class="QWidget" name="tab">\r
-         <attribute name="title">\r
-          <string>其他</string>\r
-         </attribute>\r
-         <widget class="QGroupBox" name="groupBox_6">\r
-          <property name="geometry">\r
-           <rect>\r
-            <x>20</x>\r
-            <y>20</y>\r
-            <width>791</width>\r
-            <height>121</height>\r
-           </rect>\r
-          </property>\r
-          <property name="title">\r
-           <string>单音测试与功率调整</string>\r
-          </property>\r
-          <widget class="QWidget" name="layoutWidget">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>30</x>\r
-             <y>40</y>\r
-             <width>731</width>\r
-             <height>25</height>\r
-            </rect>\r
-           </property>\r
-           <layout class="QGridLayout" name="gridLayout_9" columnstretch="4,1,8,8,4,1,8">\r
-            <property name="horizontalSpacing">\r
-             <number>10</number>\r
-            </property>\r
-            <item row="0" column="2">\r
-             <widget class="QLineEdit" name="ledit_btlo_channel">\r
-              <property name="placeholderText">\r
-               <string>channel(0-78)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="4">\r
-             <widget class="QPushButton" name="pbtn_btpwr_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>功率调整</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="0">\r
-             <widget class="QPushButton" name="pbtn_btlo_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <property name="text">\r
-               <string>单音测试</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="5">\r
-             <widget class="QComboBox" name="cbox_btpwr_on_or_off_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>ON</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>OFF</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="1">\r
-             <widget class="QComboBox" name="cbox_btlo_on_or_off_board">\r
-              <property name="sizePolicy">\r
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
-                <horstretch>0</horstretch>\r
-                <verstretch>0</verstretch>\r
-               </sizepolicy>\r
-              </property>\r
-              <item>\r
-               <property name="text">\r
-                <string>ON</string>\r
-               </property>\r
-              </item>\r
-              <item>\r
-               <property name="text">\r
-                <string>OFF</string>\r
-               </property>\r
-              </item>\r
-             </widget>\r
-            </item>\r
-            <item row="0" column="3">\r
-             <spacer name="horizontalSpacer_2">\r
-              <property name="orientation">\r
-               <enum>Qt::Horizontal</enum>\r
-              </property>\r
-              <property name="sizeHint" stdset="0">\r
-               <size>\r
-                <width>40</width>\r
-                <height>20</height>\r
-               </size>\r
-              </property>\r
-             </spacer>\r
-            </item>\r
-            <item row="0" column="6">\r
-             <widget class="QLineEdit" name="ledit_btpwr_powerchip">\r
-              <property name="placeholderText">\r
-               <string>power chip(2-14)</string>\r
-              </property>\r
-             </widget>\r
-            </item>\r
-           </layout>\r
-          </widget>\r
-         </widget>\r
-         <widget class="QGroupBox" name="groupBox_8">\r
-          <property name="geometry">\r
-           <rect>\r
-            <x>20</x>\r
-            <y>140</y>\r
-            <width>791</width>\r
-            <height>111</height>\r
-           </rect>\r
-          </property>\r
-          <property name="title">\r
-           <string>BT_UART</string>\r
-          </property>\r
-          <widget class="QPushButton" name="pushButton_3">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>30</x>\r
-             <y>40</y>\r
-             <width>75</width>\r
-             <height>23</height>\r
-            </rect>\r
-           </property>\r
-           <property name="text">\r
-            <string>唤醒</string>\r
-           </property>\r
-          </widget>\r
-          <widget class="QPushButton" name="pushButton_4">\r
-           <property name="geometry">\r
-            <rect>\r
-             <x>150</x>\r
-             <y>40</y>\r
-             <width>75</width>\r
-             <height>23</height>\r
-            </rect>\r
-           </property>\r
-           <property name="text">\r
-            <string>睡眠</string>\r
-           </property>\r
-          </widget>\r
-         </widget>\r
-        </widget>\r
-       </widget>\r
-      </widget>\r
-     </widget>\r
-    </widget>\r
-   </widget>\r
-   <widget class="QWidget" name="layoutWidget">\r
-    <property name="geometry">\r
-     <rect>\r
-      <x>650</x>\r
-      <y>0</y>\r
-      <width>224</width>\r
-      <height>389</height>\r
-     </rect>\r
-    </property>\r
-    <layout class="QGridLayout" name="gridLayout">\r
-     <property name="leftMargin">\r
-      <number>5</number>\r
-     </property>\r
-     <property name="topMargin">\r
-      <number>20</number>\r
-     </property>\r
-     <property name="rightMargin">\r
-      <number>5</number>\r
-     </property>\r
-     <property name="bottomMargin">\r
-      <number>20</number>\r
-     </property>\r
-     <property name="spacing">\r
-      <number>20</number>\r
-     </property>\r
-     <item row="1" column="0" colspan="3">\r
+    <layout class="QVBoxLayout" name="verticalLayout_2">\r
+     <item>\r
       <widget class="QComboBox" name="cbox_uart_baud_select">\r
        <property name="sizePolicy">\r
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">\r
+        <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
          <horstretch>0</horstretch>\r
          <verstretch>0</verstretch>\r
         </sizepolicy>\r
        </property>\r
        <property name="font">\r
         <font>\r
-         <family>黑体</family>\r
-         <pointsize>9</pointsize>\r
+         <family>Arial</family>\r
+         <pointsize>14</pointsize>\r
          <weight>50</weight>\r
          <bold>false</bold>\r
         </font>\r
         <bool>false</bool>\r
        </property>\r
        <property name="currentText">\r
-        <string>115200</string>\r
+        <string>500000</string>\r
        </property>\r
        <property name="currentIndex">\r
-        <number>6</number>\r
+        <number>11</number>\r
        </property>\r
        <property name="duplicatesEnabled">\r
         <bool>true</bool>\r
        </item>\r
       </widget>\r
      </item>\r
-     <item row="3" column="0" colspan="3">\r
-      <widget class="QLineEdit" name="ledit_spp_addr">\r
+     <item>\r
+      <widget class="QPushButton" name="pbtn_spp_connect_all">\r
+       <property name="enabled">\r
+        <bool>true</bool>\r
+       </property>\r
        <property name="sizePolicy">\r
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">\r
+        <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
          <horstretch>0</horstretch>\r
          <verstretch>0</verstretch>\r
         </sizepolicy>\r
        </property>\r
        <property name="font">\r
         <font>\r
-         <family>黑体</family>\r
-         <pointsize>9</pointsize>\r
+         <family>Arial</family>\r
+         <pointsize>14</pointsize>\r
          <weight>50</weight>\r
          <bold>false</bold>\r
         </font>\r
        </property>\r
-       <property name="whatsThis">\r
-        <string/>\r
+       <property name="text">\r
+        <string>全部开始写地址</string>\r
        </property>\r
-       <property name="placeholderText">\r
-        <string>         MAC地址</string>\r
+       <property name="checkable">\r
+        <bool>false</bool>\r
        </property>\r
       </widget>\r
      </item>\r
-     <item row="2" column="0">\r
-      <widget class="QLabel" name="label_3">\r
-       <property name="sizePolicy">\r
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">\r
-         <horstretch>0</horstretch>\r
-         <verstretch>0</verstretch>\r
-        </sizepolicy>\r
-       </property>\r
-       <property name="text">\r
-        <string>串口操作</string>\r
+     <item>\r
+      <widget class="QPushButton" name="pushButton_open_mac_config">\r
+       <property name="enabled">\r
+        <bool>true</bool>\r
        </property>\r
-      </widget>\r
-     </item>\r
-     <item row="6" column="0">\r
-      <widget class="QCheckBox" name="ckbox_rts">\r
        <property name="sizePolicy">\r
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">\r
+        <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
          <horstretch>0</horstretch>\r
          <verstretch>0</verstretch>\r
         </sizepolicy>\r
        </property>\r
        <property name="font">\r
         <font>\r
-         <family>黑体</family>\r
-         <pointsize>9</pointsize>\r
+         <family>Arial</family>\r
+         <pointsize>14</pointsize>\r
          <weight>50</weight>\r
          <bold>false</bold>\r
         </font>\r
        </property>\r
        <property name="text">\r
-        <string>RTS</string>\r
-       </property>\r
-      </widget>\r
-     </item>\r
-     <item row="5" column="0">\r
-      <widget class="QPushButton" name="pushButton">\r
-       <property name="sizePolicy">\r
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">\r
-         <horstretch>0</horstretch>\r
-         <verstretch>0</verstretch>\r
-        </sizepolicy>\r
-       </property>\r
-       <property name="font">\r
-        <font>\r
-         <family>黑体</family>\r
-         <pointsize>9</pointsize>\r
-         <weight>50</weight>\r
-         <bold>false</bold>\r
-        </font>\r
+        <string>设置Mac地址</string>\r
        </property>\r
-       <property name="text">\r
-        <string>保存窗口</string>\r
+       <property name="checkable">\r
+        <bool>false</bool>\r
        </property>\r
       </widget>\r
      </item>\r
-     <item row="6" column="1">\r
-      <widget class="QCheckBox" name="ckbox_dtr">\r
-       <property name="sizePolicy">\r
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">\r
-         <horstretch>0</horstretch>\r
-         <verstretch>0</verstretch>\r
-        </sizepolicy>\r
-       </property>\r
+     <item>\r
+      <widget class="QTextBrowser" name="textBrowser_result">\r
        <property name="font">\r
         <font>\r
-         <family>黑体</family>\r
-         <pointsize>9</pointsize>\r
-         <weight>50</weight>\r
-         <bold>false</bold>\r
+         <family>Arial</family>\r
+         <pointsize>14</pointsize>\r
         </font>\r
        </property>\r
-       <property name="text">\r
-        <string>DTR</string>\r
+       <property name="html">\r
+        <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;\r
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;\r
+p, li { white-space: pre-wrap; }\r
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Arial'; font-size:14pt; font-weight:400; font-style:normal;&quot;&gt;\r
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'黑体'; font-size:9pt;&quot;&gt;28110601012D 至&lt;/span&gt;&lt;/p&gt;\r
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'黑体'; font-size:9pt;&quot;&gt;2811060287CD&lt;/span&gt;&lt;/p&gt;\r
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'黑体'; font-size:9pt;&quot;&gt;共 100000 地址&lt;/span&gt;&lt;/p&gt;\r
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'黑体'; font-size:9pt;&quot;&gt;截止:2024-11-1&lt;/span&gt;&lt;/p&gt;\r
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'黑体'; font-size:9pt;&quot;&gt;已成功写入 0 地址&lt;/span&gt;&lt;/p&gt;\r
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'黑体'; font-size:9pt;&quot;&gt;还剩余 1000 地址&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>\r
        </property>\r
       </widget>\r
      </item>\r
-     <item row="7" column="0">\r
-      <widget class="QCheckBox" name="ckbox_Hex_Display">\r
-       <property name="sizePolicy">\r
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">\r
-         <horstretch>0</horstretch>\r
-         <verstretch>0</verstretch>\r
-        </sizepolicy>\r
-       </property>\r
+     <item>\r
+      <widget class="QPushButton" name="pushButton_openlogfolder">\r
        <property name="font">\r
         <font>\r
-         <family>黑体</family>\r
-         <pointsize>9</pointsize>\r
-         <weight>50</weight>\r
-         <bold>false</bold>\r
+         <family>Arial</family>\r
+         <pointsize>14</pointsize>\r
         </font>\r
        </property>\r
        <property name="text">\r
-        <string>16进制显示</string>\r
-       </property>\r
-      </widget>\r
-     </item>\r
-     <item row="2" column="1" colspan="2">\r
-      <widget class="QPushButton" name="pbtn_open_uart">\r
-       <property name="sizePolicy">\r
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">\r
-         <horstretch>0</horstretch>\r
-         <verstretch>0</verstretch>\r
-        </sizepolicy>\r
-       </property>\r
-       <property name="font">\r
-        <font>\r
-         <family>黑体</family>\r
-         <pointsize>9</pointsize>\r
-         <weight>50</weight>\r
-         <bold>false</bold>\r
-        </font>\r
-       </property>\r
-       <property name="text">\r
-        <string>打开串口</string>\r
-       </property>\r
-       <property name="checkable">\r
-        <bool>true</bool>\r
-       </property>\r
-       <property name="autoDefault">\r
-        <bool>false</bool>\r
-       </property>\r
-       <property name="default">\r
-        <bool>false</bool>\r
-       </property>\r
-       <property name="flat">\r
-        <bool>false</bool>\r
-       </property>\r
-      </widget>\r
-     </item>\r
-     <item row="4" column="0" colspan="2">\r
-      <widget class="QPushButton" name="pbtn_spp_connect">\r
-       <property name="enabled">\r
-        <bool>false</bool>\r
-       </property>\r
-       <property name="sizePolicy">\r
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">\r
-         <horstretch>0</horstretch>\r
-         <verstretch>0</verstretch>\r
-        </sizepolicy>\r
-       </property>\r
-       <property name="font">\r
-        <font>\r
-         <family>黑体</family>\r
-         <pointsize>9</pointsize>\r
-         <weight>50</weight>\r
-         <bold>false</bold>\r
-        </font>\r
-       </property>\r
-       <property name="text">\r
-        <string>连接设备</string>\r
-       </property>\r
-       <property name="checkable">\r
-        <bool>false</bool>\r
-       </property>\r
-      </widget>\r
-     </item>\r
-     <item row="7" column="1" colspan="2">\r
-      <widget class="QCheckBox" name="ckbox_hex_send">\r
-       <property name="sizePolicy">\r
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">\r
-         <horstretch>0</horstretch>\r
-         <verstretch>0</verstretch>\r
-        </sizepolicy>\r
-       </property>\r
-       <property name="font">\r
-        <font>\r
-         <family>黑体</family>\r
-         <pointsize>9</pointsize>\r
-         <weight>50</weight>\r
-         <bold>false</bold>\r
-        </font>\r
-       </property>\r
-       <property name="text">\r
-        <string>16进制发送</string>\r
-       </property>\r
-      </widget>\r
-     </item>\r
-     <item row="0" column="0" colspan="3">\r
-      <widget class="MyComboBox" name="cbox_uart_com_select">\r
-       <property name="sizePolicy">\r
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">\r
-         <horstretch>0</horstretch>\r
-         <verstretch>0</verstretch>\r
-        </sizepolicy>\r
-       </property>\r
-       <property name="font">\r
-        <font>\r
-         <family>黑体</family>\r
-         <pointsize>9</pointsize>\r
-         <weight>50</weight>\r
-         <bold>false</bold>\r
-        </font>\r
-       </property>\r
-       <item>\r
-        <property name="text">\r
-         <string>COM1</string>\r
-        </property>\r
-       </item>\r
-      </widget>\r
-     </item>\r
-     <item row="5" column="1" colspan="2">\r
-      <widget class="QPushButton" name="pbtn_clear_display">\r
-       <property name="sizePolicy">\r
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">\r
-         <horstretch>0</horstretch>\r
-         <verstretch>0</verstretch>\r
-        </sizepolicy>\r
-       </property>\r
-       <property name="font">\r
-        <font>\r
-         <family>黑体</family>\r
-         <pointsize>9</pointsize>\r
-         <weight>50</weight>\r
-         <bold>false</bold>\r
-        </font>\r
-       </property>\r
-       <property name="text">\r
-        <string>清除接收</string>\r
-       </property>\r
-      </widget>\r
-     </item>\r
-     <item row="4" column="2">\r
-      <widget class="QPushButton" name="connected_flag">\r
-       <property name="maximumSize">\r
-        <size>\r
-         <width>20</width>\r
-         <height>20</height>\r
-        </size>\r
-       </property>\r
-       <property name="styleSheet">\r
-        <string notr="true">QPushButton{background-color: rgb(255, 0, 0);}</string>\r
-       </property>\r
-       <property name="text">\r
-        <string/>\r
+        <string>打开日志路径</string>\r
        </property>\r
       </widget>\r
      </item>\r
     </layout>\r
    </widget>\r
-  </widget>\r
-  <widget class="QMenuBar" name="menubar">\r
-   <property name="geometry">\r
-    <rect>\r
-     <x>0</x>\r
-     <y>0</y>\r
-     <width>890</width>\r
-     <height>22</height>\r
-    </rect>\r
-   </property>\r
-   <property name="font">\r
-    <font>\r
-     <family>黑体</family>\r
-     <pointsize>12</pointsize>\r
-     <weight>50</weight>\r
-     <bold>false</bold>\r
-    </font>\r
-   </property>\r
-   <widget class="QMenu" name="menu">\r
+   <widget class="QSplitter" name="splitter">\r
+    <property name="geometry">\r
+     <rect>\r
+      <x>0</x>\r
+      <y>10</y>\r
+      <width>1032</width>\r
+      <height>621</height>\r
+     </rect>\r
+    </property>\r
     <property name="font">\r
      <font>\r
-      <pointsize>12</pointsize>\r
+      <family>Arial</family>\r
+      <pointsize>14</pointsize>\r
      </font>\r
     </property>\r
-    <property name="title">\r
-     <string>菜单</string>\r
+    <property name="orientation">\r
+     <enum>Qt::Horizontal</enum>\r
     </property>\r
-    <addaction name="action_complete"/>\r
-    <addaction name="separator"/>\r
-    <addaction name="action_board"/>\r
-   </widget>\r
-   <addaction name="menu"/>\r
-  </widget>\r
-  <widget class="QStatusBar" name="statusbar">\r
-   <property name="enabled">\r
-    <bool>true</bool>\r
-   </property>\r
-   <property name="sizeGripEnabled">\r
-    <bool>true</bool>\r
-   </property>\r
-  </widget>\r
-  <action name="action_complete">\r
-   <property name="checkable">\r
-    <bool>true</bool>\r
-   </property>\r
-   <property name="checked">\r
-    <bool>true</bool>\r
-   </property>\r
-   <property name="text">\r
-    <string>整机</string>\r
-   </property>\r
-   <property name="font">\r
-    <font>\r
-     <family>黑体</family>\r
-     <pointsize>12</pointsize>\r
-    </font>\r
-   </property>\r
-  </action>\r
-  <action name="action_board">\r
-   <property name="checkable">\r
-    <bool>true</bool>\r
-   </property>\r
-   <property name="checked">\r
-    <bool>false</bool>\r
-   </property>\r
-   <property name="text">\r
-    <string>单板</string>\r
-   </property>\r
-   <property name="font">\r
-    <font>\r
-     <pointsize>12</pointsize>\r
-    </font>\r
-   </property>\r
-  </action>\r
-  <action name="actiondongle">\r
-   <property name="text">\r
-    <string>dongle调试</string>\r
-   </property>\r
-   <property name="font">\r
-    <font>\r
-     <pointsize>12</pointsize>\r
-    </font>\r
-   </property>\r
-  </action>\r
- </widget>\r
- <customwidgets>\r
-  <customwidget>\r
-   <class>MyComboBox</class>\r
-   <extends>QComboBox</extends>\r
-   <header location="global">custom.h</header>\r
-   <slots>\r
-    <signal>mouse_clicked(bool)</signal>\r
-   </slots>\r
-  </customwidget>\r
-  <customwidget>\r
-   <class>MyLineEdit</class>\r
-   <extends>QLineEdit</extends>\r
-   <header location="global">custom.h</header>\r
-  </customwidget>\r
- </customwidgets>\r
- <resources/>\r
- <connections>\r
-  <connection>\r
-   <sender>pbtn_open_uart</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>uart_process()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>849</x>\r
-     <y>154</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>838</x>\r
-     <y>261</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_clear_display</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>txtb_dispaly</receiver>\r
-   <slot>clear()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>849</x>\r
-     <y>293</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>614</x>\r
-     <y>380</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>ckbox_dtr</sender>\r
-   <signal>stateChanged(int)</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>uart_check_dtr_rts()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>815</x>\r
-     <y>334</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>882</x>\r
-     <y>371</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>ckbox_rts</sender>\r
-   <signal>stateChanged(int)</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>uart_check_dtr_rts()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>711</x>\r
-     <y>334</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>758</x>\r
-     <y>373</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>cbox_uart_com_select</sender>\r
-   <signal>mouse_clicked(bool)</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>uart_com_select()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>719</x>\r
-     <y>61</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>888</x>\r
-     <y>100</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_spp_connect</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>spp_connect()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>811</x>\r
-     <y>245</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>888</x>\r
-     <y>267</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_toboard_stop</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>transmit_toboard_stop()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>810</x>\r
-     <y>559</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>739</x>\r
-     <y>294</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_toboard_Upload</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>transmit_toboard_upload()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>715</x>\r
-     <y>559</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>665</x>\r
-     <y>296</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_fromboard_getfilelist</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>transmit_fromboard_getfilelist()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>670</x>\r
-     <y>609</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>654</x>\r
-     <y>408</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_send_data</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>uart_send_data()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>844</x>\r
-     <y>469</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>865</x>\r
-     <y>411</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_fromboard_download</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>transmit_fromboard_download()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>830</x>\r
-     <y>489</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>849</x>\r
-     <y>420</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_fromboard_selectfilepath</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>transmit_fromboard_selectfilepath()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>665</x>\r
-     <y>489</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>673</x>\r
-     <y>417</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_clear_senddata</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>tedit_input_data</receiver>\r
-   <slot>clear()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>866</x>\r
-     <y>522</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>700</x>\r
-     <y>591</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_fromboard_stop</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>transmit_fromboard_stop()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>855</x>\r
-     <y>605</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>676</x>\r
-     <y>315</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_fromboard_delete</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>transmit_fromboard_delete()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>855</x>\r
-     <y>547</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>671</x>\r
-     <y>351</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>ledit_formboad_bordpath</sender>\r
-   <signal>textEdited(QString)</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>transmit_fromboard_name_change()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>499</x>\r
-     <y>566</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>688</x>\r
-     <y>273</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_toboard_choosefile</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>transmit_toboard_choosefile()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>736</x>\r
-     <y>499</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>660</x>\r
-     <y>343</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>action_complete</sender>\r
-   <signal>triggered(bool)</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>ui_tab_mainwindow_complete()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>-1</x>\r
-     <y>-1</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>468</x>\r
-     <y>363</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>action_board</sender>\r
-   <signal>triggered(bool)</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>ui_tab_mainwindow_board()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>-1</x>\r
-     <y>-1</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>539</x>\r
-     <y>363</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_board</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>tedit_input_data_board</receiver>\r
-   <slot>clear()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>822</x>\r
-     <y>522</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>767</x>\r
-     <y>568</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_send_data_board</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>uart_send_data()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>842</x>\r
-     <y>469</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>888</x>\r
-     <y>484</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_at_mediaaudiorecord</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_mediaaudiorecord_send()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>646</x>\r
-     <y>535</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>643</x>\r
-     <y>285</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_at_stackinfo</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_stackinfo_send()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>160</x>\r
-     <y>485</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>654</x>\r
-     <y>412</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_at_fsrm</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_fsrm_send()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>428</x>\r
-     <y>544</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>655</x>\r
-     <y>254</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_at_mediamusicstop</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_mediamusicstop_send()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>646</x>\r
-     <y>485</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>656</x>\r
-     <y>381</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_at_mediamusicplay</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_mediamusicplay_send()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>545</x>\r
-     <y>485</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>654</x>\r
-     <y>330</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_br_tx_complete</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_bt_tx_complete()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>156</x>\r
-     <y>481</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>636</x>\r
-     <y>372</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_br_rx_complete</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_bt_rx_complete()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>156</x>\r
-     <y>519</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>637</x>\r
-     <y>335</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_ble_tx_complete</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_ble_tx_complete()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>149</x>\r
-     <y>603</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>639</x>\r
-     <y>361</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_ble_rx_complete</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_ble_rx_complete()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>141</x>\r
-     <y>652</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>444</x>\r
-     <y>354</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_br_tx_board</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_bt_tx_board()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>156</x>\r
-     <y>481</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>639</x>\r
-     <y>325</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_br_rx_board</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_bt_rx_board()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>156</x>\r
-     <y>519</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>646</x>\r
-     <y>169</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_btdutmode_board</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_bt_dutmode_board()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>265</x>\r
-     <y>484</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>646</x>\r
-     <y>210</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_ble_tx_board</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_ble_tx_board()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>139</x>\r
-     <y>581</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>633</x>\r
-     <y>248</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_ble_rx_board</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_ble_rx_board()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>139</x>\r
-     <y>630</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>643</x>\r
-     <y>204</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_get_rx_count</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_get_rx_count_complete()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>674</x>\r
-     <y>652</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>647</x>\r
-     <y>134</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>pbtn_delay_time</sender>\r
-   <signal>clicked()</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_bt_delay_ms_complete()</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>134</x>\r
-     <y>492</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>637</x>\r
-     <y>161</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
+    <widget class="QWidget" name="verticalLayoutWidget">\r
+     <property name="font">\r
+      <font>\r
+       <family>Arial</family>\r
+       <pointsize>14</pointsize>\r
+      </font>\r
+     </property>\r
+     <layout class="QVBoxLayout" name="verticalLayout">\r
+      <item>\r
+       <widget class="MyComboBox" name="cbox_uart_com_select_1">\r
+        <property name="sizePolicy">\r
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
+          <horstretch>0</horstretch>\r
+          <verstretch>0</verstretch>\r
+         </sizepolicy>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+          <weight>50</weight>\r
+          <bold>false</bold>\r
+         </font>\r
+        </property>\r
+        <item>\r
+         <property name="text">\r
+          <string>COM1</string>\r
+         </property>\r
+        </item>\r
+       </widget>\r
+      </item>\r
+      <item>\r
+       <widget class="QLineEdit" name="ledit_spp_addr_1">\r
+        <property name="sizePolicy">\r
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
+          <horstretch>0</horstretch>\r
+          <verstretch>0</verstretch>\r
+         </sizepolicy>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+          <weight>50</weight>\r
+          <bold>false</bold>\r
+         </font>\r
+        </property>\r
+        <property name="whatsThis">\r
+         <string/>\r
+        </property>\r
+        <property name="placeholderText">\r
+         <string>MAC地址</string>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item>\r
+       <widget class="QPushButton" name="pbtn_spp_reconnect_1">\r
+        <property name="enabled">\r
+         <bool>true</bool>\r
+        </property>\r
+        <property name="sizePolicy">\r
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
+          <horstretch>0</horstretch>\r
+          <verstretch>0</verstretch>\r
+         </sizepolicy>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+          <weight>50</weight>\r
+          <bold>false</bold>\r
+         </font>\r
+        </property>\r
+        <property name="text">\r
+         <string>开始写地址</string>\r
+        </property>\r
+        <property name="checkable">\r
+         <bool>false</bool>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item>\r
+       <widget class="QTextBrowser" name="txtb_dispaly">\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+         </font>\r
+        </property>\r
+        <property name="mouseTracking">\r
+         <bool>true</bool>\r
+        </property>\r
+        <property name="styleSheet">\r
+         <string notr="true">QTextBrowser{background-color:rgb(26, 26, 26);\r
+                       color:rgb(127, 255, 0)}</string>\r
+        </property>\r
+        <property name="lineWidth">\r
+         <number>1</number>\r
+        </property>\r
+        <property name="verticalScrollBarPolicy">\r
+         <enum>Qt::ScrollBarAlwaysOn</enum>\r
+        </property>\r
+        <property name="textInteractionFlags">\r
+         <set>Qt::TextBrowserInteraction</set>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+     </layout>\r
+    </widget>\r
+    <widget class="QWidget" name="verticalLayoutWidget_3">\r
+     <property name="font">\r
+      <font>\r
+       <family>Arial</family>\r
+       <pointsize>14</pointsize>\r
+      </font>\r
+     </property>\r
+     <layout class="QVBoxLayout" name="verticalLayout_3">\r
+      <item>\r
+       <widget class="MyComboBox" name="cbox_uart_com_select_2">\r
+        <property name="sizePolicy">\r
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
+          <horstretch>0</horstretch>\r
+          <verstretch>0</verstretch>\r
+         </sizepolicy>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+          <weight>50</weight>\r
+          <bold>false</bold>\r
+         </font>\r
+        </property>\r
+        <item>\r
+         <property name="text">\r
+          <string>COM1</string>\r
+         </property>\r
+        </item>\r
+       </widget>\r
+      </item>\r
+      <item>\r
+       <widget class="QLineEdit" name="ledit_spp_addr_2">\r
+        <property name="sizePolicy">\r
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
+          <horstretch>0</horstretch>\r
+          <verstretch>0</verstretch>\r
+         </sizepolicy>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+          <weight>50</weight>\r
+          <bold>false</bold>\r
+         </font>\r
+        </property>\r
+        <property name="whatsThis">\r
+         <string/>\r
+        </property>\r
+        <property name="placeholderText">\r
+         <string>MAC地址</string>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item>\r
+       <widget class="QPushButton" name="pbtn_spp_reconnect_2">\r
+        <property name="enabled">\r
+         <bool>true</bool>\r
+        </property>\r
+        <property name="sizePolicy">\r
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
+          <horstretch>0</horstretch>\r
+          <verstretch>0</verstretch>\r
+         </sizepolicy>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+          <weight>50</weight>\r
+          <bold>false</bold>\r
+         </font>\r
+        </property>\r
+        <property name="text">\r
+         <string>开始写地址</string>\r
+        </property>\r
+        <property name="checkable">\r
+         <bool>false</bool>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item>\r
+       <widget class="QTextBrowser" name="txtb_dispaly_2">\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+         </font>\r
+        </property>\r
+        <property name="mouseTracking">\r
+         <bool>true</bool>\r
+        </property>\r
+        <property name="styleSheet">\r
+         <string notr="true">QTextBrowser{background-color:rgb(26, 26, 26);\r
+                       color:rgb(127, 255, 0)}</string>\r
+        </property>\r
+        <property name="verticalScrollBarPolicy">\r
+         <enum>Qt::ScrollBarAlwaysOn</enum>\r
+        </property>\r
+        <property name="textInteractionFlags">\r
+         <set>Qt::TextBrowserInteraction</set>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+     </layout>\r
+    </widget>\r
+    <widget class="QWidget" name="verticalLayoutWidget_4">\r
+     <property name="font">\r
+      <font>\r
+       <family>Arial</family>\r
+       <pointsize>14</pointsize>\r
+      </font>\r
+     </property>\r
+     <layout class="QVBoxLayout" name="verticalLayout_4">\r
+      <item>\r
+       <widget class="MyComboBox" name="cbox_uart_com_select_3">\r
+        <property name="sizePolicy">\r
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
+          <horstretch>0</horstretch>\r
+          <verstretch>0</verstretch>\r
+         </sizepolicy>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+          <weight>50</weight>\r
+          <bold>false</bold>\r
+         </font>\r
+        </property>\r
+        <item>\r
+         <property name="text">\r
+          <string>COM1</string>\r
+         </property>\r
+        </item>\r
+       </widget>\r
+      </item>\r
+      <item>\r
+       <widget class="QLineEdit" name="ledit_spp_addr_3">\r
+        <property name="sizePolicy">\r
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
+          <horstretch>0</horstretch>\r
+          <verstretch>0</verstretch>\r
+         </sizepolicy>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+          <weight>50</weight>\r
+          <bold>false</bold>\r
+         </font>\r
+        </property>\r
+        <property name="whatsThis">\r
+         <string/>\r
+        </property>\r
+        <property name="placeholderText">\r
+         <string>MAC地址</string>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item>\r
+       <widget class="QPushButton" name="pbtn_spp_reconnect_3">\r
+        <property name="enabled">\r
+         <bool>true</bool>\r
+        </property>\r
+        <property name="sizePolicy">\r
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
+          <horstretch>0</horstretch>\r
+          <verstretch>0</verstretch>\r
+         </sizepolicy>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+          <weight>50</weight>\r
+          <bold>false</bold>\r
+         </font>\r
+        </property>\r
+        <property name="text">\r
+         <string>开始写地址</string>\r
+        </property>\r
+        <property name="checkable">\r
+         <bool>false</bool>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item>\r
+       <widget class="QTextBrowser" name="txtb_dispaly_3">\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+         </font>\r
+        </property>\r
+        <property name="mouseTracking">\r
+         <bool>true</bool>\r
+        </property>\r
+        <property name="styleSheet">\r
+         <string notr="true">QTextBrowser{background-color:rgb(26, 26, 26);\r
+                       color:rgb(127, 255, 0)}</string>\r
+        </property>\r
+        <property name="verticalScrollBarPolicy">\r
+         <enum>Qt::ScrollBarAlwaysOn</enum>\r
+        </property>\r
+        <property name="textInteractionFlags">\r
+         <set>Qt::TextBrowserInteraction</set>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+     </layout>\r
+    </widget>\r
+    <widget class="QWidget" name="verticalLayoutWidget_5">\r
+     <property name="font">\r
+      <font>\r
+       <family>Arial</family>\r
+       <pointsize>14</pointsize>\r
+      </font>\r
+     </property>\r
+     <layout class="QVBoxLayout" name="verticalLayout_5">\r
+      <item>\r
+       <widget class="MyComboBox" name="cbox_uart_com_select_4">\r
+        <property name="sizePolicy">\r
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
+          <horstretch>0</horstretch>\r
+          <verstretch>0</verstretch>\r
+         </sizepolicy>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+          <weight>50</weight>\r
+          <bold>false</bold>\r
+         </font>\r
+        </property>\r
+        <item>\r
+         <property name="text">\r
+          <string>COM1</string>\r
+         </property>\r
+        </item>\r
+       </widget>\r
+      </item>\r
+      <item>\r
+       <widget class="QLineEdit" name="ledit_spp_addr_4">\r
+        <property name="sizePolicy">\r
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
+          <horstretch>0</horstretch>\r
+          <verstretch>0</verstretch>\r
+         </sizepolicy>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+          <weight>50</weight>\r
+          <bold>false</bold>\r
+         </font>\r
+        </property>\r
+        <property name="whatsThis">\r
+         <string/>\r
+        </property>\r
+        <property name="placeholderText">\r
+         <string>MAC地址</string>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item>\r
+       <widget class="QPushButton" name="pbtn_spp_reconnect_4">\r
+        <property name="enabled">\r
+         <bool>true</bool>\r
+        </property>\r
+        <property name="sizePolicy">\r
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">\r
+          <horstretch>0</horstretch>\r
+          <verstretch>0</verstretch>\r
+         </sizepolicy>\r
+        </property>\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+          <weight>50</weight>\r
+          <bold>false</bold>\r
+         </font>\r
+        </property>\r
+        <property name="text">\r
+         <string>开始写地址</string>\r
+        </property>\r
+        <property name="checkable">\r
+         <bool>false</bool>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+      <item>\r
+       <widget class="QTextBrowser" name="txtb_dispaly_4">\r
+        <property name="font">\r
+         <font>\r
+          <family>Arial</family>\r
+          <pointsize>14</pointsize>\r
+         </font>\r
+        </property>\r
+        <property name="mouseTracking">\r
+         <bool>true</bool>\r
+        </property>\r
+        <property name="styleSheet">\r
+         <string notr="true">QTextBrowser{background-color:rgb(26, 26, 26);\r
+                       color:rgb(127, 255, 0)}</string>\r
+        </property>\r
+        <property name="verticalScrollBarPolicy">\r
+         <enum>Qt::ScrollBarAlwaysOn</enum>\r
+        </property>\r
+        <property name="textInteractionFlags">\r
+         <set>Qt::TextBrowserInteraction</set>\r
+        </property>\r
+       </widget>\r
+      </item>\r
+     </layout>\r
+    </widget>\r
+   </widget>\r
+   <zorder>splitter</zorder>\r
+   <zorder>verticalLayoutWidget_2</zorder>\r
+  </widget>\r
+  <widget class="QStatusBar" name="statusbar">\r
+   <property name="enabled">\r
+    <bool>true</bool>\r
+   </property>\r
+   <property name="sizeGripEnabled">\r
+    <bool>true</bool>\r
+   </property>\r
+  </widget>\r
+ </widget>\r
+ <customwidgets>\r
+  <customwidget>\r
+   <class>MyComboBox</class>\r
+   <extends>QComboBox</extends>\r
+   <header location="global">custom.h</header>\r
+   <slots>\r
+    <signal>mouse_clicked(bool)</signal>\r
+   </slots>\r
+  </customwidget>\r
+ </customwidgets>\r
+ <resources/>\r
+ <connections>\r
   <connection>\r
-   <sender>pbtn_donglemac</sender>\r
+   <sender>pbtn_spp_reconnect_1</sender>\r
    <signal>clicked()</signal>\r
    <receiver>MainWindow</receiver>\r
-   <slot>at_set_dongle_addr_complete()</slot>\r
+   <slot>spp_connect_1()</slot>\r
    <hints>\r
     <hint type="sourcelabel">\r
-     <x>581</x>\r
-     <y>492</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>653</x>\r
+     <x>126</x>\r
      <y>126</y>\r
     </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>cbox_uart_com_select</sender>\r
-   <signal>activated(QString)</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>uart_com_switch(QString)</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>702</x>\r
-     <y>55</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>764</x>\r
-     <y>76</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>cbox_uart_baud_select</sender>\r
-   <signal>activated(QString)</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>uart_baud_switch(QString)</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>712</x>\r
-     <y>103</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>744</x>\r
-     <y>133</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>cbox_br_tx_PacketType_complete</sender>\r
-   <signal>activated(int)</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_check_bt_len(int)</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>514</x>\r
-     <y>479</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>649</x>\r
-     <y>73</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>cbox_br_rx_PacketType_complete</sender>\r
-   <signal>activated(int)</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_check_bt_len(int)</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>514</x>\r
-     <y>517</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>647</x>\r
-     <y>55</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>cbox_br_tx_PacketType_board</sender>\r
-   <signal>activated(int)</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_check_bt_len(int)</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>514</x>\r
-     <y>479</y>\r
-    </hint>\r
-    <hint type="destinationlabel">\r
-     <x>639</x>\r
-     <y>116</y>\r
-    </hint>\r
-   </hints>\r
-  </connection>\r
-  <connection>\r
-   <sender>cbox_br_rx_PacketType_board</sender>\r
-   <signal>activated(int)</signal>\r
-   <receiver>MainWindow</receiver>\r
-   <slot>at_check_bt_len(int)</slot>\r
-   <hints>\r
-    <hint type="sourcelabel">\r
-     <x>514</x>\r
-     <y>517</y>\r
-    </hint>\r
     <hint type="destinationlabel">\r
-     <x>638</x>\r
-     <y>85</y>\r
+     <x>676</x>\r
+     <y>346</y>\r
     </hint>\r
    </hints>\r
   </connection>\r
   <connection>\r
-   <sender>pushButton</sender>\r
+   <sender>pbtn_spp_reconnect_2</sender>\r
    <signal>clicked()</signal>\r
    <receiver>MainWindow</receiver>\r
-   <slot>ui_save_windows()</slot>\r
+   <slot>spp_connect_2()</slot>\r
    <hints>\r
     <hint type="sourcelabel">\r
-     <x>702</x>\r
-     <y>285</y>\r
+     <x>386</x>\r
+     <y>126</y>\r
     </hint>\r
     <hint type="destinationlabel">\r
-     <x>647</x>\r
-     <y>236</y>\r
+     <x>676</x>\r
+     <y>346</y>\r
     </hint>\r
    </hints>\r
   </connection>\r
   <connection>\r
-   <sender>pbtn_btlo_board</sender>\r
+   <sender>pbtn_spp_reconnect_3</sender>\r
    <signal>clicked()</signal>\r
    <receiver>MainWindow</receiver>\r
-   <slot>at_bt_btlo_board()</slot>\r
+   <slot>spp_connect_3()</slot>\r
    <hints>\r
     <hint type="sourcelabel">\r
-     <x>144</x>\r
-     <y>502</y>\r
+     <x>645</x>\r
+     <y>126</y>\r
     </hint>\r
     <hint type="destinationlabel">\r
-     <x>642</x>\r
-     <y>200</y>\r
+     <x>676</x>\r
+     <y>346</y>\r
     </hint>\r
    </hints>\r
   </connection>\r
   <connection>\r
-   <sender>pbtn_btpwr_board</sender>\r
+   <sender>pbtn_spp_reconnect_4</sender>\r
    <signal>clicked()</signal>\r
    <receiver>MainWindow</receiver>\r
-   <slot>at_bt_btpwr_board()</slot>\r
+   <slot>spp_connect_4()</slot>\r
    <hints>\r
     <hint type="sourcelabel">\r
-     <x>589</x>\r
-     <y>502</y>\r
+     <x>905</x>\r
+     <y>126</y>\r
     </hint>\r
     <hint type="destinationlabel">\r
-     <x>684</x>\r
-     <y>304</y>\r
+     <x>676</x>\r
+     <y>346</y>\r
     </hint>\r
    </hints>\r
   </connection>\r
   <connection>\r
-   <sender>pbtn_at_custom_send</sender>\r
+   <sender>pbtn_spp_connect_all</sender>\r
    <signal>clicked()</signal>\r
    <receiver>MainWindow</receiver>\r
-   <slot>at_custom_send()</slot>\r
+   <slot>spp_connect_all()</slot>\r
    <hints>\r
     <hint type="sourcelabel">\r
-     <x>169</x>\r
-     <y>602</y>\r
+     <x>1192</x>\r
+     <y>79</y>\r
     </hint>\r
     <hint type="destinationlabel">\r
-     <x>661</x>\r
-     <y>190</y>\r
+     <x>676</x>\r
+     <y>346</y>\r
     </hint>\r
    </hints>\r
   </connection>\r
   <connection>\r
-   <sender>pushButton_3</sender>\r
+   <sender>pushButton_open_mac_config</sender>\r
    <signal>clicked()</signal>\r
    <receiver>MainWindow</receiver>\r
-   <slot>at_bt_wakeup()</slot>\r
+   <slot>ui_open_mac_config()</slot>\r
    <hints>\r
     <hint type="sourcelabel">\r
-     <x>122</x>\r
-     <y>615</y>\r
+     <x>1192</x>\r
+     <y>126</y>\r
     </hint>\r
     <hint type="destinationlabel">\r
-     <x>957</x>\r
-     <y>601</y>\r
+     <x>676</x>\r
+     <y>346</y>\r
     </hint>\r
    </hints>\r
   </connection>\r
   <connection>\r
-   <sender>pushButton_4</sender>\r
+   <sender>pushButton_openlogfolder</sender>\r
    <signal>clicked()</signal>\r
    <receiver>MainWindow</receiver>\r
-   <slot>at_bt_sleep()</slot>\r
+   <slot>openLogfolder()</slot>\r
    <hints>\r
     <hint type="sourcelabel">\r
-     <x>244</x>\r
-     <y>615</y>\r
+     <x>1192</x>\r
+     <y>608</y>\r
     </hint>\r
     <hint type="destinationlabel">\r
-     <x>970</x>\r
-     <y>548</y>\r
+     <x>676</x>\r
+     <y>346</y>\r
     </hint>\r
    </hints>\r
   </connection>\r
  </connections>\r
  <slots>\r
-  <slot>transmit_toboard_choosefile()</slot>\r
-  <slot>uart_send_data()</slot>\r
-  <slot>uart_process()</slot>\r
-  <slot>check_word_wrap()</slot>\r
-  <slot>check_hex_display()</slot>\r
-  <slot>at_stackinfo_send()</slot>\r
-  <slot>uart_check_dtr_rts()</slot>\r
-  <slot>uart_com_select()</slot>\r
-  <slot>transmit_fromboard_selectfilepath()</slot>\r
-  <slot>transmit_fromboard_getfilelist()</slot>\r
-  <slot>transmit_fromboard_download()</slot>\r
-  <slot>transmit_toboard_upload()</slot>\r
-  <slot>transmit_toboard_stop()</slot>\r
-  <slot>transmit_fromboard_delete()</slot>\r
-  <slot>transmit_fromboard_stop()</slot>\r
-  <slot>spp_connect()</slot>\r
-  <slot>transmit_fromboard_name_change()</slot>\r
-  <slot>at_fsrm_send()</slot>\r
-  <slot>at_mediamusicplay_send()</slot>\r
-  <slot>at_mediamusicstop_send()</slot>\r
-  <slot>at_mediaaudiorecord_send()</slot>\r
-  <slot>ui_tab_mainwindow_complete()</slot>\r
-  <slot>ui_tab_mainwindow_board()</slot>\r
-  <slot>at_bt_tx_complete()</slot>\r
-  <slot>at_bt_rx_complete()</slot>\r
-  <slot>at_ble_tx_complete()</slot>\r
-  <slot>at_ble_rx_complete()</slot>\r
-  <slot>at_bt_rx_board()</slot>\r
-  <slot>at_bt_tx_board()</slot>\r
-  <slot>at_ble_tx_board()</slot>\r
-  <slot>at_ble_rx_board()</slot>\r
-  <slot>at_bt_dutmode_board()</slot>\r
-  <slot>at_bt_delay_ms_complete()</slot>\r
-  <slot>at_set_dongle_addr_complete()</slot>\r
-  <slot>at_get_rx_count_complete()</slot>\r
-  <slot>uart_com_switch(QString)</slot>\r
-  <slot>uart_baud_switch(QString)</slot>\r
-  <slot>at_check_bt_len(int)</slot>\r
-  <slot>ui_save_windows()</slot>\r
-  <slot>at_bt_btlo_board()</slot>\r
-  <slot>at_bt_btpwr_board()</slot>\r
-  <slot>at_custom_send()</slot>\r
-  <slot>at_bt_wakeup()</slot>\r
-  <slot>at_bt_sleep()</slot>\r
+  <slot>ui_open_mac_config()</slot>\r
+  <slot>uart_process1()</slot>\r
+  <slot>readData1()</slot>\r
+  <slot>readData2()</slot>\r
+  <slot>readData3()</slot>\r
+  <slot>readData4()</slot>\r
+  <slot>uart_rx_dispaly1(int,uint8_t*)</slot>\r
+  <slot>spp_connect_1()</slot>\r
+  <slot>spp_connect_2()</slot>\r
+  <slot>spp_connect_3()</slot>\r
+  <slot>spp_connect_4()</slot>\r
+  <slot>spp_timer_callback1()</slot>\r
+  <slot>spp_connect_all()</slot>\r
+  <slot>uart_process2()</slot>\r
+  <slot>uart_process3()</slot>\r
+  <slot>uart_process4()</slot>\r
+  <slot>openLogfolder()</slot>\r
+  <slot>spp_timer_callback2()</slot>\r
+  <slot>spp_timer_callback3()</slot>\r
+  <slot>spp_timer_callback4()</slot>\r
+  <slot>uart_rx_dispaly2(int,uint8_t*)</slot>\r
+  <slot>uart_rx_dispaly3(int,uint8_t*)</slot>\r
+  <slot>uart_rx_dispaly4(int,uint8_t*)</slot>\r
  </slots>\r
 </ui>\r
index 72164a8..464a50a 100644 (file)
@@ -4,9 +4,9 @@
 #include <QWaitCondition.h>\r
 #include <QMutex>\r
 #include <QThread>\r
-#include <header.h>\r
 #include <qdebug.h>\r
 #include <QString>\r
+#include "common.h"\r
  /*-----------------------rx回调函数线程-------------------------------*/\r
  // 当回调函数执行时,会唤醒此线程。 根据回调函数返回值执行对应函数。\r
 class MyThread : public QThread\r
index 57db951..f94f123 100644 (file)
@@ -1,14 +1,25 @@
 #include "result_thread.h"\r
+#include "common.h"\r
+struct result_info g_result_info1={0,NULL,0};\r
+QMutex g_result_thread_mlock1;\r
+QWaitCondition g_result_thread_condition1;\r
 \r
-struct result_info g_result_info={0,NULL,0,NULL,false,NONE_DATA,0,NULL};\r
-QMutex g_result_thread_mlock;\r
-QWaitCondition g_result_thread_condition;\r
+struct result_info g_result_info2={0,NULL,0};\r
+QMutex g_result_thread_mlock2;\r
+QWaitCondition g_result_thread_condition2;\r
 \r
+struct result_info g_result_info3={0,NULL,0};\r
+QMutex g_result_thread_mlock3;\r
+QWaitCondition g_result_thread_condition3;\r
 \r
+struct result_info g_result_info4={0,NULL,0};\r
+QMutex g_result_thread_mlock4;\r
+QWaitCondition g_result_thread_condition4;\r
 \r
-Result_Thread::Result_Thread(QObject *parent)\r
+Result_Thread::Result_Thread(QObject *parent,uint8_t _port_index)\r
 {\r
     obj=parent;\r
+    port_index = _port_index;\r
 }\r
 \r
 Result_Thread::~Result_Thread()\r
@@ -18,85 +29,91 @@ Result_Thread::~Result_Thread()
 // 给 UI 线程发送消息\r
 void Result_Thread::process()\r
 {\r
-    g_result_thread_mlock.lock();\r
-    g_result_thread_condition.wait(&g_result_thread_mlock, MLOCK_TIMEOUT);\r
-    switch (g_result_info.result_thread_flag) {\r
+\r
+    struct result_info *g_result_info=nullptr;\r
+    QMutex *g_result_thread_mlock=nullptr;\r
+    QWaitCondition *g_result_thread_condition=nullptr;\r
+\r
+    switch(port_index)\r
+    {\r
+    case 1:\r
+        g_result_info = &g_result_info1;\r
+        g_result_thread_mlock = &g_result_thread_mlock1;\r
+        g_result_thread_condition = &g_result_thread_condition1;\r
+        break;\r
+    case 2:\r
+        g_result_info = &g_result_info2;\r
+        g_result_thread_mlock = &g_result_thread_mlock2;\r
+        g_result_thread_condition = &g_result_thread_condition2;\r
+        break;\r
+    case 3:\r
+        g_result_info = &g_result_info3;\r
+        g_result_thread_mlock = &g_result_thread_mlock3;\r
+        g_result_thread_condition = &g_result_thread_condition3;\r
+        break;\r
+    case 4:\r
+        g_result_info = &g_result_info4;\r
+        g_result_thread_mlock = &g_result_thread_mlock4;\r
+        g_result_thread_condition = &g_result_thread_condition4;\r
+        break;\r
+    default:\r
+        return ;\r
+    }\r
+\r
+    g_result_thread_mlock->lock();\r
+    g_result_thread_condition->wait(g_result_thread_mlock, MLOCK_TIMEOUT);\r
+    switch (g_result_info->result_thread_flag) {\r
         case UART_RX_DATA:\r
-            QMetaObject::invokeMethod(obj, "uart_rx_dispaly", Q_ARG(int, g_result_info.uart_rx_buf_len),Q_ARG(u8Piont,g_result_info.uart_rx_buf)); // 让UI线程执行 Uart_Rx_Dispaly 槽函数\r
-            g_result_info.result_thread_flag = NONE_DATA;\r
-            break;\r
-        case LS_RESULT_DATA:\r
-            QMetaObject::invokeMethod(obj, "transmit_ls_rx_diaplay",Q_ARG(int , g_result_info.transmit_ls_size),Q_ARG(vPiont,g_result_info.transmit_ls_buff));\r
-            g_result_info.result_thread_flag = NONE_DATA;\r
-            break;\r
-        case TRANSMIT_FILE_DATA:\r
-            QMetaObject::invokeMethod(obj, "transmit_rx_display",Q_ARG(bool, g_result_info.transmit_result_flag));\r
-            g_result_info.transmit_result_flag = false;\r
-            g_result_info.result_thread_flag = NONE_DATA;\r
-            break;\r
-        case AT_RESULT_DATA:\r
-            QMetaObject::invokeMethod(obj, "at_rx_display",Q_ARG(int, g_result_info.at_result_len),Q_ARG(u8Piont,g_result_info.at_result_buf));\r
-            g_result_info.result_thread_flag = NONE_DATA;\r
+            QMetaObject::invokeMethod(obj, "uart_rx_dispaly1", Q_ARG(int, g_result_info->uart_rx_buf_len),Q_ARG(u8Piont,g_result_info->uart_rx_buf)); // 让UI线程执行 Uart_Rx_Dispaly 槽函数\r
+            g_result_info->result_thread_flag = NONE_DATA;\r
             break;\r
         default:\r
             break;\r
     }\r
-    g_result_thread_mlock.unlock();\r
-}\r
+    g_result_thread_mlock->unlock();\r
 \r
-uint32_t uart_callback(void *buf, uint32_t buf_len)\r
-{\r
-    g_result_info.uart_rx_buf_len = (int)buf_len;\r
-    // rx的数据不包含\0,所以多分配1字节。\r
-    g_result_info.uart_rx_buf=(uint8_t *)malloc(buf_len);\r
-    memset(g_result_info.uart_rx_buf,0,buf_len);\r
-    memcpy_s(g_result_info.uart_rx_buf, buf_len, (uint8_t *)buf, buf_len);\r
-    g_result_info.result_thread_flag = UART_RX_DATA;\r
-    g_result_thread_mlock.lock();\r
-    g_result_thread_condition.wakeAll();\r
-    g_result_thread_mlock.unlock();\r
-    return 0;\r
 }\r
 \r
-uint32_t ls_callback(uint32_t size, uapi_ls_info_t *buff)\r
+uint32_t uart_callback(void *buf, uint32_t buf_len,uint8_t port_index)\r
 {\r
-    g_result_info.transmit_ls_buff = (uapi_ls_info_t *)malloc(size * sizeof(uapi_ls_info_t)+1);\r
-    memcpy_s(g_result_info.transmit_ls_buff, size * sizeof(uapi_ls_info_t), (uapi_ls_info_t *)buff, size * sizeof(uapi_ls_info_t));\r
-    g_result_info.transmit_ls_size = static_cast<int>(size);\r
-    g_result_info.result_thread_flag = LS_RESULT_DATA;\r
-    g_result_thread_mlock.lock();\r
-    g_result_thread_condition.wakeAll();\r
-    g_result_thread_mlock.unlock();\r
-    return 0;\r
-}\r
+    struct result_info *g_result_info=nullptr;\r
+    QMutex *g_result_thread_mlock=nullptr;\r
+    QWaitCondition *g_result_thread_condition=nullptr;\r
 \r
-uint32_t transmit_callback(bool is_finished, uintptr_t usr_data)\r
-{\r
-    g_result_info.transmit_result_flag = is_finished;\r
-    Q_UNUSED(usr_data);\r
-    g_result_info.result_thread_flag = TRANSMIT_FILE_DATA;\r
-    g_result_thread_mlock.lock();\r
-    g_result_thread_condition.wakeAll();\r
-    g_result_thread_mlock.unlock();\r
-    return 0;\r
-}\r
+    switch(port_index)\r
+    {\r
+    case 1:\r
+        g_result_info = &g_result_info1;\r
+        g_result_thread_mlock = &g_result_thread_mlock1;\r
+        g_result_thread_condition = &g_result_thread_condition1;\r
+        break;\r
+    case 2:\r
+        g_result_info = &g_result_info2;\r
+        g_result_thread_mlock = &g_result_thread_mlock2;\r
+        g_result_thread_condition = &g_result_thread_condition2;\r
+        break;\r
+    case 3:\r
+        g_result_info = &g_result_info3;\r
+        g_result_thread_mlock = &g_result_thread_mlock3;\r
+        g_result_thread_condition = &g_result_thread_condition3;\r
+        break;\r
+    case 4:\r
+        g_result_info = &g_result_info4;\r
+        g_result_thread_mlock = &g_result_thread_mlock4;\r
+        g_result_thread_condition = &g_result_thread_condition4;\r
+        break;\r
+    default:\r
+        return 1;\r
+    }\r
 \r
-uint32_t at_callback(void *buf, uint32_t len)\r
-{\r
-    uint8_t * at_buff = (uint8_t *)malloc(len);\r
-    memcpy_s(at_buff, len , buf, len);\r
-    g_result_info.at_result_buf = (uint8_t *)at_buff;\r
-    g_result_info.at_result_len = len;\r
-    g_result_info.result_thread_flag = AT_RESULT_DATA;\r
-    g_result_thread_mlock.lock();\r
-    g_result_thread_condition.wakeAll();\r
-    g_result_thread_mlock.unlock();\r
+    g_result_info->uart_rx_buf_len = (int)buf_len;\r
+    // rx的数据不包含\0,所以多分配1字节。\r
+    g_result_info->uart_rx_buf=(uint8_t *)malloc(buf_len);\r
+    memset(g_result_info->uart_rx_buf,0,buf_len);\r
+    memcpy_s(g_result_info->uart_rx_buf, buf_len, (uint8_t *)buf, buf_len);\r
+    g_result_info->result_thread_flag = UART_RX_DATA;\r
+    g_result_thread_mlock->lock();\r
+    g_result_thread_condition->wakeAll();\r
+    g_result_thread_mlock->unlock();\r
     return 0;\r
 }\r
-void transmit_get_data_count(uint32_t *total_size, uint32_t *current_size)\r
-{\r
-    uapi_transmit_progress transmint_data_count;\r
-    uapi_transmit_process(&transmint_data_count);\r
-    *total_size=transmint_data_count.total_size;\r
-    *current_size=transmint_data_count.transmited_size;\r
-}\r
index acb41a5..be0f8bc 100644 (file)
@@ -1,13 +1,11 @@
 #ifndef RESULT_THREAD_H\r
 #define RESULT_THREAD_H\r
 #include "mythread.h"\r
-#include "common.h"\r
-#include <header.h>\r
 #include <stdint.h>\r
 #include <QMutex>\r
 #include <QWaitCondition>\r
 #include <qdebug.h>\r
-\r
+#include "common.h"\r
 #define BUF_SIZE 4096\r
 #define MLOCK_TIMEOUT 2000\r
 enum get_data_flag\r
@@ -23,36 +21,22 @@ struct result_info{
     // uart收到的数据\r
     int uart_rx_buf_len;\r
     uint8_t *uart_rx_buf;\r
-\r
-    // ls数据大小和内容\r
-    int transmit_ls_size;\r
-    uapi_ls_info_t *transmit_ls_buff;\r
-\r
-    // 传输文件是否成功\r
-    bool transmit_result_flag;\r
-\r
     // 当前回调函数标记\r
     int result_thread_flag;\r
 \r
-    // at调用返回\r
-    int at_result_len;\r
-    uint8_t *at_result_buf;\r
 };\r
 \r
 class Result_Thread : public MyThread\r
 {\r
 public:\r
-    Result_Thread(QObject *parent = 0);\r
+    Result_Thread(QObject *parent = 0,uint8_t _port_index = 0);\r
     ~Result_Thread();\r
 protected:\r
      void process() override final;\r
 private:\r
      QObject *obj;\r
+     uint8_t port_index;\r
 };\r
 \r
-uint32_t uart_callback(void *buf, uint32_t buf_len);\r
-uint32_t ls_callback(uint32_t size, uapi_ls_info_t *buff);\r
-uint32_t transmit_callback(bool is_finished, uintptr_t usr_data);\r
-uint32_t at_callback(void *buf, uint32_t len);\r
-void transmit_get_data_count(uint32_t *total_size, uint32_t *current_size);\r
+uint32_t uart_callback(void *buf, uint32_t buf_len , uint8_t port_index);\r
 #endif // RESULT_THREAD_H\r
diff --git a/settings.cpp b/settings.cpp
new file mode 100644 (file)
index 0000000..36a779d
--- /dev/null
@@ -0,0 +1,199 @@
+#include "settings.h"\r
+#include <QSettings>\r
+#include <QDebug>\r
+settings* settings::instance = NULL;\r
+settings& settings::getInstance()\r
+{\r
+    /*\r
+    * 双重锁定,减少每次开销,只有越过if(NULL == instance) 才需要锁定,极低概率\r
+    */\r
+    if(NULL == instance)\r
+    {\r
+\r
+        if(NULL == instance)\r
+        {\r
+            instance = new settings();\r
+        }\r
+\r
+    }\r
+    return *instance;\r
+}\r
+\r
+void settings::release()\r
+{\r
+    if(instance != NULL)\r
+    {\r
+\r
+        delete instance;\r
+        instance = NULL;\r
+\r
+    }\r
+}\r
+\r
+void settings::load_settings()\r
+{\r
+\r
+}\r
+\r
+int settings::mac_config(QString _mac_pre,QString _mac_count,QString _mac_start_hexstr)\r
+{\r
+    mac_pre_head_hexstr = _mac_pre;\r
+    mac_start_hexstr = _mac_start_hexstr;\r
+    bool ok;\r
+    int ret =0;\r
+    mac_status_flag =  true;\r
+    mac_count = _mac_count.toInt(&ok,10);\r
+    qDebug()<<" == mac_count "<< mac_count << ok;\r
+    if(!ok)\r
+    {\r
+        mac_status_flag = false;\r
+        ret = 2 ;\r
+    }\r
+\r
+    mac_pre_head = mac_pre_head_hexstr.toUInt(&ok,16);\r
+    qDebug()<<" == mac_pre_head_hexstr "<< mac_pre_head_hexstr << mac_pre_head << ok;\r
+    if(!ok)\r
+    {\r
+        mac_status_flag = false;\r
+        ret = 2;\r
+    }\r
+\r
+    mac_start = mac_start_hexstr.toUInt(&ok,16);\r
+    qDebug()<<" == mac_start_hexstr "<< mac_start_hexstr << mac_start << ok;\r
+    if(!ok)\r
+    {\r
+        mac_status_flag = false;\r
+        ret = 2;\r
+    }\r
+\r
+    mac_end_hexstr = QString("%1").arg((mac_count+mac_start), 6, 16, QLatin1Char( '0' )).toUpper();\r
+    qDebug()<<" == mac_end_hexstr "<<mac_end_hexstr;\r
+    if(!ok)\r
+    {\r
+        mac_status_flag = false;\r
+        ret = 2;\r
+    }\r
+    if(mac_end_hexstr.trimmed().length()>6)\r
+    {\r
+        mac_status_flag = false;\r
+        qDebug()<<"数量过多";\r
+        ret = 1;\r
+    }\r
+\r
+\r
+    qDebug()<<"格式正确? "<<mac_status_flag;\r
+    return ret;\r
+}\r
+QString settings::getmacStatus()\r
+{\r
+    QString ret="";\r
+    if (mac_status_flag == false)\r
+    {\r
+        ret.append("mac地址格式错误");\r
+    }else\r
+    {\r
+\r
+        ret.append(mac_pre_head_hexstr).append(mac_start_hexstr);\r
+        ret.append("直到");\r
+        ret.append(mac_pre_head_hexstr).append(mac_end_hexstr).append("\n");\r
+        ret.append( "总共" );\r
+        ret.append(QString().setNum(mac_count)).append("个地址");\r
+\r
+    }\r
+    return ret;\r
+}\r
+int settings::save_to_database()\r
+{\r
+\r
+    return 0;\r
+}\r
+\r
+int settings::gen_new_mac()\r
+{\r
+    int ret = 0;\r
+    qDebug() << "mac_start " << mac_start;\r
+    qDebug()<< "mac_count " << mac_count;\r
+    for (uint i = 0; i < this->mac_count;i++)\r
+    {\r
+        QString mac_tmp="";\r
+        mac_tmp.append(this->mac_pre_head_hexstr);\r
+        QString mac_end_str =  QString("%1").arg((mac_start+i), 6, 16, QLatin1Char( '0' )).toUpper();\r
+        mac_tmp.append(mac_end_str);\r
+        ret = sqlitemanager->insert_mac_addr(i,mac_tmp);\r
+        qDebug()<< "insert "<< i <<" "<< mac_tmp <<" ret " << ret;\r
+    }\r
+    return ret;\r
+}\r
+\r
+int settings::create_new_database()\r
+{\r
+   if (mac_status_flag == false )\r
+   {\r
+       qDebug()<<"mac_status_flag false skip craete database";\r
+       return 0;\r
+   }\r
+   int ret =  sqlitemanager->create_db_tables();\r
+\r
+   if (ret == 1)\r
+   {\r
+        gen_new_mac();\r
+   }else if (ret == 2)\r
+   {\r
+        int count = sqlitemanager->get_mac_count();\r
+        qDebug()<<"mac count "<<count;\r
+        if (count > 0 )\r
+        {\r
+\r
+            return 0;\r
+        }\r
+\r
+        gen_new_mac();\r
+   }else{\r
+       qDebug()<< "create_database failed " ;\r
+       return 0;\r
+   }\r
+    return 1;\r
+}\r
+\r
+settings::settings()\r
+{\r
+//    QSettings *settings = new QSettings(setting_path, QSettings::IniFormat);\r
+\r
+//    // 写入第一组数据\r
+//    settings->beginGroup("Uart_setting");\r
+////    settings->setValue("uart_com", ui->cbox_uart_com_select_1->currentText());\r
+////    settings->setValue("uart_baud", ui->cbox_uart_baud_select->currentIndex());\r
+////    settings->setValue("spp_addr", ui->ledit_spp_addr->text());\r
+//    settings->sync();\r
+//    settings->endGroup();\r
+////    // 写入第二组数据\r
+////    settings->beginGroup("Download_Setting");\r
+////    settings->setValue("download_board_path", ui->ledit_formboad_bordpath->text());\r
+////    settings->setValue("download_local_path", ui->ledit_frombord_savefilepath->text());\r
+////    settings->sync();\r
+////    settings->endGroup();\r
+\r
+////    settings->beginGroup("Upload_Setting");\r
+////    settings->setValue("upload_board_path", ui->ledit_toboard_boardpath->text());\r
+////    settings->setValue("upload_local_path", ui->ledit_toboard_filepath->text());\r
+////    settings->sync();\r
+////    settings->endGroup();\r
+\r
+////    settings->beginGroup("At_Setting");\r
+////    settings->setValue("at_mediamusicplay", ui->ledit_at_mediamusicplay->text());\r
+////    settings->setValue("at_mediaaudiorecord", ui->ledit_at_mediaaudiorecord->text());\r
+////    settings->setValue("at_fsrm", ui->ledit_at_fsrm->text());\r
+////    settings->setValue("at_delay_ms", ui->ledit_delay_ms->text());\r
+////    settings->setValue("at_spp_addr", ui->ledit_dongle_mac->text());\r
+////    settings->setValue("custom_module_id", ui->ledit_at_custom_moduleId->text());\r
+////    settings->setValue("custom_cmd_id", ui->ledit_at_custom_CmdId->text());\r
+////    settings->setValue("custom_payload", ui->ledit_at_custom_Payload->text());\r
+////    settings->sync();\r
+////    settings->endGroup();\r
+\r
+//    delete settings;\r
+//    settings = nullptr;\r
+\r
+    sqlitemanager = new DbManager("mac_address.db");\r
+}\r
+\r
diff --git a/settings.h b/settings.h
new file mode 100644 (file)
index 0000000..1d175e4
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef SETTINGS_H\r
+#define SETTINGS_H\r
+#include <QByteArray>\r
+#include <QString>\r
+#include <QDateTime>\r
+#include "sqldbmanager.h"\r
+\r
+#define MAC_LEN 12\r
+class settings\r
+{\r
+public:\r
+    static settings& getInstance(); //获取settings的唯一对象\r
+    static void release();\r
+\r
+    settings();\r
+    int create_new_database();\r
+    void load_settings();\r
+    int mac_config(QString _mac_pre,QString _mac_count,QString _mac_start_hexstr);\r
+    int save_to_database();\r
+    QString getmacStatus();\r
+private:\r
+    int gen_new_mac();\r
+    QString setting_path="Setting.ini";\r
+    QString mac_pre_head_hexstr;\r
+    uint mac_pre_head;\r
+    uint mac_count;\r
+    QString mac_start_hexstr;\r
+    QString mac_end_hexstr;\r
+    uint mac_start;\r
+    int mac_used;\r
+    QDateTime cfg_updateTime;\r
+    static settings* instance;   //settings 全局唯一的变量\r
+    bool mac_status_flag=true;\r
+    DbManager *sqlitemanager{NULL};\r
+};\r
+\r
+#endif // SETTINGS_H\r
diff --git a/sqldbmanager.cpp b/sqldbmanager.cpp
new file mode 100644 (file)
index 0000000..6f78a77
--- /dev/null
@@ -0,0 +1,178 @@
+#include "sqldbmanager.h"\r
+#include <QDebug>\r
+#include <QSqlQuery>\r
+#include <QSqlError>\r
+#include <QDateTime>\r
+DbManager::DbManager(const QString& path="mac_address.db")\r
+{\r
+   m_db = QSqlDatabase::addDatabase("QSQLITE");\r
+   m_db.setDatabaseName(path);\r
+\r
+   if (!m_db.open())\r
+   {\r
+      qDebug() << "Error: connection with database failed";\r
+   }\r
+   else\r
+   {\r
+      qDebug() << "Database: connection ok";\r
+   }\r
+}\r
+\r
+\r
+/***\r
+ * 创建基本数据库表\r
+ * 记录mac地址\r
+ * btmac总计6个字节 ,\r
+ * mac不变的头字节,3字节,\r
+ * 可变mac地址mac_start,3字节\r
+ * 根据 mac_prefix + mac_start 开始,依次每个地址加1,直到 有mac_count个地址\r
+ *\r
+*/\r
+int DbManager::create_db_tables()\r
+{\r
+\r
+//     QString create_database_str = "create table bt_addrs (id int primary key, mac_ddr varchar(20), cpuid varchar(20), update_time int, used_flag int)";\r
+    QString create_database_str = "CREATE TABLE [main].[bt_addrs]( [id] int PRIMARY KEY ASC NOT NULL UNIQUE, [mac_ddr] varchar(20) NOT NULL DEFAULT \"\", [cpuid] varchar(40) NOT NULL DEFAULT \"\",[update_time_str] varchar(20) NOT NULL DEFAULT \"\", [update_time] int NOT NULL DEFAULT 0,   [used_flag] int NOT NULL DEFAULT 0);";\r
+    QStringList tables =  m_db.tables();\r
+     if (tables.length()==1 && tables.at(0) == "bt_addrs")\r
+     {\r
+        qDebug()<<" table bt_addrs already exist!";\r
+        return 2;\r
+     }else{\r
+        QSqlQuery query ;//= m_db.exec(create_database_str);\r
+        query.prepare(create_database_str);\r
+        if ( query.exec())\r
+        {\r
+            qDebug()<< create_database_str << " success";\r
+\r
+        }else{\r
+            qDebug()<<query.lastQuery() << " failed";\r
+        }\r
+        return 1;\r
+     }\r
+}\r
+\r
+int DbManager::insert_mac_addr(int id,QString mac_addr)\r
+{\r
+\r
+    bool success = false;\r
+    // you should check if args are ok first...\r
+    QSqlQuery query;\r
+    query.prepare("INSERT INTO bt_addrs (id,mac_ddr,used_flag) VALUES (:id,:mac_ddr,0)");\r
+    query.bindValue(":mac_ddr", mac_addr);\r
+    query.bindValue(":id", id);\r
+    if(query.exec())\r
+    {\r
+      success = true;\r
+    }\r
+    else\r
+    {\r
+       qDebug()<<"Add bt address error:"<< query.lastError();\r
+    }\r
+\r
+//    QString sqlstr = "";\r
+//    sqlstr.append("insert into addr_cfg values(null, '").append(mac_addr).append("'', '',0,0)");\r
+//    qDebug()<<sqlstr;\r
+////    bool ret = query.exec(sqlstr);\r
+////    return ret;\r
+//    QSqlQuery query = m_db.exec(sqlstr);\r
+////    query.exec();\r
+//    qDebug()<< query.executedQuery();\r
+    return true;\r
+}\r
+\r
+/***\r
+ * 获取mac地址总数\r
+*/\r
+int DbManager::get_mac_count()\r
+{\r
+//    QSqlQuery query("SELECT * FROM bt_addrs WHERE used_flag = 0");\r
+//    int mac_addr_index = query.record().indexOf("mac_addr");\r
+\r
+    QSqlQuery query;\r
+    query.prepare("SELECT count(*) as mac_count FROM bt_addrs ");\r
+    if (query.exec())\r
+    {\r
+        int count = 0;\r
+        if (query.next()){\r
+            count = query.value("mac_count").toInt();\r
+        }\r
+        qDebug()<<"get mac_count "<<count;\r
+        return count;\r
+    }else{\r
+        return 0;\r
+    }\r
+}\r
+\r
+/****\r
+ * 获取已经被使用的mac地址数\r
+ * */\r
+int DbManager::get_mac_used_count()\r
+{\r
+    QSqlQuery query;\r
+    query.prepare("SELECT count(*) as mac_count_used FROM bt_addrs WHERE used_flag != 0");\r
+    if (query.exec())\r
+    {\r
+        int count = 0;\r
+        if (query.next()){\r
+            count = query.value("mac_count_used").toInt();\r
+        }\r
+        qDebug()<<"get mac_count used "<<count;\r
+        return count;\r
+    }else{\r
+        return 0;\r
+    }\r
+}\r
+\r
+/***\r
+ *返回未被写的mac地址\r
+*/\r
+QString DbManager::get_avalible_mac()\r
+{\r
+    QSqlQuery query;\r
+    query.prepare("SELECT mac_ddr FROM bt_addrs WHERE used_flag = 0 ORDER BY id ASC");\r
+    QString mac_addr = QString("");\r
+    if (query.exec())\r
+    {\r
+        if (query.next()){\r
+            mac_addr = query.value("mac_ddr").toString();\r
+        }\r
+        qDebug()<<"get avalible_mac  "<<mac_addr;\r
+\r
+    }\r
+    return mac_addr;\r
+\r
+\r
+}\r
+\r
+/*\r
+ *更新某个mac地址为已使用状态\r
+*/\r
+int DbManager::set_mac_used(QString mac_hexstr,QString cpuid,bool used)\r
+{\r
+    int count = 0;\r
+    quint64 dateTime = QDateTime::currentDateTime().toMSecsSinceEpoch(); //年月日时分秒转为ms\r
+    QDateTime sysTime = QDateTime::fromMSecsSinceEpoch(dateTime);\r
+    qDebug() << QString("时间戳:%1").arg(dateTime) << sysTime.toString("yyyy-MM-dd-hh:mm:ss.zzz");\r
+\r
+\r
+    QString update_sql = QString("UPDATE table_name bt_addrs SET used_flag=%1 ,update_time=%2 ,update_time_str=\"%3\" , cpuid = \"%4\" WHERE mac_addr = \"%5\"").arg(used).arg(dateTime).arg(sysTime.toString("yyyy-MM-dd-hh:mm:ss.zzz")).arg(cpuid).arg(mac_hexstr);\r
+    qDebug() << update_sql;\r
+    QSqlQuery query;\r
+    query.prepare(update_sql);\r
+    if (query.exec())\r
+    {\r
+        int count = query.numRowsAffected();\r
+        qDebug()<<"numRows updated "<< count;\r
+\r
+    }\r
+    return count;\r
+}\r
+\r
+/*\r
+ * 打印数据库里具体多少mac地址被使用,多少地址还可用。\r
+*/\r
+void DbManager::dump_mac_status_in_db()\r
+{\r
+\r
+}\r
diff --git a/sqldbmanager.h b/sqldbmanager.h
new file mode 100644 (file)
index 0000000..379b2c0
--- /dev/null
@@ -0,0 +1,57 @@
+#ifndef SQLDBMANAGER\r
+#define SQLDBMANAGER\r
+\r
+#include <QString>\r
+#include <QSqlDatabase>\r
+#include <stdint.h>\r
+#include <QMutex>\r
+class DbManager\r
+{\r
+public:\r
+    DbManager(const QString& path);\r
+    /***\r
+     * 创建基本数据库表\r
+     * 记录mac地址\r
+     * btmac总计6个字节 ,\r
+     * mac不变的头字节,3字节,\r
+     * 可变mac地址mac_start,3字节\r
+     * 根据 mac_prefix + mac_start 开始,依次每个地址加1,直到 有mac_count个地址\r
+     *\r
+    */\r
+    int create_db_tables();\r
+    int insert_mac_addr(int id,QString mac_addr);\r
+\r
+    /***\r
+     * 获取mac地址总数\r
+    */\r
+    int get_mac_count();\r
+\r
+    /****\r
+     * 获取已经被使用的mac地址数\r
+     * */\r
+    int get_mac_used_count();\r
+\r
+    /***\r
+     *返回未被写的mac地址\r
+    */\r
+    QString get_avalible_mac();\r
+\r
+    /*\r
+     *更新某个mac地址为已使用状态\r
+    */\r
+    int set_mac_used(QString mac_hexstr,QString cpuid,bool used);\r
+    /*\r
+     * 打印数据库里具体多少mac地址被使用,多少地址还可用。\r
+    */\r
+    void dump_mac_status_in_db();\r
+\r
+private:\r
+    int prefix_len{3};\r
+    uint32_t mac_prefix{0x281106};\r
+    QSqlDatabase m_db;\r
+    QMutex m_lock_database;\r
+};\r
+\r
+\r
+#endif // SQLDBMANAGER\r
+\r