Compare commits

...

4 Commits

Author SHA1 Message Date
gaozixi ad7fd7e64f fix: 更新电脑IP地址为192.168.89.6以确保正确连接
12 months ago
gaozixi 674609f154 Merge branch 'gaojunzhe' of https://bdgit.educoder.net/pshwqe2nc/gold_eyes into gaojunzhe
1 year ago
gaozixi 5e48445274 feat: 重构并恢复Flask应用,添加TCP监听功能和实时数据接口
1 year ago
gaozixi 0b397554d2 增强无人机控制系统的用户界面和功能- 将主窗口标题更新为 "无人机控制系统"。
1 year ago

@ -3,45 +3,60 @@ title 声源定位功能顺序图
actor 用户 as User
participant "应用系统" as Application
participant "阵列麦克风设备" as MicArray
participant "信号处理模块" as SignalProcessing
participant "声源识别模块" as SoundRecognition
participant "声源定位模块" as Localization
activate User
User -> Application: 打开音频监听
activate Application
Application -> MicArray: 发送监听指令
Application -> MicArray: 发送实时采集战场声学信号命令
activate MicArray
MicArray --> Application: 监听就绪确认
Application --> User: 显示监听状态
MicArray -> MicArray: 枪声传播
MicArray -> MicArray: 检测到枪声
MicArray -> SignalProcessing: 原始音频数据
deactivate MicArray
activate SignalProcessing
SignalProcessing -> SignalProcessing: 预处理(滤波去噪)
SignalProcessing -> Localization: 处理后的音频信号
SignalProcessing -> SignalProcessing: 模数转换
SignalProcessing -> SignalProcessing: 滤波去噪预处理
SignalProcessing -> SoundRecognition: 处理后的音频信号
deactivate SignalProcessing
activate Localization
Localization -> Localization: 时间延迟估计(TDOA)
Localization -> Localization: 声源方位角计算(DOA)
Localization -> Application: 返回音频定位结果
deactivate Localization
activate SoundRecognition
SoundRecognition -> SoundRecognition: CAMPPlus声音分类模型
SoundRecognition -> SoundRecognition: 声纹识别处理
SoundRecognition -> SoundRecognition: 计算枪声识别置信度
alt 置信度高 (>阈值)
SoundRecognition -> Localization: 确认声源信号 + 置信度
activate Localization
Localization -> Localization: 时间延迟估计(TDOA)
Localization -> Localization: 声源方位角计算(DOA)
Localization -> Application: 返回音频定位结果 + 置信度
deactivate Localization
Application -> Application: 处理定位信息
Application --> User: 显示定位信息及置信度
else 置信度低 (≤阈值)
SoundRecognition --> Application: 识别置信度不足,忽略信号
end
deactivate SoundRecognition
Application -> Application: 处理定位信息
User -> Application: 查看定位信息
Application --> User: 显示定位信息
Application --> User: 显示详细定位信息
User -> Application: 关闭音频监听
deactivate Application
deactivate User
@enduml

@ -10,6 +10,7 @@
#define UI_WIDGET_H
#include <QtCore/QVariant>
#include <QtGui/QIcon>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox>
@ -117,19 +118,20 @@ public:
if (Widget->objectName().isEmpty())
Widget->setObjectName(QString::fromUtf8("Widget"));
Widget->resize(949, 669);
Widget->setStyleSheet(QString::fromUtf8(""));
verticalLayout = new QVBoxLayout(Widget);
verticalLayout->setSpacing(2);
verticalLayout->setSpacing(8);
verticalLayout->setContentsMargins(11, 11, 11, 11);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
verticalLayout->setContentsMargins(2, -1, 2, 2);
verticalLayout->setContentsMargins(6, -1, 6, 6);
groupBox = new QGroupBox(Widget);
groupBox->setObjectName(QString::fromUtf8("groupBox"));
groupBox->setMaximumSize(QSize(16777215, 150));
verticalLayout_3 = new QVBoxLayout(groupBox);
verticalLayout_3->setSpacing(0);
verticalLayout_3->setSpacing(8);
verticalLayout_3->setContentsMargins(11, 11, 11, 11);
verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
verticalLayout_3->setContentsMargins(-1, 2, -1, 2);
verticalLayout_3->setContentsMargins(-1, 12, -1, 8);
horizontalLayout_3 = new QHBoxLayout();
horizontalLayout_3->setSpacing(6);
horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3"));
@ -206,11 +208,15 @@ public:
verticalLayout_8->setObjectName(QString::fromUtf8("verticalLayout_8"));
btnConnectTCP = new QPushButton(groupBox);
btnConnectTCP->setObjectName(QString::fromUtf8("btnConnectTCP"));
QIcon icon;
icon.addFile(QString::fromUtf8(":/image/resources/icons/connect.png"), QSize(), QIcon::Normal, QIcon::Off);
btnConnectTCP->setIcon(icon);
verticalLayout_8->addWidget(btnConnectTCP);
btnConnctSerialPort = new QPushButton(groupBox);
btnConnctSerialPort->setObjectName(QString::fromUtf8("btnConnctSerialPort"));
btnConnctSerialPort->setIcon(icon);
verticalLayout_8->addWidget(btnConnctSerialPort);
@ -335,6 +341,10 @@ public:
btnUp = new QPushButton(widgetDevControl);
btnUp->setObjectName(QString::fromUtf8("btnUp"));
QIcon icon1;
icon1.addFile(QString::fromUtf8(":/image/resources/icons/up.png"), QSize(), QIcon::Normal, QIcon::Off);
btnUp->setIcon(icon1);
btnUp->setIconSize(QSize(24, 24));
horizontalLayout_4->addWidget(btnUp);
@ -350,16 +360,28 @@ public:
horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5"));
btnLeft = new QPushButton(widgetDevControl);
btnLeft->setObjectName(QString::fromUtf8("btnLeft"));
QIcon icon2;
icon2.addFile(QString::fromUtf8(":/image/resources/icons/left.png"), QSize(), QIcon::Normal, QIcon::Off);
btnLeft->setIcon(icon2);
btnLeft->setIconSize(QSize(24, 24));
horizontalLayout_5->addWidget(btnLeft);
btnHome = new QPushButton(widgetDevControl);
btnHome->setObjectName(QString::fromUtf8("btnHome"));
QIcon icon3;
icon3.addFile(QString::fromUtf8(":/image/resources/icons/home.png"), QSize(), QIcon::Normal, QIcon::Off);
btnHome->setIcon(icon3);
btnHome->setIconSize(QSize(24, 24));
horizontalLayout_5->addWidget(btnHome);
btnRight = new QPushButton(widgetDevControl);
btnRight->setObjectName(QString::fromUtf8("btnRight"));
QIcon icon4;
icon4.addFile(QString::fromUtf8(":/image/resources/icons/right.png"), QSize(), QIcon::Normal, QIcon::Off);
btnRight->setIcon(icon4);
btnRight->setIconSize(QSize(24, 24));
horizontalLayout_5->addWidget(btnRight);
@ -375,6 +397,10 @@ public:
btnDown = new QPushButton(widgetDevControl);
btnDown->setObjectName(QString::fromUtf8("btnDown"));
QIcon icon5;
icon5.addFile(QString::fromUtf8(":/image/resources/icons/down.png"), QSize(), QIcon::Normal, QIcon::Off);
btnDown->setIcon(icon5);
btnDown->setIconSize(QSize(24, 24));
horizontalLayout_6->addWidget(btnDown);
@ -427,11 +453,19 @@ public:
horizontalLayout_12->setObjectName(QString::fromUtf8("horizontalLayout_12"));
btnZoomIn = new QPushButton(widgetDevControl);
btnZoomIn->setObjectName(QString::fromUtf8("btnZoomIn"));
QIcon icon6;
icon6.addFile(QString::fromUtf8(":/image/resources/icons/zoom_in.png"), QSize(), QIcon::Normal, QIcon::Off);
btnZoomIn->setIcon(icon6);
btnZoomIn->setIconSize(QSize(24, 24));
horizontalLayout_12->addWidget(btnZoomIn);
btnZoomOut = new QPushButton(widgetDevControl);
btnZoomOut->setObjectName(QString::fromUtf8("btnZoomOut"));
QIcon icon7;
icon7.addFile(QString::fromUtf8(":/image/resources/icons/zoom_out.png"), QSize(), QIcon::Normal, QIcon::Off);
btnZoomOut->setIcon(icon7);
btnZoomOut->setIconSize(QSize(24, 24));
horizontalLayout_12->addWidget(btnZoomOut);
@ -440,6 +474,9 @@ public:
btnGimbalTakePhoto = new QPushButton(widgetDevControl);
btnGimbalTakePhoto->setObjectName(QString::fromUtf8("btnGimbalTakePhoto"));
QIcon icon8;
icon8.addFile(QString::fromUtf8(":/image/resources/icons/camera.png"), QSize(), QIcon::Normal, QIcon::Off);
btnGimbalTakePhoto->setIcon(icon8);
verticalLayout_12->addWidget(btnGimbalTakePhoto);
@ -448,11 +485,17 @@ public:
horizontalLayout_11->setObjectName(QString::fromUtf8("horizontalLayout_11"));
btnStartRecord = new QPushButton(widgetDevControl);
btnStartRecord->setObjectName(QString::fromUtf8("btnStartRecord"));
QIcon icon9;
icon9.addFile(QString::fromUtf8(":/image/resources/icons/record_start.png"), QSize(), QIcon::Normal, QIcon::Off);
btnStartRecord->setIcon(icon9);
horizontalLayout_11->addWidget(btnStartRecord);
btnStopRecord = new QPushButton(widgetDevControl);
btnStopRecord->setObjectName(QString::fromUtf8("btnStopRecord"));
QIcon icon10;
icon10.addFile(QString::fromUtf8(":/image/resources/icons/record_stop.png"), QSize(), QIcon::Normal, QIcon::Off);
btnStopRecord->setIcon(icon10);
horizontalLayout_11->addWidget(btnStopRecord);
@ -562,29 +605,35 @@ public:
void retranslateUi(QWidget *Widget)
{
Widget->setWindowTitle(QCoreApplication::translate("Widget", "\346\227\240\344\272\272\346\234\272\347\224\273\351\235\242", nullptr));
groupBox->setTitle(QString());
Widget->setWindowTitle(QCoreApplication::translate("Widget", "\346\227\240\344\272\272\346\234\272\346\216\247\345\210\266\347\263\273\347\273\237", nullptr));
groupBox->setTitle(QCoreApplication::translate("Widget", "\350\277\236\346\216\245\351\205\215\347\275\256", nullptr));
label->setText(QCoreApplication::translate("Widget", "TCP \344\272\221\345\217\260\345\234\260\345\235\200:", nullptr));
label_2->setText(QCoreApplication::translate("Widget", "\344\270\262\350\241\214\347\253\257\345\217\243:", nullptr));
label_3->setText(QCoreApplication::translate("Widget", "\347\253\257\345\217\243:", nullptr));
label_4->setText(QCoreApplication::translate("Widget", "\346\257\224\347\211\271\347\216\207:", nullptr));
btnConnectTCP->setText(QCoreApplication::translate("Widget", "Connect", nullptr));
btnConnctSerialPort->setText(QCoreApplication::translate("Widget", "Connect", nullptr));
btnConnectTCP->setText(QCoreApplication::translate("Widget", "TCP\350\277\236\346\216\245", nullptr));
btnConnctSerialPort->setText(QCoreApplication::translate("Widget", "\344\270\262\345\217\243\350\277\236\346\216\245", nullptr));
label_5->setText(QCoreApplication::translate("Widget", "\347\275\221\347\273\234\350\247\206\351\242\221\346\272\220:", nullptr));
label_6->setText(QCoreApplication::translate("Widget", "USB \346\221\204\345\203\217\345\244\264:", nullptr));
btnOpenNetworkVideo->setText(QCoreApplication::translate("Widget", "\345\274\200\345\220\257", nullptr));
btnOpenUSBVideo->setText(QCoreApplication::translate("Widget", "\345\274\200\345\220\257", nullptr));
btnOpenNetworkVideo->setText(QCoreApplication::translate("Widget", "\345\274\200\345\220\257\347\275\221\347\273\234\346\265\201\350\247\206\351\242\221", nullptr));
btnOpenUSBVideo->setText(QCoreApplication::translate("Widget", "\345\274\200\345\220\257USB\350\247\206\351\242\221", nullptr));
label_10->setText(QCoreApplication::translate("Widget", "\351\200\237\345\272\246", nullptr));
btnUp->setText(QCoreApplication::translate("Widget", "\345\220\221\344\270\212", nullptr));
btnLeft->setText(QCoreApplication::translate("Widget", "\345\220\221\345\267\246", nullptr));
btnHome->setText(QCoreApplication::translate("Widget", "\345\233\236\346\255\243", nullptr));
btnRight->setText(QCoreApplication::translate("Widget", "\345\220\221\345\217\263", nullptr));
btnDown->setText(QCoreApplication::translate("Widget", "\345\220\221\344\270\213", nullptr));
btnUp->setText(QString());
btnLeft->setText(QString());
btnHome->setText(QString());
btnRight->setText(QString());
btnDown->setText(QString());
label_7->setText(QCoreApplication::translate("Widget", "\345\233\276\345\203\217\344\274\240\346\204\237\345\231\250:", nullptr));
label_8->setText(QCoreApplication::translate("Widget", "\347\272\242\345\244\226\350\211\262\345\275\251:", nullptr));
checkBoxPIP->setText(QCoreApplication::translate("Widget", "PIP", nullptr));
btnZoomIn->setText(QCoreApplication::translate("Widget", "\346\224\276\345\244\247", nullptr));
btnZoomOut->setText(QCoreApplication::translate("Widget", "\347\274\251\345\260\217", nullptr));
btnZoomIn->setText(QString());
#if QT_CONFIG(tooltip)
btnZoomIn->setToolTip(QCoreApplication::translate("Widget", "\346\224\276\345\244\247", nullptr));
#endif // QT_CONFIG(tooltip)
btnZoomOut->setText(QString());
#if QT_CONFIG(tooltip)
btnZoomOut->setToolTip(QCoreApplication::translate("Widget", "\347\274\251\345\260\217", nullptr));
#endif // QT_CONFIG(tooltip)
btnGimbalTakePhoto->setText(QCoreApplication::translate("Widget", "\344\272\221\345\217\260\346\213\215\347\205\247", nullptr));
btnStartRecord->setText(QCoreApplication::translate("Widget", "\345\274\200\345\247\213\345\275\225\345\203\217", nullptr));
btnStopRecord->setText(QCoreApplication::translate("Widget", "\345\201\234\346\255\242\345\275\225\345\203\217", nullptr));
@ -594,11 +643,12 @@ public:
"hr { height: 1px; border-width: 0; }\n"
"li.unchecked::marker { content: \"\\2610\"; }\n"
"li.checked::marker { content: \"\\2612\"; }\n"
"</style></head><body style=\" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:'SimSun'; font-size:10pt;\">1.\345\234\250\350\247\206\351\242\221\347\252\227\345\217\243\344\270\255\346\273\232\345\212\250\351\274\240\346\240\207\346\273\232\350\275\256\346\216\247\345\210\266\347\224\273\351\235\242\346\224\276\345\244\247\345\222\214\347\274\251\345\260\217</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px"
"; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:'SimSun'; font-size:10pt;\">2.\345\217\214\345\207\273\345\267\246\351\224\256\350\267\237\350\270\252\347\233\256\346\240\207</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:'SimSun'; font-size:10pt;\">3.\347\202\271\345\207\273\345\217\263\351\224\256\351\200\200\345\207\272\350\267\237\350\270\252\346\250\241\345\274\217</span></p></body></html>", nullptr));
"</style></head><body style=\" font-family:'Microsoft YaHei', 'SimHei', 'Arial'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600; color:#0078d7;\">\346\223\215\344\275\234\346\214\207\345\215\227:</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">1.\345\234\250\350\247\206\351\242\221\347\252\227\345\217\243\344\270\255\346\273\232\345\212\250\351\274\240\346\240\207\346\273\232\350\275"
"\256\346\216\247\345\210\266\347\224\273\351\235\242\346\224\276\345\244\247\345\222\214\347\274\251\345\260\217</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">2.\345\217\214\345\207\273\345\267\246\351\224\256\350\267\237\350\270\252\347\233\256\346\240\207</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">3.\347\202\271\345\207\273\345\217\263\351\224\256\351\200\200\345\207\272\350\267\237\350\270\252\346\250\241\345\274\217</p></body></html>", nullptr));
label_9->setText(QCoreApplication::translate("Widget", "\345\201\217\350\210\252\350\247\222:", nullptr));
lbYaw->setText(QCoreApplication::translate("Widget", "0.00", nullptr));
label_13->setText(QCoreApplication::translate("Widget", "\344\277\257\344\273\260\350\247\222:", nullptr));

@ -1,28 +1,23 @@
#include "widget.h"
#include <QApplication>
#include <QDebug>
#include <QFile>
#include <QStyle>
#include <QStyleFactory>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
// print SDK Version
qDebug() << "ViewLink SDK Version: " << GetSDKVersion();
// initialize SDK
VLK_Init();
// 应用样式表
QFile styleFile(":/styles/resources/styles/main.qss");
if (styleFile.open(QFile::ReadOnly)) {
QString styleSheet = QLatin1String(styleFile.readAll());
a.setStyleSheet(styleSheet);
styleFile.close();
}
Widget w;
w.show();
int ret = a.exec();
// diconnect all
VLK_Disconnect();
// uninitialize SDK
VLK_UnInit();
return ret;
return a.exec();
}

@ -1,7 +1,23 @@
<RCC>
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource prefix="/image">
<file>circle_empty_48x48.png</file>
<file>circle_selected_32x32.png</file>
<file>RecordingFlash_32x32.png</file>
<!-- 新增图标 -->
<file>resources/icons/up.png</file>
<file>resources/icons/down.png</file>
<file>resources/icons/left.png</file>
<file>resources/icons/right.png</file>
<file>resources/icons/home.png</file>
<file>resources/icons/zoom_in.png</file>
<file>resources/icons/zoom_out.png</file>
<file>resources/icons/camera.png</file>
<file>resources/icons/record_start.png</file>
<file>resources/icons/record_stop.png</file>
<file>resources/icons/connect.png</file>
</qresource>
</RCC>
<qresource prefix="/styles">
<file>resources/styles/main.qss</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

@ -0,0 +1,225 @@
/* 主窗口样式 */
QWidget {
background-color: #1e1e1e;
font-family: "Microsoft YaHei", "SimHei", "Arial";
font-size: 9pt;
color: #2d2d30;
}
/* 顶部分组框样式 */
QGroupBox {
background-color: #2d2d30;
border: 1px solid #3f3f46;
border-radius: 4px;
margin-top: 10px;
padding: 5px;
}
QGroupBox::title {
subcontrol-origin: margin;
left: 10px;
padding: 0 8px;
color: #7a9fb8;
font-weight: bold;
}
/* 按钮通用样式 */
QPushButton {
background-color: #333337;
color: #e0e0e0;
border: 1px solid #3f3f46;
border-radius: 3px;
min-height: 25px;
padding: 5px;
}
QPushButton:hover {
background-color: #404045;
border: 1px solid #535358;
}
QPushButton:pressed {
background-color: #292929;
border: 1px solid #535358;
}
/* 方向和功能按钮样式 */
#btnUp, #btnDown, #btnLeft, #btnRight, #btnHome,
#btnZoomIn, #btnZoomOut {
background-color: #2a2a2a;
border: 1px solid #3f3f46;
border-radius: 15px;
min-width: 30px;
min-height: 30px;
padding: 3px;
}
#btnUp:hover, #btnDown:hover, #btnLeft:hover, #btnRight:hover, #btnHome:hover,
#btnZoomIn:hover, #btnZoomOut:hover {
background-color: #3a3a3c;
border: 1px solid #535358;
}
/* 拍照和录像按钮样式 */
#btnGimbalTakePhoto, #btnStartRecord, #btnStopRecord {
background-color: #2a2a2a;
border: 1px solid #3f3f46;
border-radius: 3px;
}
#btnGimbalTakePhoto:hover, #btnStartRecord:hover {
background-color: #3a3a3c;
border: 1px solid #535358;
}
/* 连接按钮样式 */
#btnConnectTCP, #btnConnctSerialPort {
background-color: #3a3a3c;;
color: #e0e0e0;
}
#btnConnectTCP:hover, #btnConnctSerialPort:hover {
background-color: #3a3a3c;;
}
/* 视频控制按钮样式 */
#btnOpenNetworkVideo, #btnOpenUSBVideo {
background-color: #3a3a3c;;
color: #e0e0e0;
}
#btnOpenNetworkVideo:hover, #btnOpenUSBVideo:hover {
background-color: #3a3a3c;
}
/* 输入框和下拉框样式 */
QComboBox, QLineEdit {
border: 1px solid #3f3f46;
border-radius: 3px;
padding-top: 0px;
padding-bottom: 0px;
padding-left: 4px;
padding-right: 4px;
background-color: #2d2d30;
color: #e0e0e0;
selection-background-color: #3f3f66;
min-height: 32px;
qproperty-alignment: 'AlignCenter';
}
QComboBox:focus, QLineEdit:focus {
border: 1px solid #7a9fb8;
}
QComboBox::drop-down {
border: none;
width: 20px;
}
QComboBox::down-arrow {
image: url(:/image/resources/icons/down.png);
width: 12px;
height: 12px;
}
QComboBox QAbstractItemView {
background-color: #252526;
border: 1px solid #3f3f46;
selection-background-color: #3f3f66;
color: #e0e0e0;
}
/* 滑块样式 */
QSlider::groove:horizontal {
height: 6px;
background: #3d3d3d;
border-radius: 3px;
}
QSlider::handle:horizontal {
background: #7a9fb8;
border: none;
width: 14px;
height: 14px;
margin-top: -4px;
margin-bottom: -4px;
border-radius: 7px;
}
QSlider::sub-page:horizontal {
background: #4a6b82;
border-radius: 3px;
}
/* 文本浏览器样式 */
QTextBrowser {
background-color: #252526;
border: 1px solid #3f3f46;
border-radius: 3px;
color: #e0e0e0;
selection-background-color: #3f3f66;
}
/* 视频显示区域样式 */
#widgetMainVideo {
background-color: #121212;
border: 1px solid #3f3f46;
border-radius: 3px;
}
/* 控制面板区域样式 */
#widgetDevControl {
background-color: #2d2d30;
border: 1px solid #3f3f46;
border-radius: 3px;
padding: 5px;
}
/* 状态显示区域样式 */
#widgetDevStatus {
background-color: #252526;
border-top: 1px solid #3f3f46;
padding: 5px;
}
#widgetDevStatus QLabel {
color: #a0a0a0;
font-weight: normal;
min-width: 40px;
}
/* 数值标签特殊样式 */
#lbYaw, #lbPitch, #lbTargetLat, #lbTargetLng,
#lbTargetAlt, #lbZoom, #lbLaserDistance {
color: #7a9fb8;
font-weight: bold;
}
/* 标签样式 */
QLabel {
color: #e0e0e0;
background-color: #2d2d30; /* 与 QGroupBox 相同 */
}
/* 复选框样式 */
QCheckBox {
spacing: 5px;
color: #e0e0e0;
}
QCheckBox::indicator {
width: 15px;
height: 15px;
}
QCheckBox::indicator:unchecked {
border: 1px solid #3f3f46;
background-color: #252526;
border-radius: 2px;
}
QCheckBox::indicator:checked {
border: 1px solid #7a9fb8;
background-color: #2c4257;
border-radius: 2px;
}

@ -11,20 +11,25 @@
</rect>
</property>
<property name="windowTitle">
<string>无人机画面</string>
<string>无人机控制系统</string>
</property>
<!-- 添加样式表引用 -->
<property name="styleSheet">
<string notr="true">
</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>2</number>
<number>8</number>
</property>
<property name="leftMargin">
<number>2</number>
<number>6</number>
</property>
<property name="rightMargin">
<number>2</number>
<number>6</number>
</property>
<property name="bottomMargin">
<number>2</number>
<number>6</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox">
@ -35,17 +40,17 @@
</size>
</property>
<property name="title">
<string/>
<string>连接配置</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
<number>8</number>
</property>
<property name="topMargin">
<number>2</number>
<number>12</number>
</property>
<property name="bottomMargin">
<number>2</number>
<number>8</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="1,2,1,2,1">
@ -132,14 +137,22 @@
<item>
<widget class="QPushButton" name="btnConnectTCP">
<property name="text">
<string>Connect</string>
<string>TCP连接</string>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/image/resources/icons/connect.png</normaloff>:/image/resources/icons/connect.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnConnctSerialPort">
<property name="text">
<string>Connect</string>
<string>串口连接</string>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/image/resources/icons/connect.png</normaloff>:/image/resources/icons/connect.png</iconset>
</property>
</widget>
</item>
@ -186,14 +199,14 @@
<item>
<widget class="QPushButton" name="btnOpenNetworkVideo">
<property name="text">
<string>开启</string>
<string>开启网络流视频</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnOpenUSBVideo">
<property name="text">
<string>开启</string>
<string>开启USB视频</string>
</property>
</widget>
</item>
@ -279,7 +292,17 @@
<item>
<widget class="QPushButton" name="btnUp">
<property name="text">
<string>向上</string>
<string/>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/image/resources/icons/up.png</normaloff>:/image/resources/icons/up.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
@ -303,21 +326,51 @@
<item>
<widget class="QPushButton" name="btnLeft">
<property name="text">
<string>向左</string>
<string/>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/image/resources/icons/left.png</normaloff>:/image/resources/icons/left.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnHome">
<property name="text">
<string>回正</string>
<string/>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/image/resources/icons/home.png</normaloff>:/image/resources/icons/home.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnRight">
<property name="text">
<string>向右</string>
<string/>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/image/resources/icons/right.png</normaloff>:/image/resources/icons/right.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
@ -341,7 +394,17 @@
<item>
<widget class="QPushButton" name="btnDown">
<property name="text">
<string>向下</string>
<string/>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/image/resources/icons/down.png</normaloff>:/image/resources/icons/down.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
@ -400,6 +463,19 @@
<item>
<widget class="QPushButton" name="btnZoomIn">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/image/resources/icons/zoom_in.png</normaloff>:/image/resources/icons/zoom_in.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>放大</string>
</property>
</widget>
@ -407,6 +483,19 @@
<item>
<widget class="QPushButton" name="btnZoomOut">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/image/resources/icons/zoom_out.png</normaloff>:/image/resources/icons/zoom_out.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>缩小</string>
</property>
</widget>
@ -418,6 +507,10 @@
<property name="text">
<string>云台拍照</string>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/image/resources/icons/camera.png</normaloff>:/image/resources/icons/camera.png</iconset>
</property>
</widget>
</item>
<item>
@ -427,6 +520,10 @@
<property name="text">
<string>开始录像</string>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/image/resources/icons/record_start.png</normaloff>:/image/resources/icons/record_start.png</iconset>
</property>
</widget>
</item>
<item>
@ -434,6 +531,10 @@
<property name="text">
<string>停止录像</string>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/image/resources/icons/record_stop.png</normaloff>:/image/resources/icons/record_stop.png</iconset>
</property>
</widget>
</item>
</layout>
@ -447,10 +548,11 @@ p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
li.unchecked::marker { content: &quot;\2610&quot;; }
li.checked::marker { content: &quot;\2612&quot;; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&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:'SimSun'; font-size:10pt;&quot;&gt;1.在视频窗口中滚动鼠标滚轮控制画面放大和缩小&lt;/span&gt;&lt;/p&gt;
&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:'SimSun'; font-size:10pt;&quot;&gt;2.双击左键跟踪目标&lt;/span&gt;&lt;/p&gt;
&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:'SimSun'; font-size:10pt;&quot;&gt;3.点击右键退出跟踪模式&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Microsoft YaHei', 'SimHei', 'Arial'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&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-weight:600; color:#0078d7;&quot;&gt;操作指南:&lt;/span&gt;&lt;/p&gt;
&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;1.在视频窗口中滚动鼠标滚轮控制画面放大和缩小&lt;/p&gt;
&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;2.双击左键跟踪目标&lt;/p&gt;
&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;3.点击右键退出跟踪模式&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
@ -594,6 +696,8 @@ li.checked::marker { content: &quot;\2612&quot;; }
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<resources>
<include location="res.qrc"/>
</resources>
<connections/>
</ui>

@ -11,7 +11,7 @@ import math
#-----------------------------
wifi_ap_ssid = "junzekeji" # 你的WiFi SSID
wifi_ap_passwd = "234567890l" # 你的WiFi密码
PC_IP = "192.168.32.6" # 运行sound_map.py的电脑IP
PC_IP = "192.168.89.6" # 运行sound_map.py的电脑IP
UDP_PORT = 12345 # 与sound_map.py里配置的端口一致
TCP_PORT = 12345 # 替换你想要的端口

@ -8,7 +8,7 @@ from machine import UART
WIFI_SSID = "junzekeji" # 替换为你的WiFi
WIFI_PASSWD = "234567890l" # 替换为你的WiFi密码
PC_IP = "192.168.32.6" # 替换为你的电脑IP
PC_IP = "192.168.89.6" # 替换为你的电脑IP
PC_PORT = 12345 # 替换为你的监听端口
def wifi_enable(en):

Loading…
Cancel
Save