zhongfuqiang上传最新代码20250325
This commit is contained in:
parent
aa3e8c8223
commit
4a25fb0e80
|
@ -55,6 +55,7 @@
|
||||||
<DynamicSource Condition="'$(Configuration)|$(Platform)'=='Release|x64'">input</DynamicSource>
|
<DynamicSource Condition="'$(Configuration)|$(Platform)'=='Release|x64'">input</DynamicSource>
|
||||||
<QtMocFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).moc</QtMocFileName>
|
<QtMocFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).moc</QtMocFileName>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="SourceCode\Widget\SerialPortHandler\crc32.cpp" />
|
||||||
<ClCompile Include="SourceCode\Widget\SerialPortHandler\SerialPortHandler.cpp" />
|
<ClCompile Include="SourceCode\Widget\SerialPortHandler\SerialPortHandler.cpp" />
|
||||||
<ClCompile Include="SourceCode\Widget\UI_Widget\UI_Widget.cpp" />
|
<ClCompile Include="SourceCode\Widget\UI_Widget\UI_Widget.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -92,6 +93,7 @@
|
||||||
<QtMoc Include="SourceCode\Widget\SerialPortHandler\SerialPortHandler.h" />
|
<QtMoc Include="SourceCode\Widget\SerialPortHandler\SerialPortHandler.h" />
|
||||||
<QtMoc Include="SourceCode\Widget\SerialPortHandler\SerialPortWorker.h" />
|
<QtMoc Include="SourceCode\Widget\SerialPortHandler\SerialPortWorker.h" />
|
||||||
<QtMoc Include="SourceCode\RecvDataHandler\SerialRecvDataHandler.h" />
|
<QtMoc Include="SourceCode\RecvDataHandler\SerialRecvDataHandler.h" />
|
||||||
|
<ClInclude Include="SourceCode\Widget\SerialPortHandler\crc32.h" />
|
||||||
<ClInclude Include="SourceCode\Widget\UI_Widget\UI_Name.h" />
|
<ClInclude Include="SourceCode\Widget\UI_Widget\UI_Name.h" />
|
||||||
<QtMoc Include="SourceCode\LicenseGenerate\LicenseConfirmWindow.h" />
|
<QtMoc Include="SourceCode\LicenseGenerate\LicenseConfirmWindow.h" />
|
||||||
<ClInclude Include="SourceCode\LicenseGenerate\LicenseGenerate.h" />
|
<ClInclude Include="SourceCode\LicenseGenerate\LicenseGenerate.h" />
|
||||||
|
|
|
@ -41,6 +41,9 @@
|
||||||
<ClCompile Include="SourceCode\RecvDataHandler\SerialRecvDataHandler.cpp">
|
<ClCompile Include="SourceCode\RecvDataHandler\SerialRecvDataHandler.cpp">
|
||||||
<Filter>RecvDataHandler</Filter>
|
<Filter>RecvDataHandler</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="SourceCode\Widget\SerialPortHandler\crc32.cpp">
|
||||||
|
<Filter>Widget\SerialPortHandler</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtMoc Include="SourceCode\Widget\MainWidget.h">
|
<QtMoc Include="SourceCode\Widget\MainWidget.h">
|
||||||
|
@ -183,9 +186,6 @@
|
||||||
<ClInclude Include="SourceCode\Media\Media.h">
|
<ClInclude Include="SourceCode\Media\Media.h">
|
||||||
<Filter>Media</Filter>
|
<Filter>Media</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="SourceCode\Json\readJsonFile.h">
|
|
||||||
<Filter>Json</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="SourceCode\Media\VideoDecoder\RingBuffer.h">
|
<ClInclude Include="SourceCode\Media\VideoDecoder\RingBuffer.h">
|
||||||
<Filter>Media\VideoDecoder</Filter>
|
<Filter>Media\VideoDecoder</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -204,6 +204,12 @@
|
||||||
<ClInclude Include="SourceCode\Network\mdns\mdns.h">
|
<ClInclude Include="SourceCode\Network\mdns\mdns.h">
|
||||||
<Filter>Network\mdns</Filter>
|
<Filter>Network\mdns</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="SourceCode\Widget\SerialPortHandler\crc32.h">
|
||||||
|
<Filter>Widget\SerialPortHandler</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="SourceCode\Json\readJsonFile.h">
|
||||||
|
<Filter>Network</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="icon.rc" />
|
<ResourceCompile Include="icon.rc" />
|
||||||
|
|
|
@ -120,5 +120,11 @@
|
||||||
"val": "0",
|
"val": "0",
|
||||||
"lable": "更新主题壁纸",
|
"lable": "更新主题壁纸",
|
||||||
"timeout": 2000
|
"timeout": 2000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmd": "UPDATE_LOGO",
|
||||||
|
"val": "0",
|
||||||
|
"lable": "更新LOGO",
|
||||||
|
"timeout": 2000
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -130,5 +130,12 @@
|
||||||
"val": "0",
|
"val": "0",
|
||||||
"lable": "前板恢复出厂",
|
"lable": "前板恢复出厂",
|
||||||
"timeout": 2000
|
"timeout": 2000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmd": "UPDATE_LOGO",
|
||||||
|
"offset": 1234,
|
||||||
|
"crc32": 1234,
|
||||||
|
"lable": "更新LOGO",
|
||||||
|
"timeout": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -3,31 +3,31 @@
|
||||||
"cmd": "FACE_ENROLL_SINGLE",
|
"cmd": "FACE_ENROLL_SINGLE",
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"lable": "人脸单角度注册",
|
"lable": "人脸单角度注册",
|
||||||
"timeout": 2000
|
"timeout": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmd": "FACE_ENROLL",
|
"cmd": "FACE_ENROLL",
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"lable": "人脸多角度注册",
|
"lable": "人脸多角度注册",
|
||||||
"timeout": 2000
|
"timeout": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmd": "HAND_ENROLL",
|
"cmd": "HAND_ENROLL",
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"lable": "掌静脉注册",
|
"lable": "掌静脉注册",
|
||||||
"timeout": 2000
|
"timeout": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmd": "FACE_VERIFY",
|
"cmd": "FACE_VERIFY",
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"lable": "人脸识别",
|
"lable": "人脸识别",
|
||||||
"timeout": 2000
|
"timeout": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmd": "HAND_VERIFY",
|
"cmd": "HAND_VERIFY",
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"lable": "掌静脉识别",
|
"lable": "掌静脉识别",
|
||||||
"timeout": 2000
|
"timeout": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmd": "DEL_USER",
|
"cmd": "DEL_USER",
|
||||||
|
|
|
@ -3,31 +3,31 @@
|
||||||
"cmd": "FACE_ENROLL_SINGLE",
|
"cmd": "FACE_ENROLL_SINGLE",
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"lable": "人脸单角度注册",
|
"lable": "人脸单角度注册",
|
||||||
"timeout": 2000
|
"timeout": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmd": "FACE_ENROLL",
|
"cmd": "FACE_ENROLL",
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"lable": "人脸多角度注册",
|
"lable": "人脸多角度注册",
|
||||||
"timeout": 2000
|
"timeout": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmd": "HAND_ENROLL",
|
"cmd": "HAND_ENROLL",
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"lable": "掌静脉注册",
|
"lable": "掌静脉注册",
|
||||||
"timeout": 2000
|
"timeout": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmd": "FACE_VERIFY",
|
"cmd": "FACE_VERIFY",
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"lable": "人脸识别",
|
"lable": "人脸识别",
|
||||||
"timeout": 2000
|
"timeout": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmd": "HAND_VERIFY",
|
"cmd": "HAND_VERIFY",
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"lable": "掌静脉识别",
|
"lable": "掌静脉识别",
|
||||||
"timeout": 2000
|
"timeout": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmd": "DEL_USER",
|
"cmd": "DEL_USER",
|
||||||
|
@ -162,5 +162,12 @@
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"lable": "PIR测试",
|
"lable": "PIR测试",
|
||||||
"timeout": 2000
|
"timeout": 2000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmd": "UPDATE_LOGO",
|
||||||
|
"offset": 1234,
|
||||||
|
"crc32": 1234,
|
||||||
|
"lable": "更新LOGO",
|
||||||
|
"timeout": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
[
|
[
|
||||||
|
//{
|
||||||
|
// "cmd": "GET_IMG",
|
||||||
|
// "val": 0,
|
||||||
|
// "lable": "取图",
|
||||||
|
// "timeout": 0
|
||||||
|
//}
|
||||||
{
|
{
|
||||||
"cmd": "GET_IMG",
|
"cmd": "FACE_VERIFY",
|
||||||
"val": 0,
|
"val": 0,
|
||||||
"lable": "取图",
|
"lable": "人脸识别",
|
||||||
"timeout": 0
|
"timeout": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Binary file not shown.
|
@ -242,7 +242,7 @@ void SerialDataHandler::showPic(QSize labelSize, int lens_n,
|
||||||
}
|
}
|
||||||
|
|
||||||
QTransform transform;
|
QTransform transform;
|
||||||
transform.rotate(90); // 可以调整旋转角度
|
transform.rotate(270); // 可以调整旋转角度
|
||||||
QImage rotatedImage = image.transformed(transform);
|
QImage rotatedImage = image.transformed(transform);
|
||||||
QImage scaledImage = rotatedImage.scaled(labelSize, Qt::KeepAspectRatio);
|
QImage scaledImage = rotatedImage.scaled(labelSize, Qt::KeepAspectRatio);
|
||||||
QPixmap pixmap = QPixmap::fromImage(scaledImage);
|
QPixmap pixmap = QPixmap::fromImage(scaledImage);
|
||||||
|
@ -272,7 +272,13 @@ void SerialDataHandler::showPic(QSize labelSize, int lens_n,
|
||||||
else if (format == YUV420) {
|
else if (format == YUV420) {
|
||||||
rotatedYuvData = convertQImageToYUV420(rotatedImage);
|
rotatedYuvData = convertQImageToYUV420(rotatedImage);
|
||||||
}
|
}
|
||||||
QString yuvFileName = saveDirPath + "/" + currentTime + ".yuv";
|
|
||||||
|
QString len_num = "";
|
||||||
|
if (lens_n == 0)
|
||||||
|
len_num = "left";
|
||||||
|
else
|
||||||
|
len_num = "right";
|
||||||
|
QString yuvFileName = saveDirPath + "/" + len_num + "_" + currentTime + ".yuv";
|
||||||
QFile yuvFile(yuvFileName);
|
QFile yuvFile(yuvFileName);
|
||||||
if (yuvFile.open(QIODevice::WriteOnly)) {
|
if (yuvFile.open(QIODevice::WriteOnly)) {
|
||||||
yuvFile.write(rotatedYuvData);
|
yuvFile.write(rotatedYuvData);
|
||||||
|
@ -282,9 +288,10 @@ void SerialDataHandler::showPic(QSize labelSize, int lens_n,
|
||||||
else {
|
else {
|
||||||
qWarning() << "Failed to save rotated YUV image to" << yuvFileName;
|
qWarning() << "Failed to save rotated YUV image to" << yuvFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 额外:可以保存旋转后的图像为JPG或PNG格式
|
// 额外:可以保存旋转后的图像为JPG或PNG格式
|
||||||
QString rotatedImageFileName = saveDirPath + "/" + currentTime + ".jpg";
|
QString rotatedImageFileName = saveDirPath + "/" + len_num + "_" + currentTime + ".jpg";
|
||||||
rotatedImage.save(rotatedImageFileName, "JPG");
|
rotatedImage.save(rotatedImageFileName, "JPG");
|
||||||
qDebug() << "JPG image saved to" << rotatedImageFileName;
|
qDebug() << "JPG image saved to" << rotatedImageFileName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
// FFmpegDecoder.cpp
|
// FFmpegDecoder.cpp
|
||||||
#include "FFmpegDecoder.h"
|
#include "FFmpegDecoder.h"
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
|
|
||||||
FFmpegDecoder::FFmpegDecoder(QObject* parent) :
|
FFmpegDecoder::FFmpegDecoder(QObject* parent) :
|
||||||
QThread(parent),
|
QThread(parent),
|
||||||
|
@ -37,6 +39,9 @@ FFmpegDecoder::~FFmpegDecoder()
|
||||||
|
|
||||||
void FFmpegDecoder::processVideo(int itemIndex)
|
void FFmpegDecoder::processVideo(int itemIndex)
|
||||||
{
|
{
|
||||||
|
qDebug() << "processVideo running in thread:" << QThread::currentThread();
|
||||||
|
qDebug() << "FFmpegDecoder thread:" << this->thread();
|
||||||
|
|
||||||
QLabel* originalLabel;
|
QLabel* originalLabel;
|
||||||
if (isBackBoardOrAllBoard) {
|
if (isBackBoardOrAllBoard) {
|
||||||
originalLabel = this->videoLabel_back;
|
originalLabel = this->videoLabel_back;
|
||||||
|
@ -45,8 +50,8 @@ void FFmpegDecoder::processVideo(int itemIndex)
|
||||||
originalLabel = this->videoLabel;
|
originalLabel = this->videoLabel;
|
||||||
}
|
}
|
||||||
if ((FocusWindowWidth != 0) && (FocusWindowHeight != 0)) {
|
if ((FocusWindowWidth != 0) && (FocusWindowHeight != 0)) {
|
||||||
qDebug() << "------ processVideo";
|
qDebug() << "---1--- processVideo";
|
||||||
FocusWindowDialog* dialog = nullptr;
|
/*FocusWindowDialog* dialog = nullptr;
|
||||||
if (FocusWindowWidth * 16 == FocusWindowHeight * 9) {
|
if (FocusWindowWidth * 16 == FocusWindowHeight * 9) {
|
||||||
dialog = new FocusWindowDialog(nullptr, QSize(540, 960));
|
dialog = new FocusWindowDialog(nullptr, QSize(540, 960));
|
||||||
}
|
}
|
||||||
|
@ -68,14 +73,49 @@ void FFmpegDecoder::processVideo(int itemIndex)
|
||||||
this->videoLabelTemp = dialog->videoDisplayLabel;
|
this->videoLabelTemp = dialog->videoDisplayLabel;
|
||||||
this->videoLabelChanged = true;
|
this->videoLabelChanged = true;
|
||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
|
qDebug() << "---2--- processVideo";
|
||||||
if ((dialog->exec() == QDialog::Accepted) || (dialog->exec() == QDialog::Rejected)) {
|
if ((dialog->exec() == QDialog::Accepted) || (dialog->exec() == QDialog::Rejected)) {
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
this->videoLabelTemp = originalLabel;
|
this->videoLabelTemp = originalLabel;
|
||||||
this->videoLabelChanged = true;
|
this->videoLabelChanged = true;
|
||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
}
|
}
|
||||||
delete dialog;
|
delete dialog;*/
|
||||||
|
QMetaObject::invokeMethod(qApp, [=]() {
|
||||||
|
FocusWindowDialog* dialog = nullptr;
|
||||||
|
if (FocusWindowWidth * 16 == FocusWindowHeight * 9) {
|
||||||
|
dialog = new FocusWindowDialog(nullptr, QSize(540, 960));
|
||||||
|
}
|
||||||
|
else if (FocusWindowWidth * 9 == FocusWindowHeight * 16) {
|
||||||
|
dialog = new FocusWindowDialog(nullptr, QSize(960, 540));
|
||||||
|
}
|
||||||
|
else if (FocusWindowWidth * 4 == FocusWindowHeight * 3) {
|
||||||
|
dialog = new FocusWindowDialog(nullptr, QSize(480, 640));
|
||||||
|
}
|
||||||
|
else if (FocusWindowWidth * 3 == FocusWindowHeight * 4) {
|
||||||
|
dialog = new FocusWindowDialog(nullptr, QSize(640, 480));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
qDebug() << "------ Other scaled resolutions use 480x640";
|
||||||
|
dialog = new FocusWindowDialog(nullptr, QSize(480, 640));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置临时视频Label
|
||||||
|
mutex.lock();
|
||||||
|
this->videoLabelTemp = dialog->videoDisplayLabel;
|
||||||
|
this->videoLabelChanged = true;
|
||||||
|
mutex.unlock();
|
||||||
|
|
||||||
|
connect(dialog, &QDialog::finished, this, [=](int result) {
|
||||||
|
mutex.lock();
|
||||||
|
this->videoLabelTemp = originalLabel;
|
||||||
|
this->videoLabelChanged = true;
|
||||||
|
mutex.unlock();
|
||||||
|
dialog->deleteLater(); // 关闭后删除窗口
|
||||||
|
});
|
||||||
|
|
||||||
|
dialog->open(); // **在 UI 线程执行 open(),避免阻塞**
|
||||||
|
}, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qDebug() << "------ Please wait for the video to be decoded and rendered before clicking";
|
qDebug() << "------ Please wait for the video to be decoded and rendered before clicking";
|
||||||
|
@ -192,7 +232,7 @@ void FFmpegDecoder::run()
|
||||||
labelSize = currentVideoLabel->size();
|
labelSize = currentVideoLabel->size();
|
||||||
}
|
}
|
||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
|
qWarning() << "-------currentVideoLabel";
|
||||||
QImage img = avFrameToQImage(frame);
|
QImage img = avFrameToQImage(frame);
|
||||||
QImage scaledImage = img.scaled(labelSize, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
QImage scaledImage = img.scaled(labelSize, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||||
//currentVideoLabel->setPixmap(QPixmap::fromImage(scaledImage));
|
//currentVideoLabel->setPixmap(QPixmap::fromImage(scaledImage));
|
||||||
|
|
|
@ -230,6 +230,40 @@ void ClientHandler::sendJsonItem(const QJsonArray& jsonArray, int itemIndex, con
|
||||||
currentItem["val"] = text;
|
currentItem["val"] = text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "CHANGE_THEME") {
|
||||||
|
QString downloadUrl;
|
||||||
|
QEventLoop loop;
|
||||||
|
emit startImageSharing(CHANGE_THEME_W, CHANGE_THEME_H, "theme", [&downloadUrl, &loop](QString responseUrl) {
|
||||||
|
//qDebug() << "Received response from slot:" << responseUrl;
|
||||||
|
downloadUrl = responseUrl; // 更新局部变量
|
||||||
|
loop.quit(); // 退出事件循环
|
||||||
|
});
|
||||||
|
//loop.exec(); // 等待回调执行完成
|
||||||
|
if (!downloadUrl.isEmpty()) {
|
||||||
|
qDebug() << "Image available at:" << downloadUrl;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
currentItem["val"] = downloadUrl;
|
||||||
|
}
|
||||||
|
else if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "UPDATE_LOGO") {
|
||||||
|
QString downloadUrl;
|
||||||
|
QEventLoop loop;
|
||||||
|
emit startLOGOImageSharing(CHANGE_THEME_W, CHANGE_THEME_H, "theme", [&downloadUrl, &loop](QString responseUrl) {
|
||||||
|
//qDebug() << "Received response from slot:" << responseUrl;
|
||||||
|
downloadUrl = responseUrl; // 更新局部变量
|
||||||
|
loop.quit(); // 退出事件循环
|
||||||
|
});
|
||||||
|
//loop.exec(); // 等待回调执行完成
|
||||||
|
if (!downloadUrl.isEmpty()) {
|
||||||
|
qDebug() << "Image available at:" << downloadUrl;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
currentItem["val"] = downloadUrl;
|
||||||
|
}
|
||||||
else if (!text.isEmpty() && currentItem.contains("UUID") && currentItem.contains("SN")) {
|
else if (!text.isEmpty() && currentItem.contains("UUID") && currentItem.contains("SN")) {
|
||||||
QJsonValue originalUUID = currentItem["UUID"];
|
QJsonValue originalUUID = currentItem["UUID"];
|
||||||
QJsonValue originalSN = currentItem["SN"];
|
QJsonValue originalSN = currentItem["SN"];
|
||||||
|
@ -280,6 +314,101 @@ void ClientHandler::sendJsonItem(const QJsonArray& jsonArray, int itemIndex, con
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClientHandler::sendBackFuncItem(int itemIndex, const QString text)
|
||||||
|
{
|
||||||
|
if (isBackBoardOrAllBoard == 0) {
|
||||||
|
emit HandleInvalidOperate("当前连接的是前板,请勿操作后板或整机页面的按键!!!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//qDebug() << "sendFuncItem Text:" << text;
|
||||||
|
sendJsonItem(backBoardFuncConfig, itemIndex, text, "", "func");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClientHandler::sendFrontItem(int itemIndex)
|
||||||
|
{
|
||||||
|
if (isBackBoardOrAllBoard != 0) {
|
||||||
|
emit HandleInvalidOperate("当前连接的是后板或整机,请勿操作前板页面的按键!!!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
QString text = "";
|
||||||
|
QJsonObject currentItem = frontBoardTest[itemIndex].toObject();
|
||||||
|
if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "IMG_ENROLL") {
|
||||||
|
QString downloadUrl;
|
||||||
|
QEventLoop loop;
|
||||||
|
emit startImageSharing(IMG_ENROLL_W, IMG_ENROLL_H, "enroll", [&downloadUrl, &loop](QString responseUrl) {
|
||||||
|
//qDebug() << "Received response from slot:" << responseUrl;
|
||||||
|
downloadUrl = responseUrl; // 更新局部变量
|
||||||
|
loop.quit(); // 退出事件循环
|
||||||
|
});
|
||||||
|
//loop.exec(); // 等待回调执行完成
|
||||||
|
if (!downloadUrl.isEmpty()) {
|
||||||
|
qDebug() << "Image available at:" << downloadUrl;
|
||||||
|
}
|
||||||
|
text = downloadUrl;
|
||||||
|
}
|
||||||
|
else if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "DEL_USER") {
|
||||||
|
DelUserWindow dialog;
|
||||||
|
if (dialog.exec() == QDialog::Accepted) {
|
||||||
|
QString userInput = dialog.getUserInput();
|
||||||
|
if (!userInput.isEmpty() && currentItem.contains("val")) {
|
||||||
|
text = userInput;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "PASSWD_ENROLL") {
|
||||||
|
PasswordEnrollWindow dialog;
|
||||||
|
if (dialog.exec() == QDialog::Accepted) {
|
||||||
|
text = dialog.getPassword();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sendJsonItem(frontBoardTest, itemIndex, text, "", "test");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClientHandler::sendBackItem(int itemIndex)
|
||||||
|
{
|
||||||
|
if (isBackBoardOrAllBoard == 0) {
|
||||||
|
emit HandleInvalidOperate("当前连接的是前板,请勿操作后板或整机页面的按键!!!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
QString text = "";
|
||||||
|
QJsonObject currentItem = backBoardTest[itemIndex].toObject();
|
||||||
|
if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "DEL_USER") {
|
||||||
|
DelUserWindow dialog;
|
||||||
|
if (dialog.exec() == QDialog::Accepted) {
|
||||||
|
QString userInput = dialog.getUserInput();
|
||||||
|
if (!userInput.isEmpty() && currentItem.contains("val")) {
|
||||||
|
text = userInput;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "PASSWD_ENROLL") {
|
||||||
|
PasswordEnrollWindow dialog;
|
||||||
|
if (dialog.exec() == QDialog::Accepted) {
|
||||||
|
text = dialog.getPassword();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
isRecvVideoData = false;
|
||||||
|
sendJsonItem(backBoardTest, itemIndex, text, "", "test");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 发送获取设备信息按键
|
// 发送获取设备信息按键
|
||||||
void ClientHandler::sendGetDevInfoItem(int itemIndex)
|
void ClientHandler::sendGetDevInfoItem(int itemIndex)
|
||||||
{
|
{
|
||||||
|
@ -348,118 +477,6 @@ void ClientHandler::sendFrontFuncItem(int itemIndex, const QString text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientHandler::sendBackFuncItem(int itemIndex, const QString text)
|
|
||||||
{
|
|
||||||
if (isBackBoardOrAllBoard == 0) {
|
|
||||||
emit HandleInvalidOperate("当前连接的是前板,请勿操作后板或整机页面的按键!!!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
//qDebug() << "sendFuncItem Text:" << text;
|
|
||||||
sendJsonItem(backBoardFuncConfig, itemIndex, text, "", "func");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ClientHandler::sendFrontItem(int itemIndex)
|
|
||||||
{
|
|
||||||
if (isBackBoardOrAllBoard != 0) {
|
|
||||||
emit HandleInvalidOperate("当前连接的是后板或整机,请勿操作前板页面的按键!!!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
QString text = "";
|
|
||||||
QJsonObject currentItem = frontBoardTest[itemIndex].toObject();
|
|
||||||
if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "IMG_ENROLL") {
|
|
||||||
QString downloadUrl;
|
|
||||||
QEventLoop loop;
|
|
||||||
emit startImageSharing(IMG_ENROLL_W, IMG_ENROLL_H, "enroll", [&downloadUrl, &loop](QString responseUrl) {
|
|
||||||
//qDebug() << "Received response from slot:" << responseUrl;
|
|
||||||
downloadUrl = responseUrl; // 更新局部变量
|
|
||||||
loop.quit(); // 退出事件循环
|
|
||||||
});
|
|
||||||
//loop.exec(); // 等待回调执行完成
|
|
||||||
if (!downloadUrl.isEmpty()) {
|
|
||||||
qDebug() << "Image available at:" << downloadUrl;
|
|
||||||
}
|
|
||||||
text = downloadUrl;
|
|
||||||
}
|
|
||||||
else if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "DEL_USER") {
|
|
||||||
DelUserWindow dialog;
|
|
||||||
if (dialog.exec() == QDialog::Accepted) {
|
|
||||||
QString userInput = dialog.getUserInput();
|
|
||||||
if (!userInput.isEmpty() && currentItem.contains("val")) {
|
|
||||||
text = userInput;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "PASSWD_ENROLL") {
|
|
||||||
PasswordEnrollWindow dialog;
|
|
||||||
if (dialog.exec() == QDialog::Accepted) {
|
|
||||||
text = dialog.getPassword();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sendJsonItem(frontBoardTest, itemIndex, text, "", "test");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ClientHandler::sendBackItem(int itemIndex)
|
|
||||||
{
|
|
||||||
if (isBackBoardOrAllBoard == 0) {
|
|
||||||
emit HandleInvalidOperate("当前连接的是前板,请勿操作后板或整机页面的按键!!!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
QString text = "";
|
|
||||||
QJsonObject currentItem = backBoardTest[itemIndex].toObject();
|
|
||||||
if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "CHANGE_THEME") {
|
|
||||||
QString downloadUrl;
|
|
||||||
QEventLoop loop;
|
|
||||||
emit startImageSharing(CHANGE_THEME_W, CHANGE_THEME_H, "theme", [&downloadUrl, &loop](QString responseUrl) {
|
|
||||||
//qDebug() << "Received response from slot:" << responseUrl;
|
|
||||||
downloadUrl = responseUrl; // 更新局部变量
|
|
||||||
loop.quit(); // 退出事件循环
|
|
||||||
});
|
|
||||||
//loop.exec(); // 等待回调执行完成
|
|
||||||
if (!downloadUrl.isEmpty()) {
|
|
||||||
qDebug() << "Image available at:" << downloadUrl;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
text = downloadUrl;
|
|
||||||
}
|
|
||||||
else if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "DEL_USER") {
|
|
||||||
DelUserWindow dialog;
|
|
||||||
if (dialog.exec() == QDialog::Accepted) {
|
|
||||||
QString userInput = dialog.getUserInput();
|
|
||||||
if (!userInput.isEmpty() && currentItem.contains("val")) {
|
|
||||||
text = userInput;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "PASSWD_ENROLL") {
|
|
||||||
PasswordEnrollWindow dialog;
|
|
||||||
if (dialog.exec() == QDialog::Accepted) {
|
|
||||||
text = dialog.getPassword();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
isRecvVideoData = false;
|
|
||||||
sendJsonItem(backBoardTest, itemIndex, text, "", "test");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ClientHandler::sendDevInfoJsonItem(const QJsonObject& jsonItem, int itemIndex)
|
void ClientHandler::sendDevInfoJsonItem(const QJsonObject& jsonItem, int itemIndex)
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&mutex);
|
QMutexLocker locker(&mutex);
|
||||||
|
|
|
@ -104,6 +104,7 @@ public:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void startImageSharing(int width, int height, QString img_type, std::function<void(QString)> callback);
|
void startImageSharing(int width, int height, QString img_type, std::function<void(QString)> callback);
|
||||||
|
void startLOGOImageSharing(int width, int height, QString img_type, std::function<void(QString)> callback);
|
||||||
// 数据接收信号
|
// 数据接收信号
|
||||||
void dataReceived(const QString& client, const QByteArray& data, unsigned char msg_id, int currentRecvItemIndex,
|
void dataReceived(const QString& client, const QByteArray& data, unsigned char msg_id, int currentRecvItemIndex,
|
||||||
int currentRecvFuncItemIndex, const QString& itemData, const QString& funcItemData,
|
int currentRecvFuncItemIndex, const QString& itemData, const QString& funcItemData,
|
||||||
|
|
|
@ -32,8 +32,13 @@ public:
|
||||||
return userInput->text();
|
return userInput->text();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void userInputEntered(const QString& userInput); // **只发送用户输入,不管取消情况**
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onDeleteButtonClicked() {
|
void onDeleteButtonClicked() {
|
||||||
|
emit userInputEntered(userInput->text()); // **发送输入值**
|
||||||
|
//close(); // **关闭窗口**
|
||||||
accept();
|
accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ void DataHandler::handleData(const QString& client, const QByteArray& recv
|
||||||
(static_cast<unsigned char>(buffer->at(7)) << 8) |
|
(static_cast<unsigned char>(buffer->at(7)) << 8) |
|
||||||
(static_cast<unsigned char>(buffer->at(6)));
|
(static_cast<unsigned char>(buffer->at(6)));
|
||||||
//qDebug() << "---Received dataSize:" << dataSize;
|
//qDebug() << "---Received dataSize:" << dataSize;
|
||||||
//qDebug() << "---Received buffer->size():" << buffer->size();
|
qDebug() << "---Received buffer->size():" << buffer->size();
|
||||||
//qDebug() << "---msg_id:" << QString::number(msg_id, 16).toUpper();
|
//qDebug() << "---msg_id:" << QString::number(msg_id, 16).toUpper();
|
||||||
// 第11字节为返回 OK/NG
|
// 第11字节为返回 OK/NG
|
||||||
bool success = (static_cast<unsigned char>(buffer->at(10)) != 0x00);
|
bool success = (static_cast<unsigned char>(buffer->at(10)) != 0x00);
|
||||||
|
@ -159,6 +159,7 @@ void DataHandler::handleData(const QString& client, const QByteArray& recv
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
qDebug() << "---Received totalSize:" << totalSize;
|
||||||
if (buffer->size() >= totalSize) {
|
if (buffer->size() >= totalSize) {
|
||||||
// 调试查看收到的前19个字节
|
// 调试查看收到的前19个字节
|
||||||
/*for (int i = 0; i < 19; i++) {
|
/*for (int i = 0; i < 19; i++) {
|
||||||
|
|
|
@ -142,7 +142,6 @@ void SerialDataHandler::handleData(const QString& client, const QByteArray
|
||||||
qDebug() << "read file data size:" << recvdata.size();
|
qDebug() << "read file data size:" << recvdata.size();
|
||||||
#endif
|
#endif
|
||||||
qDebug() << "---Received data size:" << recvData.size();
|
qDebug() << "---Received data size:" << recvData.size();
|
||||||
// 将接收到的数据追加到buffer
|
|
||||||
buffer->append(recvData);
|
buffer->append(recvData);
|
||||||
while (buffer->size() >= 11) { // 至少需要11个字节来解析数据头
|
while (buffer->size() >= 11) { // 至少需要11个字节来解析数据头
|
||||||
|
|
||||||
|
@ -156,6 +155,7 @@ void SerialDataHandler::handleData(const QString& client, const QByteArray
|
||||||
emit sendHeartBeatData(payload, heartBeat);
|
emit sendHeartBeatData(payload, heartBeat);
|
||||||
buffer->remove(0, 11); // 移除已处理的数据
|
buffer->remove(0, 11); // 移除已处理的数据
|
||||||
//buffer->remove(0, recvData.size()); // 移除已处理的数据
|
//buffer->remove(0, recvData.size()); // 移除已处理的数据
|
||||||
|
// 这里开始发送获取设备信息
|
||||||
emit statusUpdated(-2, client, true, jsonArray, itemJsonIndex);
|
emit statusUpdated(-2, client, true, jsonArray, itemJsonIndex);
|
||||||
//break;
|
//break;
|
||||||
continue;
|
continue;
|
||||||
|
@ -184,7 +184,7 @@ void SerialDataHandler::handleData(const QString& client, const QByteArray
|
||||||
(static_cast<unsigned char>(buffer->at(7)) << 8) |
|
(static_cast<unsigned char>(buffer->at(7)) << 8) |
|
||||||
(static_cast<unsigned char>(buffer->at(6)));
|
(static_cast<unsigned char>(buffer->at(6)));
|
||||||
qDebug() << "---Received dataSize:" << dataSize;
|
qDebug() << "---Received dataSize:" << dataSize;
|
||||||
//qDebug() << "---Received buffer->size():" << buffer->size();
|
qDebug() << "---Received buffer->size():" << buffer->size();
|
||||||
//qDebug() << "---msg_id:" << QString::number(msg_id, 16).toUpper();
|
//qDebug() << "---msg_id:" << QString::number(msg_id, 16).toUpper();
|
||||||
// 第11字节为返回 OK/NG
|
// 第11字节为返回 OK/NG
|
||||||
bool success = (static_cast<unsigned char>(buffer->at(10)) != 0x00);
|
bool success = (static_cast<unsigned char>(buffer->at(10)) != 0x00);
|
||||||
|
@ -207,26 +207,34 @@ void SerialDataHandler::handleData(const QString& client, const QByteArray
|
||||||
QByteArray data = buffer->mid(11, dataSize);
|
QByteArray data = buffer->mid(11, dataSize);
|
||||||
QString hexString = QString::fromUtf8(data.toHex().data());
|
QString hexString = QString::fromUtf8(data.toHex().data());
|
||||||
QByteArray actual_data = hexStringToByteArray(hexString);
|
QByteArray actual_data = hexStringToByteArray(hexString);
|
||||||
buffer->remove(0, totalSize); // 移除已处理的数据
|
//buffer->remove(0, totalSize); // 移除已处理的数据
|
||||||
qDebug() << "-------------------------------------------- isTimeout:" << isTimeout;
|
buffer->remove(0, buffer->size()); // 移除已处理的数据
|
||||||
|
if (msg_id < 0x0200) // 忽略小于产测指令的大小
|
||||||
|
{
|
||||||
|
qDebug() << "--- msg_id:" << msg_id << " < 0x0200 to give up";
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (!isTimeout)
|
if (!isTimeout)
|
||||||
{
|
{
|
||||||
if (msg_id != 0x0040 && msg_id != START_VIDEO && msg_id != GET_IMG && msg_id != VIDEO_TEST &&
|
if (msg_id != 0x0040 && msg_id != START_VIDEO && msg_id != GET_IMG && msg_id != VIDEO_TEST &&
|
||||||
msg_id != STOP_VIDEO) {
|
msg_id != STOP_VIDEO && msg_id != FACE_ENROLL_SINGLE && msg_id != FACE_ENROLL && msg_id != HAND_ENROLL &&
|
||||||
|
msg_id != FACE_VERIFY && msg_id != HAND_VERIFY) {
|
||||||
qDebug() << "--- msg_id:" << QString::number(msg_id, 16).toUpper();
|
qDebug() << "--- msg_id:" << QString::number(msg_id, 16).toUpper();
|
||||||
qDebug() << "--- clientLastMsgId.value(client, 0):" << clientLastMsgId.value(client, 0);
|
qDebug() << "--- clientLastMsgId.value(client, 0):" << clientLastMsgId.value(client, 0);
|
||||||
qDebug() << "--- success:" << success;
|
qDebug() << "--- success:" << success;
|
||||||
//qDebug() << "--- itemJsonIndex:" << itemJsonIndex;
|
//qDebug() << "--- itemJsonIndex:" << itemJsonIndex;
|
||||||
if ((msg_id != 0x0011 || clientLastMsgId.value(client, 0) != 0x0011) &&
|
if ((msg_id != 0x0011 || clientLastMsgId.value(client, 0) != 0x0011) &&
|
||||||
(msg_id != 0x0021 || clientLastMsgId.value(client, 0) != 0x0021) &&
|
(msg_id != 0x0021 || clientLastMsgId.value(client, 0) != 0x0021) &&
|
||||||
(msg_id != START_VIDEO || clientLastMsgId.value(client, 0) != START_VIDEO)) {
|
(msg_id != START_VIDEO || clientLastMsgId.value(client, 0) != START_VIDEO) &&
|
||||||
//qDebug() << "Emitting statusUpdated for client:" << client << "with msg_id:" << QString::number(msg_id, 16).toUpper();
|
(msg_id != GET_BACK_MAC || clientLastMsgId.value(client, 0) != GET_BACK_MAC) &&
|
||||||
|
(msg_id != GET_FRONT_HW_INFO || clientLastMsgId.value(client, 0) != GET_FRONT_HW_INFO)) {
|
||||||
|
qDebug() << "Emitting statusUpdated for client:" << client << "with msg_id:" << QString::number(msg_id, 16).toUpper();
|
||||||
emit statusUpdated(-1, client, success, jsonArray, itemJsonIndex);
|
emit statusUpdated(-1, client, success, jsonArray, itemJsonIndex);
|
||||||
emit recvNormalDataFlag(true);
|
emit recvNormalDataFlag(true);
|
||||||
}
|
}
|
||||||
clientLastMsgId[client] = msg_id;
|
clientLastMsgId[client] = msg_id;
|
||||||
}
|
}
|
||||||
handleCmd(msg_id, client, actual_data, jsonArray, itemJsonIndex);
|
handleCmd(msg_id, client, actual_data, jsonArray, itemJsonIndex, success);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -313,36 +321,69 @@ void SerialDataHandler::initializeMsgIdToCmdMap() {
|
||||||
msgIdToCmdMap[GET_BACK_HW_VERSION] = "GET_BACK_HW_VERSION";
|
msgIdToCmdMap[GET_BACK_HW_VERSION] = "GET_BACK_HW_VERSION";
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerialDataHandler::handleCmd(int msg_id, const QString& client, QByteArray actual_data, const QJsonArray& jsonArray, int itemJsonIndex)
|
void SerialDataHandler::handleCmd(int msg_id, const QString& client, QByteArray actual_data, const QJsonArray& jsonArray, int itemJsonIndex, bool success)
|
||||||
{
|
{
|
||||||
if (msg_id < 0x0400) {
|
if (msg_id < 0x0400) {
|
||||||
handleFrontCmd(msg_id, client, actual_data, jsonArray, itemJsonIndex);
|
handleFrontCmd(msg_id, client, actual_data, jsonArray, itemJsonIndex, success);
|
||||||
}
|
}
|
||||||
else if (msg_id < 0x0500) {
|
else if (msg_id < 0x0500) {
|
||||||
handleDevInfo(msg_id, client, actual_data);
|
handleDevInfo(msg_id, client, actual_data, jsonArray, itemJsonIndex);
|
||||||
}
|
}
|
||||||
else if (msg_id < 0x0800) {
|
else if (msg_id < 0x0800) {
|
||||||
//handleBackCmd(msg_id, client, actual_data, jsonArray, itemJsonIndex);
|
//handleBackCmd(msg_id, client, actual_data, jsonArray, itemJsonIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerialDataHandler::handleFrontCmd(int msg_id, const QString& client, QByteArray actual_data, const QJsonArray& jsonArray, int itemJsonIndex)
|
void SerialDataHandler::handleFrontCmd(int msg_id, const QString& client, QByteArray actual_data, const QJsonArray& jsonArray, int itemJsonIndex, bool success)
|
||||||
{
|
{
|
||||||
switch (msg_id) {
|
switch (msg_id) {
|
||||||
case FACE_ENROLL_SINGLE:
|
case FACE_ENROLL_SINGLE:
|
||||||
{}
|
case FACE_ENROLL:
|
||||||
break;
|
case HAND_ENROLL:
|
||||||
case FACE_ENROLL:
|
case FACE_VERIFY:
|
||||||
{}
|
|
||||||
break;
|
|
||||||
case HAND_ENROLL:
|
|
||||||
{}
|
|
||||||
break;
|
|
||||||
case FACE_VERIFY:
|
|
||||||
{}
|
|
||||||
break;
|
|
||||||
case HAND_VERIFY:
|
case HAND_VERIFY:
|
||||||
{}
|
{
|
||||||
|
#if REG_AND_VERIFY_GET_PIC
|
||||||
|
qDebug() << "---- ENROLL and VERIFY get pic ----";
|
||||||
|
int lens_n = static_cast<unsigned char>(actual_data[1]);
|
||||||
|
int width = (static_cast<unsigned char>(actual_data[3]) << 8) | static_cast<unsigned char>(actual_data[2]);
|
||||||
|
int height = (static_cast<unsigned char>(actual_data[5]) << 8) | static_cast<unsigned char>(actual_data[4]);
|
||||||
|
int format = static_cast<unsigned char>(actual_data[6]);
|
||||||
|
qint32 picSize = width * height * 1.5;
|
||||||
|
QByteArray yuvData = actual_data.mid(7);
|
||||||
|
qDebug() << "showPic width * height * 1.5:" << picSize;
|
||||||
|
qDebug() << "showPic picBuffer.size():" << picBuffer->size();
|
||||||
|
qDebug() << "showPic yuvData.size():" << yuvData.size();
|
||||||
|
if (yuvData.size() + picBuffer->size() == picSize) {
|
||||||
|
picBuffer->append(yuvData);
|
||||||
|
showPic(labelSize, lens_n, width, height, format, picBuffer);
|
||||||
|
QJsonObject currentTempItem = jsonArray[itemJsonIndex].toObject();
|
||||||
|
qDebug() << "--1-- showPic ----";
|
||||||
|
//emit statusUpdated(-1, client, success, jsonArray, itemJsonIndex);
|
||||||
|
emit statusUpdated(-1, client, true, jsonArray, itemJsonIndex);
|
||||||
|
emit picRecvFinished();
|
||||||
|
picBuffer->remove(0, picSize);
|
||||||
|
}
|
||||||
|
else if (yuvData.size() + picBuffer->size() > picSize) {
|
||||||
|
picBuffer->append(yuvData);
|
||||||
|
qDebug() << "width is " << width << " height is " << height << "PIC size is" << picSize;
|
||||||
|
qDebug() << "But recv PIC size is " << picBuffer->size();
|
||||||
|
int excessSize = picBuffer->size() - picSize; // 计算超出的大小
|
||||||
|
// 删除末尾超出的部分
|
||||||
|
picBuffer->chop(excessSize);
|
||||||
|
showPic(labelSize, lens_n, width, height, format, picBuffer);
|
||||||
|
QJsonObject currentTempItem = jsonArray[itemJsonIndex].toObject();
|
||||||
|
qDebug() << "--2-- showPic ----";
|
||||||
|
//emit statusUpdated(-1, client, success, jsonArray, itemJsonIndex);
|
||||||
|
emit statusUpdated(-1, client, true, jsonArray, itemJsonIndex);
|
||||||
|
emit picRecvFinished();
|
||||||
|
picBuffer->remove(0, picBuffer->size());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
picBuffer->append(yuvData);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case DEL_USER:
|
case DEL_USER:
|
||||||
{}
|
{}
|
||||||
|
@ -385,6 +426,12 @@ void SerialDataHandler::handleFrontCmd(int msg_id, const QString& client, QByteA
|
||||||
picBuffer->append(yuvData);
|
picBuffer->append(yuvData);
|
||||||
qDebug() << "width is " << width << " height is " << height << "PIC size is" << picSize;
|
qDebug() << "width is " << width << " height is " << height << "PIC size is" << picSize;
|
||||||
qDebug() << "But recv PIC size is " << picBuffer->size();
|
qDebug() << "But recv PIC size is " << picBuffer->size();
|
||||||
|
int excessSize = picBuffer->size() - picSize; // 计算超出的大小
|
||||||
|
// 删除末尾超出的部分
|
||||||
|
picBuffer->chop(excessSize);
|
||||||
|
showPic(labelSize, lens_n, width, height, format, picBuffer);
|
||||||
|
QJsonObject currentTempItem = jsonArray[itemJsonIndex].toObject();
|
||||||
|
emit statusUpdated(-1, client, true, jsonArray, itemJsonIndex);
|
||||||
picBuffer->remove(0, picBuffer->size());
|
picBuffer->remove(0, picBuffer->size());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -525,10 +572,10 @@ void SerialDataHandler::handleFrontCmd(int msg_id, const QString& client, QByteA
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerialDataHandler::handleDevInfo(int msg_id, const QString& client, QByteArray actual_data)
|
void SerialDataHandler::handleDevInfo(int msg_id, const QString& client, QByteArray actual_data, const QJsonArray& jsonArray, int itemJsonIndex)
|
||||||
{
|
{
|
||||||
qDebug() << "actual_data.size(): " << actual_data.size();
|
//qDebug() << "actual_data.size(): " << actual_data.size();
|
||||||
qDebug() << "actual_data: " << QString::fromUtf8(actual_data.toHex().data());
|
//qDebug() << "actual_data: " << QString::fromUtf8(actual_data.toHex().data());
|
||||||
switch (msg_id) {
|
switch (msg_id) {
|
||||||
case GET_FRONT_V851_VERSION:
|
case GET_FRONT_V851_VERSION:
|
||||||
case GET_FRONT_MCU_VERSION:
|
case GET_FRONT_MCU_VERSION:
|
||||||
|
@ -572,8 +619,10 @@ void SerialDataHandler::handleDevInfo(int msg_id, const QString& client, QByteAr
|
||||||
}
|
}
|
||||||
dataStr = hexList.join(", ");
|
dataStr = hexList.join(", ");
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
|
emit statusUpdated(-1, client, false, jsonArray, itemJsonIndex);
|
||||||
dataStr = "前板发送的 HW INFO 数据大小不正确";
|
dataStr = "前板发送的 HW INFO 数据大小不正确";
|
||||||
|
}
|
||||||
QString displayText = dataStr;
|
QString displayText = dataStr;
|
||||||
//licenseHwInfoEdit->setPlainText(displayText);
|
//licenseHwInfoEdit->setPlainText(displayText);
|
||||||
emit updateLicenseHwInfoEdit(displayText);
|
emit updateLicenseHwInfoEdit(displayText);
|
||||||
|
@ -589,8 +638,10 @@ void SerialDataHandler::handleDevInfo(int msg_id, const QString& client, QByteAr
|
||||||
dataStr.append(ch);
|
dataStr.append(ch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
|
emit statusUpdated(-1, client, false, jsonArray, itemJsonIndex);
|
||||||
dataStr = "后板发送的 MAC addr 数据大小不正确";
|
dataStr = "后板发送的 MAC addr 数据大小不正确";
|
||||||
|
}
|
||||||
QString displayText = dataStr;
|
QString displayText = dataStr;
|
||||||
emit updateUuidHwInfoEdit(displayText);
|
emit updateUuidHwInfoEdit(displayText);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#define YUV422 2
|
#define YUV422 2
|
||||||
|
|
||||||
#define BACK_MAC_ADDRESS_LEN 17
|
#define BACK_MAC_ADDRESS_LEN 17
|
||||||
|
// 打开注册识别取图
|
||||||
|
#define REG_AND_VERIFY_GET_PIC 1
|
||||||
|
|
||||||
class SerialDataHandler : public QObject
|
class SerialDataHandler : public QObject
|
||||||
{
|
{
|
||||||
|
@ -107,9 +109,9 @@ private:
|
||||||
QByteArray hexStringToByteArray(const QString& hexString);
|
QByteArray hexStringToByteArray(const QString& hexString);
|
||||||
void showVideo(const QString& client, const QByteArray& valData);
|
void showVideo(const QString& client, const QByteArray& valData);
|
||||||
void clearAllRecvData();
|
void clearAllRecvData();
|
||||||
void handleCmd(int msg_id, const QString& client, QByteArray actual_data, const QJsonArray& jsonArray, int itemJsonIndex);
|
void handleCmd(int msg_id, const QString& client, QByteArray actual_data, const QJsonArray& jsonArray, int itemJsonIndex, bool success);
|
||||||
void handleFrontCmd(int msg_id, const QString& client, QByteArray actual_data, const QJsonArray& jsonArray, int itemJsonIndex);
|
void handleFrontCmd(int msg_id, const QString& client, QByteArray actual_data, const QJsonArray& jsonArray, int itemJsonIndex, bool success);
|
||||||
void handleDevInfo(int msg_id, const QString& client, QByteArray actual_data);
|
void handleDevInfo(int msg_id, const QString& client, QByteArray actual_data, const QJsonArray& jsonArray, int itemJsonIndex);
|
||||||
void initializeMsgIdToCmdMap();
|
void initializeMsgIdToCmdMap();
|
||||||
void updateLineEdit(int msg_id, const QByteArray& actual_data);
|
void updateLineEdit(int msg_id, const QByteArray& actual_data);
|
||||||
void showPic(QSize labelSize, int lens_n,
|
void showPic(QSize labelSize, int lens_n,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -51,10 +51,11 @@
|
||||||
#include <QSerialPortInfo>
|
#include <QSerialPortInfo>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QSerialPort>
|
#include <QSerialPort>
|
||||||
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <iphlpapi.h>
|
#include <iphlpapi.h>
|
||||||
|
#include "./SerialPortHandler/crc32.h"
|
||||||
#include "./UI_Widget/UI_Name.h"
|
#include "./UI_Widget/UI_Name.h"
|
||||||
#include "./SerialPortHandler/SerialPortHandler.h"
|
#include "./SerialPortHandler/SerialPortHandler.h"
|
||||||
#include "../Json/readJsonFile.h"
|
#include "../Json/readJsonFile.h"
|
||||||
|
@ -79,12 +80,12 @@
|
||||||
#define MANUAL_UPLOAD_LICENSE 0 // 打开手动上传 License的功能
|
#define MANUAL_UPLOAD_LICENSE 0 // 打开手动上传 License的功能
|
||||||
#define START_MDNS 1
|
#define START_MDNS 1
|
||||||
#define FOCUS_WINDOWS_BUTTON 4 // 大窗口播放视频的按键编号
|
#define FOCUS_WINDOWS_BUTTON 4 // 大窗口播放视频的按键编号
|
||||||
#define TCP_CONNECT_PORT 12412 // TCP监听的端口
|
//#define TCP_CONNECT_PORT 12412 // TCP监听的端口
|
||||||
#define GET_PIC_DATA_SIZE (480 * 640 * 1.5)
|
#define GET_PIC_DATA_SIZE (480 * 640 * 1.5)
|
||||||
|
|
||||||
#define NEW_MAP 1
|
#define NEW_MAP 1
|
||||||
|
|
||||||
|
// FactoryToolSendGetUuidToHttpServer 函数还需要改
|
||||||
#define FACTORY_ID "TEST" // 工厂ID
|
#define FACTORY_ID "TEST" // 工厂ID
|
||||||
#define LABEL "TEST_SL100_20240826" // 出货标签
|
#define LABEL "TEST_SL100_20240826" // 出货标签
|
||||||
#define BATCH 1 // 出货批次
|
#define BATCH 1 // 出货批次
|
||||||
|
@ -104,6 +105,7 @@ public:
|
||||||
QByteArray hexStringToByteArray(const QString& hexString);
|
QByteArray hexStringToByteArray(const QString& hexString);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void userInputEntered(const QString&);
|
||||||
void openFocusWindowRequested(int itemIndex);
|
void openFocusWindowRequested(int itemIndex);
|
||||||
void serialComPortConnected();
|
void serialComPortConnected();
|
||||||
void requestDevInfo();
|
void requestDevInfo();
|
||||||
|
@ -111,12 +113,15 @@ signals:
|
||||||
void openFocusWindow(int itemIndex);
|
void openFocusWindow(int itemIndex);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void showDelUserWindow();
|
||||||
|
void setupSerialPortHandlerConnections();
|
||||||
void onSerialDataReceived(const QByteArray& data);
|
void onSerialDataReceived(const QByteArray& data);
|
||||||
// 发送HTTP请求
|
// 发送HTTP请求
|
||||||
//void onSomeButtonClicked();
|
//void onSomeButtonClicked();
|
||||||
// 处理HTTP响应
|
// 处理HTTP响应
|
||||||
// 启动图片共享服务
|
// 启动图片共享服务
|
||||||
void onStartImageSharing(int width, int height, QString img_type, std::function<void(QString)> callback);
|
void onStartImageSharing(int width, int height, QString img_type, std::function<void(QString)> callback);
|
||||||
|
void onStartLOGOImageSharing(int width, int height, QString img_type, std::function<void(QString)> callback);
|
||||||
void onHttpRequestFinished(const QJsonObject& response);
|
void onHttpRequestFinished(const QJsonObject& response);
|
||||||
// 处理HTTP错误
|
// 处理HTTP错误
|
||||||
void onHttpRequestError(const QString& errorString);
|
void onHttpRequestError(const QString& errorString);
|
||||||
|
@ -177,6 +182,8 @@ private:
|
||||||
void readJsonConfig();
|
void readJsonConfig();
|
||||||
// 设置 UI
|
// 设置 UI
|
||||||
void setupUI();
|
void setupUI();
|
||||||
|
// 切换页面
|
||||||
|
void switchToTab(int tabIndex);
|
||||||
#if NEW_MAP
|
#if NEW_MAP
|
||||||
void addDeviceAreaTab(QTabWidget* mainTabWidget, const QString& tabName,
|
void addDeviceAreaTab(QTabWidget* mainTabWidget, const QString& tabName,
|
||||||
QGroupBox* deviceInfoGroupBox, QGroupBox* licenseGroupBox,
|
QGroupBox* deviceInfoGroupBox, QGroupBox* licenseGroupBox,
|
||||||
|
@ -207,6 +214,8 @@ private:
|
||||||
void saveStatusListToFile(const QString& filePath);
|
void saveStatusListToFile(const QString& filePath);
|
||||||
// 用于更新按键文本的函数
|
// 用于更新按键文本的函数
|
||||||
void updateServerButtonText();
|
void updateServerButtonText();
|
||||||
|
void updateGetVideoButtonState(int state, int connectedDevices, const QVector<QPushButton*>& buttons);
|
||||||
|
void updateGetPicButtonsState(int state, int connectedDevices);
|
||||||
void onHandleInvalidOperate(const QString& text);
|
void onHandleInvalidOperate(const QString& text);
|
||||||
void onDisconnectClient(int clientId);
|
void onDisconnectClient(int clientId);
|
||||||
void setupTimerForThreadPoolInfo();
|
void setupTimerForThreadPoolInfo();
|
||||||
|
@ -301,6 +310,7 @@ private:
|
||||||
QTextEdit* UuidHwInfoEdit; // Uuid的硬件信息
|
QTextEdit* UuidHwInfoEdit; // Uuid的硬件信息
|
||||||
MainWidget* mainWidget;
|
MainWidget* mainWidget;
|
||||||
QTabWidget* tabWidget; // 标签页
|
QTabWidget* tabWidget; // 标签页
|
||||||
|
QTabWidget* mainTabWidget;
|
||||||
QWidget* functionTestArea; // 功能测试区
|
QWidget* functionTestArea; // 功能测试区
|
||||||
QWidget* functionConfigArea; // 功能配置区
|
QWidget* functionConfigArea; // 功能配置区
|
||||||
QComboBox* ipComboBox;
|
QComboBox* ipComboBox;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
// SerialPortHandler.cpp
|
// SerialPortHandler.cpp
|
||||||
#include "SerialPortHandler.h"
|
#include "SerialPortHandler.h"
|
||||||
|
#include "crc32.h"
|
||||||
|
|
||||||
SerialPortHandler::SerialPortHandler(QComboBox* comPortComboBox, QPushButton* connectButton,
|
SerialPortHandler::SerialPortHandler(const UI_config& config, QComboBox* comPortComboBox, QPushButton* connectButton,
|
||||||
QJsonArray frontBoardOneClickTest, QJsonArray frontBoardTest, QJsonArray frontBoardFuncConfig,
|
QJsonArray frontBoardOneClickTest, QJsonArray frontBoardTest, QJsonArray frontBoardFuncConfig,
|
||||||
QJsonArray frontBoardDevInfoJson, QJsonArray frontBoardLicenseJson,
|
QJsonArray frontBoardDevInfoJson, QJsonArray frontBoardLicenseJson,
|
||||||
QJsonArray backBoardOneClickTest, QJsonArray backBoardTest, QJsonArray backBoardFuncConfig, QJsonArray backBoardDevInfoJson,
|
QJsonArray backBoardOneClickTest, QJsonArray backBoardTest, QJsonArray backBoardFuncConfig, QJsonArray backBoardDevInfoJson,
|
||||||
|
@ -14,7 +15,7 @@ SerialPortHandler::SerialPortHandler(QComboBox* comPortComboBox, QPushButton* co
|
||||||
backBoardFuncConfig(backBoardFuncConfig), backBoardDevInfoJson(backBoardDevInfoJson),
|
backBoardFuncConfig(backBoardFuncConfig), backBoardDevInfoJson(backBoardDevInfoJson),
|
||||||
backBoardUuidJson(backBoardUuidJson), getPicJson(getPicJson), getVideoJson(getVideoJson),
|
backBoardUuidJson(backBoardUuidJson), getPicJson(getPicJson), getVideoJson(getVideoJson),
|
||||||
currentItemIndex(0), isManualSend(false), isSingleSend(false), isClickedSend(false),
|
currentItemIndex(0), isManualSend(false), isSingleSend(false), isClickedSend(false),
|
||||||
isFirstDataReceived(true),
|
isFirstDataReceived(true), TOOL_UI(config),
|
||||||
isDataStuck(false), dataProcessingActive(false), isRecvVideoData(true),
|
isDataStuck(false), dataProcessingActive(false), isRecvVideoData(true),
|
||||||
currentFrontBoardIndex(0), currentLicenseIndex(0)
|
currentFrontBoardIndex(0), currentLicenseIndex(0)
|
||||||
{
|
{
|
||||||
|
@ -51,6 +52,11 @@ SerialPortHandler::~SerialPortHandler()
|
||||||
delete portDetectionTimer;
|
delete portDetectionTimer;
|
||||||
portDetectionTimer = nullptr;
|
portDetectionTimer = nullptr;
|
||||||
}
|
}
|
||||||
|
if (sendHeartBeatTimer) {
|
||||||
|
sendHeartBeatTimer->stop();
|
||||||
|
delete sendHeartBeatTimer;
|
||||||
|
sendHeartBeatTimer = nullptr;
|
||||||
|
}
|
||||||
if (worker) {
|
if (worker) {
|
||||||
worker->stop();
|
worker->stop();
|
||||||
worker->wait(); // 确保线程已停止
|
worker->wait(); // 确保线程已停止
|
||||||
|
@ -60,6 +66,7 @@ SerialPortHandler::~SerialPortHandler()
|
||||||
if (serialPort->isOpen()) {
|
if (serialPort->isOpen()) {
|
||||||
serialPort->close();
|
serialPort->close();
|
||||||
}
|
}
|
||||||
|
qDebug() << "SerialPortHandler 被销毁,所有定时器已停止";
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerialPortHandler::initializeSerialPort()
|
void SerialPortHandler::initializeSerialPort()
|
||||||
|
@ -71,27 +78,40 @@ void SerialPortHandler::initializeSerialPort()
|
||||||
|
|
||||||
void SerialPortHandler::initializeTimers()
|
void SerialPortHandler::initializeTimers()
|
||||||
{
|
{
|
||||||
|
qDebug() << "---- SerialPortHandler::initializeTimers()";
|
||||||
// 确保定时器在当前线程中创建
|
// 确保定时器在当前线程中创建
|
||||||
serialTimer = new QTimer(this);
|
serialTimer = new QTimer(this);
|
||||||
serialTimer->setSingleShot(true);
|
serialTimer->setSingleShot(true);
|
||||||
//serialTimer->moveToThread(this->thread());
|
//serialTimer->moveToThread(this->thread());
|
||||||
connect(serialTimer, &QTimer::timeout, this, &SerialPortHandler::onTimeout);
|
connect(serialTimer, &QTimer::timeout, this, &SerialPortHandler::onTimeout);
|
||||||
|
|
||||||
portDetectionTimer = new QTimer();
|
portDetectionTimer = new QTimer(this);
|
||||||
//portDetectionTimer->moveToThread(this->thread());
|
//portDetectionTimer->moveToThread(this->thread());
|
||||||
connect(portDetectionTimer, &QTimer::timeout, this, &SerialPortHandler::updateAvailablePorts);
|
connect(portDetectionTimer, &QTimer::timeout, this, &SerialPortHandler::updateAvailablePorts);
|
||||||
QMetaObject::invokeMethod(portDetectionTimer, "start", Qt::QueuedConnection, Q_ARG(int, 2000));
|
QMetaObject::invokeMethod(portDetectionTimer, "start", Qt::QueuedConnection, Q_ARG(int, 2000));
|
||||||
qDebug() << "Current thread in initializeTimers:" << QThread::currentThread();
|
|
||||||
qDebug() << "SerialPortHandler thread:" << this->thread();
|
sendHeartBeatTimer = new QTimer(this);
|
||||||
qDebug() << "serialTimer thread:" << serialTimer->thread();
|
//portDetectionTimer->moveToThread(this->thread());
|
||||||
qDebug() << "portDetectionTimer thread:" << portDetectionTimer->thread();
|
connect(sendHeartBeatTimer, &QTimer::timeout, this, &SerialPortHandler::updateSendHeartBeat);
|
||||||
|
QMetaObject::invokeMethod(sendHeartBeatTimer, "start", Qt::QueuedConnection, Q_ARG(int, 1400));
|
||||||
|
//qDebug() << "Current thread in initializeTimers:" << QThread::currentThread();
|
||||||
|
//qDebug() << "SerialPortHandler thread:" << this->thread();
|
||||||
|
//qDebug() << "serialTimer thread:" << serialTimer->thread();
|
||||||
|
//qDebug() << "portDetectionTimer thread:" << portDetectionTimer->thread();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SerialPortHandler::updateSendHeartBeat() {
|
||||||
|
QByteArray payload;
|
||||||
|
payload.append(static_cast<char>(0x00)); // 构造发送的数据内容
|
||||||
|
bool heartBeat = true;
|
||||||
|
onSendHeartBeatData(payload, heartBeat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerialPortHandler::OnStartTimeout(int timeout)
|
void SerialPortHandler::OnStartTimeout(int timeout)
|
||||||
{
|
{
|
||||||
qDebug() << "---------------> onStartTimeout timeout :" << timeout;
|
qDebug() << "---------------> onStartTimeout timeout :" << timeout;
|
||||||
qDebug() << "Current thread:" << QThread::currentThread();
|
//qDebug() << "Current thread:" << QThread::currentThread();
|
||||||
qDebug() << "serialTimer thread:" << serialTimer->thread();
|
//qDebug() << "serialTimer thread:" << serialTimer->thread();
|
||||||
// 确保在正确线程中启动或停止定时器
|
// 确保在正确线程中启动或停止定时器
|
||||||
if (timeout > 0) {
|
if (timeout > 0) {
|
||||||
qDebug() << QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss.zzz");
|
qDebug() << QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss.zzz");
|
||||||
|
@ -124,18 +144,34 @@ void SerialPortHandler::onSendHeartBeatData(const QByteArray& data, bool heartBe
|
||||||
stream << quint16(0x0138); // 回复心跳
|
stream << quint16(0x0138); // 回复心跳
|
||||||
stream << quint32(data.size()); // 数据长度
|
stream << quint32(data.size()); // 数据长度
|
||||||
prefix.append(data); // 将实际数据追加到前缀后
|
prefix.append(data); // 将实际数据追加到前缀后
|
||||||
|
|
||||||
qDebug() << "Send heartBeat data:----->" << prefix.toHex();
|
|
||||||
if (serialPort->isOpen()) {
|
if (serialPort->isOpen()) {
|
||||||
|
qDebug() << "Send heartBeat data:----->" << prefix.toHex();
|
||||||
serialPort->write(prefix);
|
serialPort->write(prefix);
|
||||||
serialPort->flush(); // 确保数据立即发送
|
serialPort->flush(); // 确保数据立即发送
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qDebug() << "Serial port is not open!";
|
qDebug() << "Serial port is not open!";
|
||||||
}
|
}
|
||||||
|
qDebug() << "当前时间:" << QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss.zzz");
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerialPortHandler::sendData(const QByteArray& data, bool heartBeat) {
|
void readBmpFile_1(const QString& filePath) {
|
||||||
|
QFile file(filePath);
|
||||||
|
if (file.open(QIODevice::ReadOnly)) {
|
||||||
|
BMPHeader header;
|
||||||
|
file.read(reinterpret_cast<char*>(&header), sizeof(header));
|
||||||
|
|
||||||
|
// 确保是 BMP 文件
|
||||||
|
if (header.bfType[0] == 'B' && header.bfType[1] == 'M') {
|
||||||
|
qDebug() << "Width :" << header.biWidth;
|
||||||
|
qDebug() << "Height :" << header.biHeight;
|
||||||
|
qDebug() << "Bit Count:" << header.biBitCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !UPDATE_LOGO
|
||||||
|
void SerialPortHandler::sendData(QByteArray data, bool heartBeat, const QByteArray& bmpData) {
|
||||||
QByteArray prefix;
|
QByteArray prefix;
|
||||||
QDataStream stream(&prefix, QIODevice::WriteOnly);
|
QDataStream stream(&prefix, QIODevice::WriteOnly);
|
||||||
stream.setByteOrder(QDataStream::LittleEndian);
|
stream.setByteOrder(QDataStream::LittleEndian);
|
||||||
|
@ -148,10 +184,75 @@ void SerialPortHandler::sendData(const QByteArray& data, bool heartBeat) {
|
||||||
else {
|
else {
|
||||||
stream << quint16(0x0420); // 回复产测指令
|
stream << quint16(0x0420); // 回复产测指令
|
||||||
}
|
}
|
||||||
stream << quint32(data.size()); // 数据长度
|
|
||||||
prefix.append(data); // 将实际数据追加到前缀后
|
// 读取 BMP 文件数据
|
||||||
qDebug() << "heartBeat:----->" << heartBeat;
|
//QByteArray bmpData;
|
||||||
qDebug() << "Send data:----->" << prefix.toHex();
|
QString bmpFilePath = "./logo.bmp";
|
||||||
|
#if 0
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(data);
|
||||||
|
if (!jsonDoc.isObject()) {
|
||||||
|
qWarning() << "Invalid JSON format in data.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
if (jsonObj.contains("cmd") && jsonObj["cmd"].toString() == "UPDATE_LOGO") {
|
||||||
|
qDebug() << "cmd is UPDATE_LOGO";
|
||||||
|
QMetaObject::invokeMethod(qApp, [&]() {
|
||||||
|
bmpFilePath = QFileDialog::getOpenFileName(nullptr, "选择 BMP 图片", "", "BMP Files (*.bmp);;All Files (*)");
|
||||||
|
}, Qt::QueuedConnection); // 让它异步执行
|
||||||
|
|
||||||
|
if (bmpFilePath.isEmpty()) {
|
||||||
|
qDebug() << "No image selected.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
readBmpFile_1(bmpFilePath);
|
||||||
|
if (!bmpFilePath.isEmpty()) {
|
||||||
|
QFile file(bmpFilePath);
|
||||||
|
if (file.open(QIODevice::ReadOnly)) {
|
||||||
|
bmpData = file.readAll();
|
||||||
|
file.close();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
qWarning() << "无法打开 BMP 文件:" << bmpFilePath;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// **解析 JSON 并修改字段**
|
||||||
|
jsonObj["offset"] = bmpData.size();
|
||||||
|
quint32 crc32Value = crc32(0, bmpData.constData(), bmpData.size());
|
||||||
|
qDebug() << "----- crc32 :" << crc32Value;
|
||||||
|
qDebug() << "----- offset:" << bmpData.size();
|
||||||
|
jsonObj["crc32"] = static_cast<int>(crc32Value);
|
||||||
|
|
||||||
|
// 重新转换为 QByteArray
|
||||||
|
data = QJsonDocument(jsonObj).toJson(QJsonDocument::Compact);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
qDebug() << "cmd is not UPDATE_LOGO";
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// 计算总数据长度(修改后的 JSON 数据 + BMP 数据)
|
||||||
|
quint32 totalSize = data.size() + bmpData.size();
|
||||||
|
//quint32 totalSize = data.size();
|
||||||
|
stream << totalSize; // 发送数据总长度
|
||||||
|
|
||||||
|
// 追加数据部分
|
||||||
|
prefix.append(data);
|
||||||
|
if (!bmpData.isEmpty()) {
|
||||||
|
prefix.append(bmpData);
|
||||||
|
qDebug() << "Send data:-----> 图片数据";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
qDebug() << "bmpData.isEmpty()----->";
|
||||||
|
qDebug() << "Send data:----->" << prefix.toHex();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
qDebug() << "Current working directory:" << QDir::currentPath();
|
||||||
|
// 发送数据
|
||||||
|
qDebug() << "heartBeat:----->" << heartBeat;
|
||||||
if (serialPort->isOpen()) {
|
if (serialPort->isOpen()) {
|
||||||
serialPort->write(prefix);
|
serialPort->write(prefix);
|
||||||
serialPort->flush(); // 确保数据立即发送
|
serialPort->flush(); // 确保数据立即发送
|
||||||
|
@ -160,6 +261,104 @@ void SerialPortHandler::sendData(const QByteArray& data, bool heartBeat) {
|
||||||
qDebug() << "Serial port is not open!";
|
qDebug() << "Serial port is not open!";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
void SerialPortHandler::sendData(QByteArray data, bool heartBeat) {
|
||||||
|
QByteArray prefix;
|
||||||
|
QDataStream stream(&prefix, QIODevice::WriteOnly);
|
||||||
|
stream.setByteOrder(QDataStream::LittleEndian);
|
||||||
|
|
||||||
|
// 构造前缀
|
||||||
|
stream << quint32(0x55AA55AA);
|
||||||
|
if (heartBeat) {
|
||||||
|
stream << quint16(0x0138); // 回复心跳
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
stream << quint16(0x0420); // 回复产测指令
|
||||||
|
}
|
||||||
|
|
||||||
|
// 读取 BMP 文件数据
|
||||||
|
QByteArray bmpData;
|
||||||
|
QString bmpFilePath = "./logo.bmp";
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(data);
|
||||||
|
if (!jsonDoc.isObject()) {
|
||||||
|
qWarning() << "Invalid JSON format in data.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
if (jsonObj.contains("cmd") && jsonObj["cmd"].toString() == "UPDATE_LOGO") {
|
||||||
|
qDebug() << "cmd is UPDATE_LOGO";
|
||||||
|
lastData = data; // 先存储 JSON 数据
|
||||||
|
// **发射信号,主线程会弹出文件选择框**
|
||||||
|
emit selectBmpFile();
|
||||||
|
return; // **这里 return,让子线程等待文件选择完成后再继续**
|
||||||
|
}
|
||||||
|
|
||||||
|
// **继续发送数据**
|
||||||
|
sendFinalData(data, heartBeat, bmpData);
|
||||||
|
}
|
||||||
|
|
||||||
|
// **槽函数,在文件选择后被调用**
|
||||||
|
void SerialPortHandler::onBmpFileSelected(QString path) {
|
||||||
|
if (path.isEmpty()) {
|
||||||
|
qDebug() << "No image selected.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QByteArray bmpData;
|
||||||
|
QFile file(path);
|
||||||
|
if (file.open(QIODevice::ReadOnly)) {
|
||||||
|
bmpData = file.readAll();
|
||||||
|
file.close();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
qWarning() << "无法打开 BMP 文件:" << path;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// **解析 JSON 并修改字段**
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(lastData);
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
jsonObj["offset"] = bmpData.size();
|
||||||
|
|
||||||
|
quint32 crc32Value = crc32(0xffffffff, bmpData.constData(), bmpData.size());
|
||||||
|
jsonObj["crc32"] = static_cast<int>(crc32Value);
|
||||||
|
|
||||||
|
lastData = QJsonDocument(jsonObj).toJson(QJsonDocument::Compact);
|
||||||
|
|
||||||
|
// **继续发送数据**
|
||||||
|
sendFinalData(lastData, false, bmpData);
|
||||||
|
}
|
||||||
|
|
||||||
|
// **最终发送数据**
|
||||||
|
void SerialPortHandler::sendFinalData(QByteArray data, bool heartBeat, QByteArray bmpData) {
|
||||||
|
QByteArray prefix;
|
||||||
|
QDataStream stream(&prefix, QIODevice::WriteOnly);
|
||||||
|
stream.setByteOrder(QDataStream::LittleEndian);
|
||||||
|
// 构造前缀
|
||||||
|
stream << quint32(0x55AA55AA);
|
||||||
|
if (heartBeat) {
|
||||||
|
stream << quint16(0x0138); // 回复心跳
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
stream << quint16(0x0420); // 回复产测指令
|
||||||
|
}
|
||||||
|
quint32 totalSize = data.size() + bmpData.size();
|
||||||
|
stream << totalSize;
|
||||||
|
prefix.append(data);
|
||||||
|
prefix.append(bmpData);
|
||||||
|
|
||||||
|
if (serialPort->isOpen()) {
|
||||||
|
serialPort->write(prefix);
|
||||||
|
serialPort->flush();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
qDebug() << "Serial port is not open!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void SerialPortHandler::handleSerialData(const QByteArray& data) {
|
void SerialPortHandler::handleSerialData(const QByteArray& data) {
|
||||||
//qDebug() << "------------------------ Received data:" << data;
|
//qDebug() << "------------------------ Received data:" << data;
|
||||||
|
@ -228,6 +427,8 @@ int SerialPortHandler::connectPort() {
|
||||||
if (selectedPort.isEmpty()) {
|
if (selectedPort.isEmpty()) {
|
||||||
return ret; // 如果没有选择串口,直接返回
|
return ret; // 如果没有选择串口,直接返回
|
||||||
}
|
}
|
||||||
|
QMetaObject::invokeMethod(portDetectionTimer, "start", Qt::QueuedConnection, Q_ARG(int, 2000));
|
||||||
|
QMetaObject::invokeMethod(sendHeartBeatTimer, "start", Qt::QueuedConnection, Q_ARG(int, 1400));
|
||||||
serialPort->setPortName(selectedPort);
|
serialPort->setPortName(selectedPort);
|
||||||
if (serialPort->open(QIODevice::ReadWrite)) {
|
if (serialPort->open(QIODevice::ReadWrite)) {
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
@ -257,7 +458,11 @@ void SerialPortHandler::disconnectPort() {
|
||||||
if (serialPort->isOpen()) {
|
if (serialPort->isOpen()) {
|
||||||
serialPort->close();
|
serialPort->close();
|
||||||
}
|
}
|
||||||
connectButton->setText("连接");
|
resetCurrentItemIndex();
|
||||||
|
//QMetaObject::invokeMethod(portDetectionTimer, "stop", Qt::QueuedConnection);
|
||||||
|
QMetaObject::invokeMethod(sendHeartBeatTimer, "stop", Qt::QueuedConnection);
|
||||||
|
//connectButton->setText("连接前板");
|
||||||
|
connectButton->setText(TOOL_UI.CONNECT_FRONT_BOARD);
|
||||||
comPortComboBox->setEnabled(true);
|
comPortComboBox->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,18 +485,21 @@ void SerialPortHandler::resetCurrentItemIndex()
|
||||||
currentItemIndex = 0;
|
currentItemIndex = 0;
|
||||||
currentFuncItemIndex = 0;
|
currentFuncItemIndex = 0;
|
||||||
itemsProcessedCount = 0;
|
itemsProcessedCount = 0;
|
||||||
|
dataProcessingActive = false;
|
||||||
|
isRecvVideoData = true;
|
||||||
|
isPowerOnSend = false;
|
||||||
|
isClickedSend = false;
|
||||||
|
isSingleSend = false;
|
||||||
|
isRecvImgData = false;
|
||||||
//OnStartTimeout(0);
|
//OnStartTimeout(0);
|
||||||
emit startTimeout(0);
|
emit startTimeout(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerialPortHandler::onPicRecvFinished()
|
void SerialPortHandler::onPicRecvFinished()
|
||||||
{
|
{
|
||||||
/*if (currentJson != getPicJson && currentJson != frontBoardTest) {
|
#if CONNECT_COM_TO_VERIFY
|
||||||
currentItemIndex++;
|
//toggleConnection();
|
||||||
itemsProcessedCount++;
|
#endif
|
||||||
qDebug() << "------> onPicRecvFinished :" << __FUNCTION__;
|
|
||||||
sendNextItem(currentJson);
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerialPortHandler::onCommandError() {
|
void SerialPortHandler::onCommandError() {
|
||||||
|
@ -326,7 +534,7 @@ QString SerialPortHandler::getCurrentFuncItemLable() const
|
||||||
return lable; // 返回当前项的 "data" 字段
|
return lable; // 返回当前项的 "data" 字段
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerialPortHandler::sendJsonItem(const QJsonArray& jsonArray, int itemIndex, const QString text, const QString backBoardSn, const QString& itemType)
|
void SerialPortHandler::sendJsonItem(const QJsonArray& jsonArray, int itemIndex, const QString text, const QString backBoardSn, const QString& itemType, const QByteArray& bmpData)
|
||||||
{
|
{
|
||||||
//startReadVideoDataTimer(preVideoClientId);
|
//startReadVideoDataTimer(preVideoClientId);
|
||||||
currentJson = jsonArray;
|
currentJson = jsonArray;
|
||||||
|
@ -428,12 +636,32 @@ void SerialPortHandler::sendJsonItem(const QJsonArray& jsonArray, int itemIndex,
|
||||||
currentItem["SN"] = backBoardSn;
|
currentItem["SN"] = backBoardSn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (currentItem.contains("offset") && currentItem.contains("crc32")) {
|
||||||
|
qDebug() << "sendJsonItem contains(offset)";
|
||||||
|
QJsonValue originalOffset = currentItem["offset"];
|
||||||
|
QJsonValue originalCrc32 = currentItem["crc32"];
|
||||||
|
if (originalOffset.isDouble()) {
|
||||||
|
currentItem["offset"] = bmpData.size();
|
||||||
|
qDebug() << "offset:" << bmpData.size();
|
||||||
|
}
|
||||||
|
else if (originalOffset.isString()) {
|
||||||
|
qDebug() << "请将 offset 字段改为整型";
|
||||||
|
}
|
||||||
|
if (originalCrc32.isDouble()) {
|
||||||
|
quint32 crc32Value = crc32(0, bmpData.constData(), bmpData.size());
|
||||||
|
currentItem["crc32"] = static_cast<int>(crc32Value);
|
||||||
|
qDebug() << "crc32:" << static_cast<int>(crc32Value);
|
||||||
|
}
|
||||||
|
else if (originalCrc32.isString()) {
|
||||||
|
qDebug() << "请将 crc32 字段改为整型";
|
||||||
|
}
|
||||||
|
}
|
||||||
QString itemData = QJsonDocument(currentItem).toJson();
|
QString itemData = QJsonDocument(currentItem).toJson();
|
||||||
emit currentSendItem(currentItem["cmd"].toString());
|
emit currentSendItem(currentItem["cmd"].toString());
|
||||||
isTimeout = false;
|
isTimeout = false;
|
||||||
emit updateTimeout(isTimeout);
|
emit updateTimeout(isTimeout);
|
||||||
// 发送 JSON
|
// 发送 JSON
|
||||||
sendData(itemData.toUtf8(), 0);
|
sendData(itemData.toUtf8(), 0, bmpData);
|
||||||
if (currentItem.contains("timeout")) {
|
if (currentItem.contains("timeout")) {
|
||||||
qDebug() << "sendJsonItem currentItem.contains(\"timeout\")";
|
qDebug() << "sendJsonItem currentItem.contains(\"timeout\")";
|
||||||
int timeout = currentItem.value("timeout").toInt();
|
int timeout = currentItem.value("timeout").toInt();
|
||||||
|
@ -448,13 +676,13 @@ void SerialPortHandler::sendJsonItem(const QJsonArray& jsonArray, int itemIndex,
|
||||||
// 发送获取设备信息按键
|
// 发送获取设备信息按键
|
||||||
void SerialPortHandler::sendGetDevInfoItem(int itemIndex)
|
void SerialPortHandler::sendGetDevInfoItem(int itemIndex)
|
||||||
{
|
{
|
||||||
sendJsonItem(getDevInfoJson, itemIndex, "", "", "devInfo");
|
sendJsonItem(getDevInfoJson, itemIndex, "", "", "devInfo", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发送取图按键
|
// 发送取图按键
|
||||||
void SerialPortHandler::sendGetPicItem(int itemIndex, int GetPicCamIndex)
|
void SerialPortHandler::sendGetPicItem(int itemIndex, int GetPicCamIndex)
|
||||||
{
|
{
|
||||||
sendJsonItem(getPicJson, itemIndex, QString::number(GetPicCamIndex), "", "getPic");
|
sendJsonItem(getPicJson, itemIndex, QString::number(GetPicCamIndex), "", "getPic", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发送拉视频按键
|
// 发送拉视频按键
|
||||||
|
@ -464,7 +692,7 @@ void SerialPortHandler::sendGetVideoItem(int itemIndex, int GetVideoCamIndex)
|
||||||
isRecvVideoData = true;
|
isRecvVideoData = true;
|
||||||
isStartVideo = true;
|
isStartVideo = true;
|
||||||
qDebug() << " isRecvVideoData:" << isRecvVideoData;
|
qDebug() << " isRecvVideoData:" << isRecvVideoData;
|
||||||
sendJsonItem(getVideoJson, itemIndex, QString::number(GetVideoCamIndex), "", "handleVideo");
|
sendJsonItem(getVideoJson, itemIndex, QString::number(GetVideoCamIndex), "", "handleVideo", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发送License处理按键
|
// 发送License处理按键
|
||||||
|
@ -479,11 +707,11 @@ void SerialPortHandler::sendLicenseItem(int itemIndex, const QString text)
|
||||||
qDebug() << "Invalid itemIndex";
|
qDebug() << "Invalid itemIndex";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sendJsonItem(frontBoardLicenseJson, itemIndex, text, "", "License");
|
sendJsonItem(frontBoardLicenseJson, itemIndex, text, "", "License", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerialPortHandler::sendFrontFuncItem(int itemIndex, const QString text)
|
void SerialPortHandler::sendFrontFuncItem(int itemIndex, const QString text, const QByteArray& bmpData)
|
||||||
{
|
{
|
||||||
if (isBackBoardOrAllBoard != 0) {
|
if (isBackBoardOrAllBoard != 0) {
|
||||||
emit HandleInvalidOperate("当前连接的是后板或整机,请勿操作前板页面的按键!!!");
|
emit HandleInvalidOperate("当前连接的是后板或整机,请勿操作前板页面的按键!!!");
|
||||||
|
@ -491,8 +719,8 @@ void SerialPortHandler::sendFrontFuncItem(int itemIndex, const QString text)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//qDebug() << "sendFuncItem Text:" << text;
|
qDebug() << "sendFuncItem Text:" << text;
|
||||||
sendJsonItem(frontBoardFuncConfig, itemIndex, text, "", "func");
|
sendJsonItem(frontBoardFuncConfig, itemIndex, text, "", "func", bmpData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -502,7 +730,7 @@ void SerialPortHandler::sendFrontFuncItem(int itemIndex, const QString text)
|
||||||
// emit DelUserDialogResultReceived(input); // 通知事件循环退出
|
// emit DelUserDialogResultReceived(input); // 通知事件循环退出
|
||||||
//}
|
//}
|
||||||
|
|
||||||
void SerialPortHandler::sendFrontItem(int itemIndex)
|
void SerialPortHandler::sendFrontItem(int itemIndex, const QByteArray& bmpData)
|
||||||
{
|
{
|
||||||
/*if (isBackBoardOrAllBoard != 0) {
|
/*if (isBackBoardOrAllBoard != 0) {
|
||||||
emit HandleInvalidOperate("当前连接的是后板或整机,请勿操作前板页面的按键!!!");
|
emit HandleInvalidOperate("当前连接的是后板或整机,请勿操作前板页面的按键!!!");
|
||||||
|
@ -527,6 +755,7 @@ void SerialPortHandler::sendFrontItem(int itemIndex)
|
||||||
text = downloadUrl;
|
text = downloadUrl;
|
||||||
}
|
}
|
||||||
else if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "DEL_USER") {
|
else if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "DEL_USER") {
|
||||||
|
qDebug() << "------1---------DEL_USER----------------";
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
QString userInput = "";
|
QString userInput = "";
|
||||||
DelUserWindow dialog;
|
DelUserWindow dialog;
|
||||||
|
@ -539,6 +768,7 @@ void SerialPortHandler::sendFrontItem(int itemIndex)
|
||||||
else {
|
else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
qDebug() << "------2---------DEL_USER----------------";
|
||||||
}
|
}
|
||||||
else if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "PASSWD_ENROLL") {
|
else if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "PASSWD_ENROLL") {
|
||||||
PasswordEnrollWindow dialog;
|
PasswordEnrollWindow dialog;
|
||||||
|
@ -549,7 +779,8 @@ void SerialPortHandler::sendFrontItem(int itemIndex)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sendJsonItem(frontBoardTest, itemIndex, text, "", "test");
|
qDebug() << "---------------sendJsonItem----------------";
|
||||||
|
sendJsonItem(frontBoardTest, itemIndex, text, "", "test", bmpData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -564,7 +795,7 @@ void SerialPortHandler::sendDevInfoJsonItem(const QJsonObject& jsonItem, int ite
|
||||||
QString itemData = QJsonDocument(jsonItem).toJson();
|
QString itemData = QJsonDocument(jsonItem).toJson();
|
||||||
//emit sendData(itemData.toUtf8());
|
//emit sendData(itemData.toUtf8());
|
||||||
// 发送 JSON
|
// 发送 JSON
|
||||||
sendData(itemData.toUtf8(), 0);
|
sendData(itemData.toUtf8(), 0, "");
|
||||||
if (jsonItem.contains("timeout")) {
|
if (jsonItem.contains("timeout")) {
|
||||||
int timeout = jsonItem.value("timeout").toInt();
|
int timeout = jsonItem.value("timeout").toInt();
|
||||||
if (timeout > 0) {
|
if (timeout > 0) {
|
||||||
|
@ -579,11 +810,6 @@ void SerialPortHandler::sendDevInfoJsonItem(const QJsonObject& jsonItem, int ite
|
||||||
|
|
||||||
void SerialPortHandler::sendDevInfoItem()
|
void SerialPortHandler::sendDevInfoItem()
|
||||||
{
|
{
|
||||||
qDebug() << "----------- currentFrontBoardIndex:" << currentFrontBoardIndex;
|
|
||||||
qDebug() << "----------- currentFrontBoardIndex:" << currentFrontBoardIndex;
|
|
||||||
qDebug() << "----------- currentFrontBoardIndex:" << currentFrontBoardIndex;
|
|
||||||
qDebug() << "----------- currentFrontBoardIndex:" << currentFrontBoardIndex;
|
|
||||||
qDebug() << "----------- currentFrontBoardIndex:" << currentFrontBoardIndex;
|
|
||||||
currentJson = frontBoardDevInfoJson;
|
currentJson = frontBoardDevInfoJson;
|
||||||
currentJsonItem = currentFrontBoardIndex;
|
currentJsonItem = currentFrontBoardIndex;
|
||||||
if (currentFrontBoardIndex < frontBoardDevInfoJson.size()) {
|
if (currentFrontBoardIndex < frontBoardDevInfoJson.size()) {
|
||||||
|
@ -593,6 +819,26 @@ void SerialPortHandler::sendDevInfoItem()
|
||||||
isPowerOnSend = false;
|
isPowerOnSend = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SerialPortHandler::onUserInputReceived(const QString& userInput) {
|
||||||
|
if (!userInput.isEmpty() && currentItem.contains("val")) {
|
||||||
|
currentItem["val"] = userInput;
|
||||||
|
QString itemData = QJsonDocument(currentItem).toJson();
|
||||||
|
isTimeout = false;
|
||||||
|
emit updateTimeout(isTimeout);
|
||||||
|
sendData(itemData.toUtf8(), 0, "");
|
||||||
|
if (currentItem.contains("timeout")) {
|
||||||
|
int timeout = currentItem.value("timeout").toInt();
|
||||||
|
if (timeout > 0) {
|
||||||
|
//OnStartTimeout(timeout);
|
||||||
|
emit startTimeout(timeout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// 如果没有 timeout 字段,则不设置超时处理,一直等待数据接收
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SerialPortHandler::sendNextItem(QJsonArray& currentOneClickedItem)
|
void SerialPortHandler::sendNextItem(QJsonArray& currentOneClickedItem)
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&mutex);
|
QMutexLocker locker(&mutex);
|
||||||
|
@ -607,36 +853,47 @@ void SerialPortHandler::sendNextItem(QJsonArray& currentOneClickedItem)
|
||||||
QString itemData = QJsonDocument(currentItem).toJson();
|
QString itemData = QJsonDocument(currentItem).toJson();
|
||||||
//qDebug() << "Sending item index:" << currentItemIndex << "data:" << itemData;
|
//qDebug() << "Sending item index:" << currentItemIndex << "data:" << itemData;
|
||||||
if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "DEL_USER") {
|
if (currentItem.contains("cmd") && currentItem["cmd"].toString() == "DEL_USER") {
|
||||||
QString userInput;
|
DelUserWindow dialog;
|
||||||
// 使用 QMetaObject::invokeMethod 将窗口操作移到主线程
|
if (dialog.exec() == QDialog::Accepted) {
|
||||||
QMetaObject::invokeMethod(QApplication::instance(), [&userInput]() {
|
QString userInput = dialog.getUserInput();
|
||||||
DelUserWindow dialog;
|
if (!userInput.isEmpty() && currentItem.contains("val")) {
|
||||||
if (dialog.exec() == QDialog::Accepted) {
|
currentItem["val"] = userInput;
|
||||||
userInput = dialog.getUserInput();
|
itemData = QJsonDocument(currentItem).toJson();
|
||||||
|
isTimeout = false;
|
||||||
|
emit updateTimeout(isTimeout);
|
||||||
|
// 发送 JSON
|
||||||
|
sendData(itemData.toUtf8(), 0, "");
|
||||||
|
if (currentItem.contains("timeout")) {
|
||||||
|
int timeout = currentItem.value("timeout").toInt();
|
||||||
|
if (timeout > 0) {
|
||||||
|
//OnStartTimeout(timeout);
|
||||||
|
emit startTimeout(timeout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// 如果没有 timeout 字段,则不设置超时处理,一直等待数据接收
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, Qt::BlockingQueuedConnection); // 阻塞子线程,直到窗口操作完成
|
|
||||||
|
|
||||||
if (!userInput.isEmpty() && currentItem.contains("val")) {
|
|
||||||
currentItem["val"] = userInput;
|
|
||||||
itemData = QJsonDocument(currentItem).toJson();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return; // 用户取消或输入无效,直接返回
|
return;
|
||||||
}
|
|
||||||
}
|
|
||||||
isTimeout = false;
|
|
||||||
emit updateTimeout(isTimeout);
|
|
||||||
// 发送 JSON
|
|
||||||
sendData(itemData.toUtf8(), 0);
|
|
||||||
if (currentItem.contains("timeout")) {
|
|
||||||
int timeout = currentItem.value("timeout").toInt();
|
|
||||||
if (timeout > 0) {
|
|
||||||
//OnStartTimeout(timeout);
|
|
||||||
emit startTimeout(timeout);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// 如果没有 timeout 字段,则不设置超时处理,一直等待数据接收
|
isTimeout = false;
|
||||||
|
emit updateTimeout(isTimeout);
|
||||||
|
// 发送 JSON
|
||||||
|
sendData(itemData.toUtf8(), 0, "");
|
||||||
|
if (currentItem.contains("timeout")) {
|
||||||
|
int timeout = currentItem.value("timeout").toInt();
|
||||||
|
if (timeout > 0) {
|
||||||
|
//OnStartTimeout(timeout);
|
||||||
|
emit startTimeout(timeout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// 如果没有 timeout 字段,则不设置超时处理,一直等待数据接收
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isManualSend) {
|
else if (isManualSend) {
|
||||||
|
@ -651,22 +908,9 @@ void SerialPortHandler::sendNextItem(QJsonArray& currentOneClickedItem)
|
||||||
|
|
||||||
void SerialPortHandler::onRecvNormalDataFlag(bool flag)
|
void SerialPortHandler::onRecvNormalDataFlag(bool flag)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!(protocolDataFlag = flag)) {
|
if (!(protocolDataFlag = flag)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/*if (isPowerOnSend && protocolDataFlag) {
|
|
||||||
if (currentFrontBoardIndex < frontBoardDevInfoJson.size()) {
|
|
||||||
qDebug() << "-----" << QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss.zzz");
|
|
||||||
sendDevInfoItem();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
qDebug() << "All items processed in onDataReceived.";
|
|
||||||
emit allItemsProcessed(isBackBoardOrAllBoard, "", currentFrontBoardIndex);
|
|
||||||
isPowerOnSend = false;
|
|
||||||
}
|
|
||||||
protocolDataFlag = false;
|
|
||||||
}*/
|
|
||||||
QJsonObject currentTempItem = currentJson[currentItemIndex].toObject();
|
QJsonObject currentTempItem = currentJson[currentItemIndex].toObject();
|
||||||
if (!isSingleSend && !isPowerOnSend && (currentTempItem["cmd"] != "GET_IMG")) {
|
if (!isSingleSend && !isPowerOnSend && (currentTempItem["cmd"] != "GET_IMG")) {
|
||||||
qDebug() << "------------------- onRecvNormalDataFlag ";
|
qDebug() << "------------------- onRecvNormalDataFlag ";
|
||||||
|
@ -681,7 +925,7 @@ void SerialPortHandler::onRecvNormalDataFlag(bool flag)
|
||||||
}
|
}
|
||||||
else if (isPowerOnSend) {
|
else if (isPowerOnSend) {
|
||||||
if (currentFrontBoardIndex < frontBoardDevInfoJson.size()) {
|
if (currentFrontBoardIndex < frontBoardDevInfoJson.size()) {
|
||||||
qDebug() << "-----" << QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss.zzz");
|
qDebug() << "--2---" << QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss.zzz");
|
||||||
sendDevInfoItem();
|
sendDevInfoItem();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -689,6 +933,9 @@ void SerialPortHandler::onRecvNormalDataFlag(bool flag)
|
||||||
emit allItemsProcessed(isBackBoardOrAllBoard, "", currentFrontBoardIndex);
|
emit allItemsProcessed(isBackBoardOrAllBoard, "", currentFrontBoardIndex);
|
||||||
currentFrontBoardIndex = 0;
|
currentFrontBoardIndex = 0;
|
||||||
isPowerOnSend = false;
|
isPowerOnSend = false;
|
||||||
|
#if CONNECT_COM_TO_VERIFY
|
||||||
|
//sendFrontItem(3, "");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isClickedSend && (currentItemIndex < currentJson.size())) {
|
else if (isClickedSend && (currentItemIndex < currentJson.size())) {
|
||||||
|
@ -711,7 +958,8 @@ void SerialPortHandler::onDataReceived()
|
||||||
qDebug() << "isPowerOnSend:" << isPowerOnSend;
|
qDebug() << "isPowerOnSend:" << isPowerOnSend;
|
||||||
qDebug() << "isClickedSend:" << isClickedSend;
|
qDebug() << "isClickedSend:" << isClickedSend;
|
||||||
qDebug() << "isSingleSend:" << isSingleSend;
|
qDebug() << "isSingleSend:" << isSingleSend;
|
||||||
qDebug() << "isRecvImgData:" << isRecvImgData;
|
qDebug() << "isRecvImgData:" << isRecvImgData;
|
||||||
|
qDebug() << "dataProcessingActive:" << dataProcessingActive;
|
||||||
#if 1
|
#if 1
|
||||||
if (!isRecvVideoData &&
|
if (!isRecvVideoData &&
|
||||||
(isRecvImgData || isPowerOnSend || isClickedSend || (isSingleSend && (currentItemIndex < currentJson.size())))) {
|
(isRecvImgData || isPowerOnSend || isClickedSend || (isSingleSend && (currentItemIndex < currentJson.size())))) {
|
||||||
|
@ -742,41 +990,8 @@ void SerialPortHandler::onDataReceived()
|
||||||
QJsonObject currentTempItem = currentJson[currentItemIndex].toObject();
|
QJsonObject currentTempItem = currentJson[currentItemIndex].toObject();
|
||||||
//qDebug() << "---Received allData size:" << allData.size();
|
//qDebug() << "---Received allData size:" << allData.size();
|
||||||
if (!allData.isEmpty()) {
|
if (!allData.isEmpty()) {
|
||||||
emit dataReceived("", allData, 0xFF, currentItemIndex, currentFuncItemIndex, getCurrentItemLable(), "", currentJson, currentJsonItem, isTimeout);
|
emit dataReceived("", allData, 0xFF, currentItemIndex, currentFuncItemIndex, getCurrentItemLable(), "", currentJson, currentJsonItem, isTimeout);
|
||||||
/*if (!isSingleSend && !isPowerOnSend && (currentTempItem["cmd"] != "GET_IMG")) {
|
|
||||||
currentItemIndex ++;
|
|
||||||
itemsProcessedCount ++;
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
/*if (isSingleSend) {
|
|
||||||
if (currentTempItem["cmd"] != "GET_IMG") {
|
|
||||||
isSingleSend = false;
|
|
||||||
}
|
|
||||||
isClickedSend = false;
|
|
||||||
}
|
|
||||||
else if (isPowerOnSend && protocolDataFlag) {
|
|
||||||
if (currentFrontBoardIndex < frontBoardDevInfoJson.size()) {
|
|
||||||
qDebug() << "-----" << QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss.zzz");
|
|
||||||
sendDevInfoItem();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
qDebug() << "All items processed in onDataReceived.";
|
|
||||||
emit allItemsProcessed(isBackBoardOrAllBoard, "", currentFrontBoardIndex);
|
|
||||||
isPowerOnSend = false;
|
|
||||||
}
|
|
||||||
protocolDataFlag = false;
|
|
||||||
}
|
|
||||||
else if (isClickedSend && (currentItemIndex < currentJson.size())) {
|
|
||||||
// 判断是否是取图或者其他会接收很多数据的指令
|
|
||||||
if (currentTempItem["cmd"] != "GET_IMG") {
|
|
||||||
sendNextItem(currentJson);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (isClickedSend) {
|
|
||||||
emit allItemsProcessed(isBackBoardOrAllBoard, "", itemsProcessedCount);
|
|
||||||
isClickedSend = false;
|
|
||||||
//resetCurrentItemIndex();
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
else if (isRecvVideoData && (!dataProcessingActive)) {
|
else if (isRecvVideoData && (!dataProcessingActive)) {
|
||||||
dataProcessingActive = true;
|
dataProcessingActive = true;
|
||||||
|
@ -885,6 +1100,9 @@ void SerialPortHandler::onTimeout()
|
||||||
emit allItemsProcessed(isBackBoardOrAllBoard, "", currentFrontBoardIndex);
|
emit allItemsProcessed(isBackBoardOrAllBoard, "", currentFrontBoardIndex);
|
||||||
currentFrontBoardIndex = 0;
|
currentFrontBoardIndex = 0;
|
||||||
isPowerOnSend = false;
|
isPowerOnSend = false;
|
||||||
|
#if CONNECT_COM_TO_VERIFY
|
||||||
|
//sendFrontItem(3, "");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,10 +13,14 @@
|
||||||
#include <QEventLoop>
|
#include <QEventLoop>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
|
//#include <QFile>
|
||||||
|
//#include <QDataStream>
|
||||||
|
|
||||||
#include "SerialPortWorker.h"
|
#include "SerialPortWorker.h"
|
||||||
#include "../../Network/DelUserWindows.h"
|
#include "../../Network/DelUserWindows.h"
|
||||||
#include "../../Network/ImageEnrollWindow.h"
|
#include "../../Network/ImageEnrollWindow.h"
|
||||||
#include "../../Network/PasswordEnrollWindow.h"
|
#include "../../Network/PasswordEnrollWindow.h"
|
||||||
|
#include "../UI_Widget/UI_Name.h"
|
||||||
|
|
||||||
#define TEST_TCP_MOVE_TO_MAIN 0
|
#define TEST_TCP_MOVE_TO_MAIN 0
|
||||||
#define GET_PIC_DATA_SIZE (480 * 640 * 1.5)
|
#define GET_PIC_DATA_SIZE (480 * 640 * 1.5)
|
||||||
|
@ -25,11 +29,14 @@
|
||||||
#define CHANGE_THEME_W 720
|
#define CHANGE_THEME_W 720
|
||||||
#define CHANGE_THEME_H 1280
|
#define CHANGE_THEME_H 1280
|
||||||
|
|
||||||
|
#define UPDATE_LOGO 0
|
||||||
|
#define CONNECT_COM_TO_VERIFY 1
|
||||||
|
|
||||||
class SerialPortHandler : public QObject {
|
class SerialPortHandler : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SerialPortHandler(QComboBox* comPortComboBox, QPushButton* connectButton,
|
explicit SerialPortHandler(const UI_config& config, QComboBox* comPortComboBox, QPushButton* connectButton,
|
||||||
QJsonArray frontBoardOneClickTest, QJsonArray frontBoardTest, QJsonArray frontBoardFuncConfig,
|
QJsonArray frontBoardOneClickTest, QJsonArray frontBoardTest, QJsonArray frontBoardFuncConfig,
|
||||||
QJsonArray frontBoardDevInfoJson, QJsonArray frontBoardLicenseJson,
|
QJsonArray frontBoardDevInfoJson, QJsonArray frontBoardLicenseJson,
|
||||||
QJsonArray backBoardOneClickTest, QJsonArray backBoardTest, QJsonArray backBoardFuncConfig, QJsonArray backBoardDevInfoJson,
|
QJsonArray backBoardOneClickTest, QJsonArray backBoardTest, QJsonArray backBoardFuncConfig, QJsonArray backBoardDevInfoJson,
|
||||||
|
@ -37,13 +44,15 @@ public:
|
||||||
QObject* parent = nullptr);
|
QObject* parent = nullptr);
|
||||||
~SerialPortHandler();
|
~SerialPortHandler();
|
||||||
|
|
||||||
void sendData(const QByteArray& data, bool heartBeat);
|
//void sendData(const QByteArray& data, bool heartBeat);
|
||||||
|
void sendData(QByteArray data, bool heartBeat, const QByteArray& bmpData);
|
||||||
|
void sendFinalData(QByteArray data, bool heartBeat, QByteArray bmpData);
|
||||||
void onPicRecvFinished();
|
void onPicRecvFinished();
|
||||||
void onCommandError();
|
void onCommandError();
|
||||||
|
|
||||||
void sendDevInfoItem();
|
void sendDevInfoItem();
|
||||||
|
|
||||||
void sendJsonItem(const QJsonArray& jsonArray, int itemIndex, const QString text, const QString backBoardSn, const QString& itemType);
|
void sendJsonItem(const QJsonArray& jsonArray, int itemIndex, const QString text, const QString backBoardSn, const QString& itemType, const QByteArray& bmpData);
|
||||||
// 发送获取设备信息按键
|
// 发送获取设备信息按键
|
||||||
void sendGetDevInfoItem(int itemIndex);
|
void sendGetDevInfoItem(int itemIndex);
|
||||||
// 发送取图按键
|
// 发送取图按键
|
||||||
|
@ -53,9 +62,9 @@ public:
|
||||||
// 发送License处理按键
|
// 发送License处理按键
|
||||||
void sendLicenseItem(int itemIndex, const QString text);
|
void sendLicenseItem(int itemIndex, const QString text);
|
||||||
// 发送下一个功能配置 JSON 项目
|
// 发送下一个功能配置 JSON 项目
|
||||||
void sendFrontFuncItem(int itemIndex, QString text);
|
void sendFrontFuncItem(int itemIndex, QString text, const QByteArray& bmpData);
|
||||||
// 处理发送单独指令
|
// 处理发送单独指令
|
||||||
void sendFrontItem(int itemIndex);
|
void sendFrontItem(int itemIndex, const QByteArray& bmpData);
|
||||||
// 发送下一个 JSON 项目
|
// 发送下一个 JSON 项目
|
||||||
void sendNextItem(QJsonArray& currentOneClickedItem);
|
void sendNextItem(QJsonArray& currentOneClickedItem);
|
||||||
// 获取json文件中当前发送的 data 字段项
|
// 获取json文件中当前发送的 data 字段项
|
||||||
|
@ -72,6 +81,9 @@ public:
|
||||||
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
void onUserInputReceived(const QString& userInput);
|
||||||
|
void updateSendHeartBeat();
|
||||||
|
//void userInputEntered(const QString&); // 主线程返回用户输入
|
||||||
void handleSerialError(QSerialPort::SerialPortError error);
|
void handleSerialError(QSerialPort::SerialPortError error);
|
||||||
void updateAvailablePorts();
|
void updateAvailablePorts();
|
||||||
void toggleConnection();
|
void toggleConnection();
|
||||||
|
@ -90,9 +102,17 @@ public slots:
|
||||||
void initializeTimers();
|
void initializeTimers();
|
||||||
|
|
||||||
void onRecvNormalDataFlag(bool flag);
|
void onRecvNormalDataFlag(bool flag);
|
||||||
|
|
||||||
//void onDelUserDialogResult(const QString& input);
|
//void onDelUserDialogResult(const QString& input);
|
||||||
|
#if UPDATE_LOGO
|
||||||
|
void onBmpFileSelected(QString path); // 处理文件路径
|
||||||
|
#endif
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void requestUserInput(); // 请求主线程打开对话框
|
||||||
|
void userInputReceived(QString userInput);
|
||||||
|
void selectBmpFile(); // 请求选择 BMP 文件
|
||||||
|
void bmpFileSelected(QString path); // 选中文件后返回路径
|
||||||
void serialDataReceived(const QByteArray& data);
|
void serialDataReceived(const QByteArray& data);
|
||||||
void serialComPortConnected();
|
void serialComPortConnected();
|
||||||
void serialComPortDisconnected();
|
void serialComPortDisconnected();
|
||||||
|
@ -160,10 +180,12 @@ private:
|
||||||
QPushButton* connectButton;
|
QPushButton* connectButton;
|
||||||
QSerialPort* serialPort;
|
QSerialPort* serialPort;
|
||||||
QTimer* portDetectionTimer;
|
QTimer* portDetectionTimer;
|
||||||
|
QTimer* sendHeartBeatTimer;
|
||||||
QTimer* serialTimer;
|
QTimer* serialTimer;
|
||||||
QStringList comPortList; // 当前已检测到的串口列表
|
QStringList comPortList; // 当前已检测到的串口列表
|
||||||
SerialPortWorker* worker;
|
SerialPortWorker* worker;
|
||||||
|
UI_config TOOL_UI;
|
||||||
|
QByteArray lastData; // 存储 JSON 数据,等待 BMP 文件选择完成后继续处理
|
||||||
|
|
||||||
void sendDevInfoJsonItem(const QJsonObject& jsonItem, int itemIndex);
|
void sendDevInfoJsonItem(const QJsonObject& jsonItem, int itemIndex);
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,113 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
static const unsigned int crc_table[256] = {
|
||||||
|
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
|
||||||
|
0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
|
||||||
|
0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
|
||||||
|
0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
|
||||||
|
0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
|
||||||
|
0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
|
||||||
|
0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
|
||||||
|
0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
|
||||||
|
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
|
||||||
|
0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
|
||||||
|
0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
|
||||||
|
0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
|
||||||
|
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
|
||||||
|
0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
|
||||||
|
0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
|
||||||
|
0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
|
||||||
|
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
|
||||||
|
0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
|
||||||
|
0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
|
||||||
|
0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
|
||||||
|
0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
|
||||||
|
0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
|
||||||
|
0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
|
||||||
|
0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
|
||||||
|
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
|
||||||
|
0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
|
||||||
|
0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
|
||||||
|
0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
|
||||||
|
0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
|
||||||
|
0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
|
||||||
|
0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
|
||||||
|
0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
|
||||||
|
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
|
||||||
|
0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
|
||||||
|
0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
|
||||||
|
0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
|
||||||
|
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
|
||||||
|
0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
|
||||||
|
0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
|
||||||
|
0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
|
||||||
|
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
|
||||||
|
0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
|
||||||
|
0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
|
||||||
|
0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
|
||||||
|
0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
|
||||||
|
0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
|
||||||
|
0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
|
||||||
|
0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
|
||||||
|
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
|
||||||
|
0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
|
||||||
|
0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
|
||||||
|
0x2d02ef8d
|
||||||
|
};
|
||||||
|
|
||||||
|
#define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
|
||||||
|
#define DO2(buf) do {DO1(buf); DO1(buf); } while (0)
|
||||||
|
#define DO4(buf) do {DO2(buf); DO2(buf); } while (0)
|
||||||
|
#define DO8(buf) do {DO4(buf); DO4(buf); } while (0)
|
||||||
|
|
||||||
|
unsigned int crc32(unsigned int crc, const void * b, size_t len)
|
||||||
|
{
|
||||||
|
if (len == 0)
|
||||||
|
return crc;
|
||||||
|
const unsigned char * buf = (const unsigned char *)b;
|
||||||
|
crc = crc ^ 0xffffffff;
|
||||||
|
while (len >= 8) {
|
||||||
|
DO8(buf);
|
||||||
|
len -= 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (len) {
|
||||||
|
do {
|
||||||
|
DO1(buf);
|
||||||
|
} while (--len);
|
||||||
|
}
|
||||||
|
return crc ^ 0xffffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
void crc32init(unsigned int *crc)
|
||||||
|
{
|
||||||
|
*crc = 0;
|
||||||
|
(*crc) = (*crc) ^ 0xffffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
void crc32update(unsigned int *crc, const void * b, size_t len)
|
||||||
|
{
|
||||||
|
const unsigned char * buf = (const unsigned char *)b;
|
||||||
|
do {
|
||||||
|
*crc = crc_table[((int)(*crc) ^ (*buf++)) & 0xff] ^ ((*crc) >> 8);
|
||||||
|
} while (--len);
|
||||||
|
}
|
||||||
|
void crc32final(unsigned int *crc)
|
||||||
|
{
|
||||||
|
*crc = (*crc) ^ 0xffffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int crcsimple(const void *buf, size_t len){
|
||||||
|
unsigned int CRC = 0;
|
||||||
|
unsigned int POLYNOMIAL = 0x0100a001;
|
||||||
|
size_t i;
|
||||||
|
size_t sli = 1;
|
||||||
|
if (len > 100){
|
||||||
|
sli = len /100;
|
||||||
|
}
|
||||||
|
char *p = (char*)buf;
|
||||||
|
for (i = 0; i < len; i+= sli) {
|
||||||
|
CRC ^= p[i] & 0x000000ff;
|
||||||
|
}
|
||||||
|
return CRC ;
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
#ifndef _crc32_h_
|
||||||
|
#define _crc32_h_
|
||||||
|
|
||||||
|
#pragma pack(push, 1)
|
||||||
|
struct BMPHeader {
|
||||||
|
char bfType[2];
|
||||||
|
uint32_t bfSize;
|
||||||
|
uint16_t bfReserved1;
|
||||||
|
uint16_t bfReserved2;
|
||||||
|
uint32_t bfOffBits;
|
||||||
|
uint32_t biSize;
|
||||||
|
int32_t biWidth;
|
||||||
|
int32_t biHeight;
|
||||||
|
uint16_t biPlanes;
|
||||||
|
uint16_t biBitCount;
|
||||||
|
uint32_t biCompression;
|
||||||
|
uint32_t biSizeImage;
|
||||||
|
int32_t biXPelsPerMeter;
|
||||||
|
int32_t biYPelsPerMeter;
|
||||||
|
uint32_t biClrUsed;
|
||||||
|
uint32_t biClrImportant;
|
||||||
|
};
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
unsigned int crc32(unsigned int crc, const void *buf, size_t len);
|
||||||
|
void crc32init(unsigned int *crc);
|
||||||
|
void crc32update(unsigned int *crc, const void * b, size_t len);
|
||||||
|
void crc32final(unsigned int *crc);
|
||||||
|
unsigned int crcsimple(const void *buf, size_t len);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -9,39 +9,62 @@
|
||||||
struct UI_config {
|
struct UI_config {
|
||||||
int SL100_FACTORY_TOOL_W;
|
int SL100_FACTORY_TOOL_W;
|
||||||
int SL100_FACTORY_TOOL_H;
|
int SL100_FACTORY_TOOL_H;
|
||||||
|
int LOG_LEVEL;
|
||||||
|
|
||||||
QString TOOL_VERSION; // "SL100 工厂产测工具 - V0.0.7"
|
QString TOOL_VERSION; // "SL100 工厂产测工具 - V0.0.7"
|
||||||
QString START_LISTENING; // "开始监听\n(Start Listening...)"
|
QString START_LISTENING; // "开始监听\n(Start Listening...)"
|
||||||
QString ONE_CLICKED_TEST; // "一键功能测试"
|
QString ONE_CLICKED_TEST; // "一键功能测试"
|
||||||
QString FRONT_BOARD_NAME; // "前 板"
|
QString SELECT_MDSN_IP; // "Select MDns IP:"
|
||||||
QString BACK_BOARD_NAME; // "后 板"
|
QString SELECT_COM_PORT; // "COM Port:"
|
||||||
QString ALL_BOARD_NAME; // "整 机"
|
QString CONNECT_FRONT_BOARD; // "连接前板"
|
||||||
QString FRONT_DEVICE_INFO; // "前板设备信息"
|
QString SAVE_LOG; // "Save"
|
||||||
QString BACK_DEVICE_INFO; // "后板设备信息"
|
QString CLEAR_LOG; // "Clear"
|
||||||
QString ALL_PRODUCT_INFO; // "工厂生产信息"
|
QString FRONT_BOARD_NAME; // "前 板"
|
||||||
QString ALL_DEVICE_INFO; // "整机设备信息"
|
QString BACK_BOARD_NAME; // "后 板"
|
||||||
QString FRONT_TUYU_LICENSE; // "算法 license"
|
QString ALL_BOARD_NAME; // "整 机"
|
||||||
QString BACK_GET_UUID_SN; // "后板获取 UUID/SN"
|
QString FRONT_DEVICE_INFO; // "前板设备信息"
|
||||||
QString FRONT_TEST_ITEM; // "前板测试项"
|
QString FRONT_GET_HW_INFO; // "前板获取硬件信息"
|
||||||
QString FRONT_CONFID_ITEM; // "前板配置项"
|
QString FRONT_GET_LICENSE_INFO; // "前板获取license信息"
|
||||||
QString INPUT_CONFIG_PARA; // "请输入配置参数..."
|
QString FRONT_WR_LICENSE_INFO; // "前板写license信息"
|
||||||
QString BACK_TEST_ITEM; // "后板测试项"
|
QString BACK_DEVICE_INFO; // "后板设备信息"
|
||||||
QString BACK_CONFID_ITEM; // "后板配置项"
|
QString BACK_GET_MAC_ADDR; // "后板获取MAC地址"
|
||||||
QString IMAGE_DISPLAY_TAB; // "图像显示区"
|
QString BACK_GET_UUIDSN; // "后板获取UUID和SN"
|
||||||
QString VIDEO_DISPLAY_TAB; // "视频显示区"
|
QString BACK_WR_UUID_SN; // "后板写入UUID和SN"
|
||||||
QString ALL_TEST_ITEM; // "整机测试项"
|
QString BACK_CONFIRM_BURN; // "后板确认烧录"
|
||||||
QString ALL_CONFID_ITEM; // "整机配置项"
|
QString ALL_PRODUCT_INFO; // "工厂生产信息"
|
||||||
QString LEFT_LENS; // "左边镜头"
|
QString ALL_DEVICE_INFO; // "整机设备信息"
|
||||||
QString RIGHT_LENS; // "右边镜头"
|
QString FRONT_TUYU_LICENSE; // "算法 license"
|
||||||
QString CAT_EYE_LENS_RGB; // "猫眼镜头(RGB)"
|
QString BACK_GET_UUID_SN; // "后板获取 UUID/SN"
|
||||||
QString CAT_EYE_LENS_IR; // "猫眼镜头(IR)"
|
QString FRONT_TEST_ITEM; // "前板测试项"
|
||||||
QString BIG_WINDOW_PRE_VIDEO; // "大窗口播放视频"
|
int FRONT_TEST_ITEM_CNT; // 前板测试项按键数量
|
||||||
QString RESOLUTION_EDIT; // "分辨率:"
|
QString FRONT_CONFID_ITEM; // "前板配置项"
|
||||||
|
int FRONT_CONFID_ITEM_CNT; // 前板配置项按键数量
|
||||||
|
QString INPUT_CONFIG_PARA; // "请输入配置参数..."
|
||||||
|
QString BACK_TEST_ITEM; // "后板测试项"
|
||||||
|
int BACK_TEST_ITEM_CNT; // 后板测试项按键数量
|
||||||
|
QString BACK_CONFID_ITEM; // "后板配置项"
|
||||||
|
int BACK_CONFID_ITEM_CNT; // 后板配置项按键数量
|
||||||
|
QString IMAGE_DISPLAY_TAB; // "图像显示区"
|
||||||
|
QString VIDEO_DISPLAY_TAB; // "视频显示区"
|
||||||
|
QString ALL_TEST_ITEM; // "整机测试项"
|
||||||
|
QString ALL_CONFID_ITEM; // "整机配置项"
|
||||||
|
QString LEFT_LENS; // "左边镜头"
|
||||||
|
QString RIGHT_LENS; // "右边镜头"
|
||||||
|
QString CAT_EYE_LENS_RGB; // "猫眼镜头(RGB)"
|
||||||
|
QString CAT_EYE_LENS_IR; // "猫眼镜头(IR)"
|
||||||
|
QString BIG_WINDOW_PRE_VIDEO; // "大窗口播放视频"
|
||||||
|
QString RESOLUTION_EDIT; // "分辨率:"
|
||||||
|
QString NO_DEV_CONNECT; // "No device is connected !!!"
|
||||||
|
QString PLEASE_SELECT_IMG_LENS; // "Please select \"左边镜头\" or \"右边镜头\" to get image!!!"
|
||||||
|
QString PLEASE_SELECT_VID_LENS; // "Please select lens to get video!!!"
|
||||||
|
QString THIS_DEV_DISCONNECT; // "This device is not connected !!!"
|
||||||
|
QString MDNS_HOSE_NAME; // "SL100-FactoryTool-Mdns"
|
||||||
|
QString MDNS_SERVICE_NAME; // "_myservice._tcp.local."
|
||||||
|
quint16 TCP_CONNECT_PORT; // 12412
|
||||||
};
|
};
|
||||||
|
|
||||||
QMap<QString, QString> parseIniFile(const QString& filePath);
|
QMap<QString, QString> parseIniFile(const QString& filePath);
|
||||||
UI_config loadConfig(const QString& filePath);
|
UI_config loadUIConfig(const QString& filePath);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,42 +37,67 @@ QMap<QString, QString> parseIniFile(const QString& filePath)
|
||||||
return configMap;
|
return configMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
UI_config loadConfig(const QString& filePath)
|
UI_config loadUIConfig(const QString& filePath)
|
||||||
{
|
{
|
||||||
UI_config config;
|
UI_config config;
|
||||||
QMap<QString, QString> settings = parseIniFile(filePath);
|
QMap<QString, QString> settings = parseIniFile(filePath);
|
||||||
// 可直接修改 UI_config.ini 文件
|
// 可直接修改 UI_config.ini 文件
|
||||||
// 如果删除 UI_config.ini 文件中的 Labels 项,则使用如下代码中的默认命名配置
|
// 如果删除 UI_config.ini 文件中的 Labels 项,则使用如下代码中的默认命名配置
|
||||||
// Labels 项 默认命名配置
|
// Labels 项 默认命名配置
|
||||||
config.SL100_FACTORY_TOOL_W = settings.value("Window/width", "1340").toInt();
|
config.SL100_FACTORY_TOOL_W = settings.value("Window/width", "1340").toInt();
|
||||||
config.SL100_FACTORY_TOOL_H = settings.value("Window/height", "900").toInt();
|
config.SL100_FACTORY_TOOL_H = settings.value("Window/height", "900").toInt();
|
||||||
config.TOOL_VERSION = settings.value("Labels/tool_version", "SL100 工厂产测工具 - V0.0.16");
|
config.LOG_LEVEL = settings.value("LogLevel/log_level", "2").toInt();
|
||||||
config.START_LISTENING = settings.value("Labels/start_listening", "开始监听\n(Start Listening...)");
|
config.TOOL_VERSION = settings.value("Labels/tool_version", "SL100 工厂产测工具 - V0.0.18");
|
||||||
config.ONE_CLICKED_TEST = settings.value("Labels/one_clicked_test", "一键功能测试");
|
config.START_LISTENING = settings.value("Labels/start_listening", "开始监听\n(Start Listening...)");
|
||||||
config.FRONT_BOARD_NAME = settings.value("Labels/front_board_name", "前 板");
|
config.ONE_CLICKED_TEST = settings.value("Labels/one_clicked_test", "一键功能测试");
|
||||||
config.BACK_BOARD_NAME = settings.value("Labels/back_board_name", "后 板");
|
config.SELECT_MDSN_IP = settings.value("Labels/select_mdns_ip", "Select MDns IP:");
|
||||||
config.ALL_BOARD_NAME = settings.value("Labels/all_board_name", "整 机");
|
config.SELECT_COM_PORT = settings.value("Labels/select_com_port", "COM Port:");
|
||||||
config.FRONT_DEVICE_INFO = settings.value("Labels/front_device_info", "前板设备信息");
|
config.CONNECT_FRONT_BOARD = settings.value("Labels/connect_front_board", "连接前板");
|
||||||
config.BACK_DEVICE_INFO = settings.value("Labels/back_device_info", "后板设备信息");
|
config.SAVE_LOG = settings.value("Labels/save_log", "Save");
|
||||||
config.ALL_PRODUCT_INFO = settings.value("Labels/all_product_info", "工厂生产信息");
|
config.CLEAR_LOG = settings.value("Labels/clear_log", "Clear");
|
||||||
config.ALL_DEVICE_INFO = settings.value("Labels/all_device_info", "整机设备信息");
|
config.FRONT_BOARD_NAME = settings.value("Labels/front_board_name", "前 板");
|
||||||
config.FRONT_TUYU_LICENSE = settings.value("Labels/front_TUYU_license", "图语算法 License");
|
config.BACK_BOARD_NAME = settings.value("Labels/back_board_name", "后 板");
|
||||||
config.BACK_GET_UUID_SN = settings.value("Labels/back_get_uuid_sn", "后板获取 UUID/SN");
|
config.ALL_BOARD_NAME = settings.value("Labels/all_board_name", "整 机");
|
||||||
config.FRONT_TEST_ITEM = settings.value("Labels/front_test_item", "前板测试项");
|
config.FRONT_DEVICE_INFO = settings.value("Labels/front_device_info", "前板设备信息");
|
||||||
config.FRONT_CONFID_ITEM = settings.value("Labels/front_config_item", "前板配置项");
|
config.FRONT_GET_HW_INFO = settings.value("Labels/front_get_hw_info", "get_hw_info");
|
||||||
config.INPUT_CONFIG_PARA = settings.value("Labels/input_config_para", "请输入配置参数...");
|
config.FRONT_GET_LICENSE_INFO = settings.value("Labels/front_get_license_info", "get_license");
|
||||||
config.BACK_TEST_ITEM = settings.value("Labels/back_test_item", "后板测试项");
|
config.FRONT_WR_LICENSE_INFO = settings.value("Labels/front_wr_license_info", "write_license");
|
||||||
config.BACK_CONFID_ITEM = settings.value("Labels/back_config_item", "后板配置项");
|
config.BACK_DEVICE_INFO = settings.value("Labels/back_device_info", "后板设备信息");
|
||||||
config.IMAGE_DISPLAY_TAB = settings.value("Labels/image_display_tab", "图像显示区");
|
config.BACK_GET_MAC_ADDR = settings.value("Labels/back_get_MAC_addr", "get_MAC_addr");
|
||||||
config.VIDEO_DISPLAY_TAB = settings.value("Labels/video_display_tab", "视频显示区");
|
config.BACK_GET_UUIDSN = settings.value("Labels/back_get_UUID_SN", "get_UUID_SN");
|
||||||
config.ALL_TEST_ITEM = settings.value("Labels/all_test_item", "整机测试项");
|
config.BACK_WR_UUID_SN = settings.value("Labels/write_UUID_SN", "write_UUID_SN");
|
||||||
config.ALL_CONFID_ITEM = settings.value("Labels/all_config_item", "整机配置项");
|
config.BACK_CONFIRM_BURN = settings.value("Labels/Confirm_burn", "Confirm_burn");
|
||||||
config.LEFT_LENS = settings.value("Labels/left_lens", "左边镜头");
|
config.ALL_PRODUCT_INFO = settings.value("Labels/all_product_info", "工厂生产信息");
|
||||||
config.RIGHT_LENS = settings.value("Labels/right_lens", "右边镜头");
|
config.ALL_DEVICE_INFO = settings.value("Labels/all_device_info", "整机设备信息");
|
||||||
config.CAT_EYE_LENS_RGB = settings.value("Labels/cat_eye_lens_rgb", "猫眼镜头(RGB)");
|
config.FRONT_TUYU_LICENSE = settings.value("Labels/front_TUYU_license", "图语算法 License");
|
||||||
config.CAT_EYE_LENS_IR = settings.value("Labels/cat_eye_lens_ir", "猫眼镜头(IR)");
|
config.BACK_GET_UUID_SN = settings.value("Labels/back_get_uuid_sn", "后板获取 UUID/SN");
|
||||||
config.BIG_WINDOW_PRE_VIDEO = settings.value("Labels/big_window_pre_video", "大窗口播放视频");
|
config.FRONT_TEST_ITEM = settings.value("Labels/front_test_item", "前板测试项");
|
||||||
config.RESOLUTION_EDIT = settings.value("Labels/resolution_edit", "分辨率:");
|
config.FRONT_CONFID_ITEM = settings.value("Labels/front_config_item", "前板配置项");
|
||||||
|
config.FRONT_TEST_ITEM_CNT = settings.value("Labels/front_test_item_cnt", "77").toInt();
|
||||||
|
config.FRONT_CONFID_ITEM_CNT = settings.value("Labels/front_config_item_cnt", "77").toInt();
|
||||||
|
config.INPUT_CONFIG_PARA = settings.value("Labels/input_config_para", "请输入配置参数...");
|
||||||
|
config.BACK_TEST_ITEM = settings.value("Labels/back_test_item", "后板测试项");
|
||||||
|
config.BACK_CONFID_ITEM = settings.value("Labels/back_config_item", "后板配置项");
|
||||||
|
config.BACK_TEST_ITEM_CNT = settings.value("Labels/back_test_item_cnt", "77").toInt();
|
||||||
|
config.BACK_CONFID_ITEM_CNT = settings.value("Labels/back_config_item_cnt", "77").toInt();
|
||||||
|
config.IMAGE_DISPLAY_TAB = settings.value("Labels/image_display_tab", "图像显示区");
|
||||||
|
config.VIDEO_DISPLAY_TAB = settings.value("Labels/video_display_tab", "视频显示区");
|
||||||
|
config.ALL_TEST_ITEM = settings.value("Labels/all_test_item", "整机测试项");
|
||||||
|
config.ALL_CONFID_ITEM = settings.value("Labels/all_config_item", "整机配置项");
|
||||||
|
config.LEFT_LENS = settings.value("Labels/left_lens", "左边镜头");
|
||||||
|
config.RIGHT_LENS = settings.value("Labels/right_lens", "右边镜头");
|
||||||
|
config.CAT_EYE_LENS_RGB = settings.value("Labels/cat_eye_lens_rgb", "猫眼镜头(RGB)");
|
||||||
|
config.CAT_EYE_LENS_IR = settings.value("Labels/cat_eye_lens_ir", "猫眼镜头(IR)");
|
||||||
|
config.BIG_WINDOW_PRE_VIDEO = settings.value("Labels/big_window_pre_video", "大窗口播放视频");
|
||||||
|
config.RESOLUTION_EDIT = settings.value("Labels/resolution_edit", "分辨率:");
|
||||||
|
config.NO_DEV_CONNECT = settings.value("Labels/no_device_connected", "No device is connected !!!");
|
||||||
|
config.THIS_DEV_DISCONNECT = settings.value("Labels/this_device_disconnect", "This device is not connected !!!");
|
||||||
|
config.PLEASE_SELECT_IMG_LENS = settings.value("Labels/please_select_img_lens", "Please select \"左边镜头\" or \"右边镜头\" to get image!!!");
|
||||||
|
config.PLEASE_SELECT_VID_LENS = settings.value("Labels/please_select_vid_lens", "Please select lens to get video!!!");
|
||||||
|
config.MDNS_HOSE_NAME = settings.value("Labels/mdns_host_name", "SL100-FactoryTool-Mdns");
|
||||||
|
config.MDNS_SERVICE_NAME = settings.value("Labels/mdns_service_name", "_myservice._tcp.local.");
|
||||||
|
quint16 port = settings.value("Labels/tcp_connect_port", "12412").toUInt();
|
||||||
|
config.TCP_CONNECT_PORT = (port > 0 && port <= 65535) ? port : 12412; // 防止异常值
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +109,7 @@ QGroupBox* MainWidget::createLicenseGroupBox()
|
||||||
|
|
||||||
for (int i = 0; i < frontBoardLicenseJson.size(); ++i) {
|
for (int i = 0; i < frontBoardLicenseJson.size(); ++i) {
|
||||||
QJsonObject item = frontBoardLicenseJson[i].toObject();
|
QJsonObject item = frontBoardLicenseJson[i].toObject();
|
||||||
QString buttonText = item["lable"].toString();
|
QString buttonText = item["lable"].toString();
|
||||||
QPushButton* button = new QPushButton(buttonText, this);
|
QPushButton* button = new QPushButton(buttonText, this);
|
||||||
button->setProperty("licenseIndex", i);
|
button->setProperty("licenseIndex", i);
|
||||||
buttonRowLayout->addWidget(button);
|
buttonRowLayout->addWidget(button);
|
||||||
|
@ -111,7 +136,7 @@ QGroupBox* MainWidget::createFrontDeviceInfoGroupBox()
|
||||||
for (const QJsonValue& value : frontBoardDevInfoJson) {
|
for (const QJsonValue& value : frontBoardDevInfoJson) {
|
||||||
QJsonObject item = value.toObject();
|
QJsonObject item = value.toObject();
|
||||||
QString label = item["lable"].toString();
|
QString label = item["lable"].toString();
|
||||||
QString cmd = item["cmd"].toString();
|
QString cmd = item["cmd"].toString();
|
||||||
QLabel* itemLabel = new QLabel(label, this);
|
QLabel* itemLabel = new QLabel(label, this);
|
||||||
QLineEdit* itemLineEdit = new QLineEdit(this);
|
QLineEdit* itemLineEdit = new QLineEdit(this);
|
||||||
itemLineEdit->setReadOnly(true);
|
itemLineEdit->setReadOnly(true);
|
||||||
|
@ -143,11 +168,11 @@ QGroupBox* MainWidget::createBackDeviceInfoGroupBox()
|
||||||
QGroupBox* MainWidget::createBackConnectServerGroupBox()
|
QGroupBox* MainWidget::createBackConnectServerGroupBox()
|
||||||
{
|
{
|
||||||
QGroupBox* BackConnectServerGroupBox = new QGroupBox(TOOL_UI.BACK_GET_UUID_SN, this);
|
QGroupBox* BackConnectServerGroupBox = new QGroupBox(TOOL_UI.BACK_GET_UUID_SN, this);
|
||||||
QHBoxLayout* frontDeviceInfoLayout = new QHBoxLayout;
|
QHBoxLayout* frontDeviceInfoLayout = new QHBoxLayout;
|
||||||
|
|
||||||
for (int i = 0; i < backBoardUuidJson.size(); ++i) {
|
for (int i = 0; i < backBoardUuidJson.size(); ++i) {
|
||||||
QJsonObject item = backBoardUuidJson[i].toObject();
|
QJsonObject item = backBoardUuidJson[i].toObject();
|
||||||
QString buttonText = item["lable"].toString();
|
QString buttonText = item["lable"].toString();
|
||||||
QPushButton* button = new QPushButton(buttonText, this);
|
QPushButton* button = new QPushButton(buttonText, this);
|
||||||
button->setProperty("UuidIndex", i);
|
button->setProperty("UuidIndex", i);
|
||||||
frontDeviceInfoLayout->addWidget(button);
|
frontDeviceInfoLayout->addWidget(button);
|
||||||
|
@ -169,12 +194,19 @@ QGroupBox* MainWidget::createBackConnectServerGroupBox()
|
||||||
|
|
||||||
QWidget* MainWidget::createFunctionTestTab(const QJsonArray& BoardFuncTest, const QString& propertyName)
|
QWidget* MainWidget::createFunctionTestTab(const QJsonArray& BoardFuncTest, const QString& propertyName)
|
||||||
{
|
{
|
||||||
QWidget* functionTestTab = new QWidget(this);
|
QWidget* functionTestTab = new QWidget(this);
|
||||||
QVBoxLayout* functionTestLayout = new QVBoxLayout(functionTestTab);
|
QVBoxLayout* functionTestLayout = new QVBoxLayout(functionTestTab);
|
||||||
QGridLayout* buttonGridLayout = new QGridLayout();
|
QGridLayout* buttonGridLayout = new QGridLayout();
|
||||||
int buttonsPerRow = 7;
|
int buttonsPerRow = 7;
|
||||||
|
int buttonCnt = 77;
|
||||||
for (int i = 0; i < BoardFuncTest.size() + (77 - BoardFuncTest.size()); ++i) {
|
if (propertyName == "frontBoardTest") {
|
||||||
|
buttonCnt = TOOL_UI.FRONT_TEST_ITEM_CNT;
|
||||||
|
}
|
||||||
|
else if (propertyName == "backBoardTest") {
|
||||||
|
buttonCnt = TOOL_UI.BACK_TEST_ITEM_CNT;
|
||||||
|
}
|
||||||
|
if (buttonCnt < BoardFuncTest.size()) buttonCnt = BoardFuncTest.size();
|
||||||
|
for (int i = 0; i < BoardFuncTest.size() + (buttonCnt - BoardFuncTest.size()); ++i) {
|
||||||
QJsonObject item = BoardFuncTest[i].toObject();
|
QJsonObject item = BoardFuncTest[i].toObject();
|
||||||
QString buttonText = item["lable"].toString();
|
QString buttonText = item["lable"].toString();
|
||||||
if (buttonText.isEmpty()) {
|
if (buttonText.isEmpty()) {
|
||||||
|
@ -211,20 +243,23 @@ QWidget* MainWidget::createFunctionTestTab(const QJsonArray& BoardFuncTest, cons
|
||||||
|
|
||||||
QWidget* MainWidget::createFunctionConfigTab(const QJsonArray& BoardFuncConfig, const QString& propertyName)
|
QWidget* MainWidget::createFunctionConfigTab(const QJsonArray& BoardFuncConfig, const QString& propertyName)
|
||||||
{
|
{
|
||||||
QWidget* functionConfigTab = new QWidget(this);
|
QWidget* functionConfigTab = new QWidget(this);
|
||||||
QVBoxLayout* functionConfigLayout = new QVBoxLayout(functionConfigTab);
|
QVBoxLayout* functionConfigLayout = new QVBoxLayout(functionConfigTab);
|
||||||
|
int buttonCnt = 77;
|
||||||
if (propertyName == "frontBoardFuncConfig") {
|
if (propertyName == "frontBoardFuncConfig") {
|
||||||
frontFuncConfigLineEdit->setPlaceholderText(TOOL_UI.INPUT_CONFIG_PARA);
|
frontFuncConfigLineEdit->setPlaceholderText(TOOL_UI.INPUT_CONFIG_PARA);
|
||||||
functionConfigLayout->addWidget(frontFuncConfigLineEdit);
|
functionConfigLayout->addWidget(frontFuncConfigLineEdit);
|
||||||
|
buttonCnt = TOOL_UI.FRONT_CONFID_ITEM_CNT;
|
||||||
}
|
}
|
||||||
else if (propertyName == "backBoardFuncConfig") {
|
else if (propertyName == "backBoardFuncConfig") {
|
||||||
backFuncConfigLineEdit->setPlaceholderText(TOOL_UI.INPUT_CONFIG_PARA);
|
backFuncConfigLineEdit->setPlaceholderText(TOOL_UI.INPUT_CONFIG_PARA);
|
||||||
functionConfigLayout->addWidget(backFuncConfigLineEdit);
|
functionConfigLayout->addWidget(backFuncConfigLineEdit);
|
||||||
|
buttonCnt = TOOL_UI.BACK_CONFID_ITEM_CNT;
|
||||||
}
|
}
|
||||||
|
if (buttonCnt < BoardFuncConfig.size()) buttonCnt = BoardFuncConfig.size();
|
||||||
QGridLayout* configButtonGridLayout = new QGridLayout();
|
QGridLayout* configButtonGridLayout = new QGridLayout();
|
||||||
int buttonsPerRow = 7; // 每行显示的按键数量,根据需要调整
|
int buttonsPerRow = 7; // 每行显示的按键数量,根据需要调整
|
||||||
for (int i = 0; i < BoardFuncConfig.size() + (77 - BoardFuncConfig.size()); ++i) {
|
for (int i = 0; i < BoardFuncConfig.size() + (buttonCnt - BoardFuncConfig.size()); ++i) {
|
||||||
QJsonObject item = BoardFuncConfig[i].toObject();
|
QJsonObject item = BoardFuncConfig[i].toObject();
|
||||||
QString buttonText = item["lable"].toString();
|
QString buttonText = item["lable"].toString();
|
||||||
if (buttonText.isEmpty()) {
|
if (buttonText.isEmpty()) {
|
||||||
|
@ -261,7 +296,7 @@ QWidget* MainWidget::createFunctionConfigTab(const QJsonArray& BoardFuncConfig,
|
||||||
|
|
||||||
QWidget* MainWidget::createImageDisplayTab(QLabel* leftLensLabel, QLabel* rightLensLabel)
|
QWidget* MainWidget::createImageDisplayTab(QLabel* leftLensLabel, QLabel* rightLensLabel)
|
||||||
{
|
{
|
||||||
QWidget* imageDisplayTab = new QWidget(this);
|
QWidget* imageDisplayTab = new QWidget(this);
|
||||||
QVBoxLayout* imageDisplayLayout = new QVBoxLayout(imageDisplayTab);
|
QVBoxLayout* imageDisplayLayout = new QVBoxLayout(imageDisplayTab);
|
||||||
|
|
||||||
QVBoxLayout* imageButtonsColumnLayout = new QVBoxLayout;
|
QVBoxLayout* imageButtonsColumnLayout = new QVBoxLayout;
|
||||||
|
@ -555,5 +590,3 @@ QTabWidget* MainWidget::createMediaTabWidget(QLabel* leftLensLabel, QLabel* righ
|
||||||
|
|
||||||
return tabWidget_media;
|
return tabWidget_media;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
device ID: 1 - Item 1: 后板V851版本: ---> NG
|
|
||||||
device ID: 1 - Item 2: 后板806版本: ---> NG
|
|
||||||
device ID: 1 - Item 3: 后板硬件版本: ---> NG
|
|
||||||
device ID:-1 ---> All 3 items test completed !!!
|
|
|
@ -1,4 +0,0 @@
|
||||||
device ID: 1 - Item 1: 后板V851版本: ---> NG
|
|
||||||
device ID: 1 - Item 2: 后板806版本: ---> NG
|
|
||||||
device ID: 1 - Item 3: 后板硬件版本: ---> NG
|
|
||||||
device ID:-1 ---> All 3 items test completed !!!
|
|
|
@ -1,4 +0,0 @@
|
||||||
device ID: 1 - Item 1: 后板V851版本: ---> NG
|
|
||||||
device ID: 1 - Item 2: 后板806版本: ---> NG
|
|
||||||
device ID: 1 - Item 3: 后板硬件版本: ---> NG
|
|
||||||
device ID:-1 ---> All 3 items test completed !!!
|
|
|
@ -1,4 +0,0 @@
|
||||||
device ID: 1 - Item 1: 后板V851版本: ---> NG
|
|
||||||
device ID: 1 - Item 2: 后板806版本: ---> NG
|
|
||||||
device ID: 1 - Item 3: 后板硬件版本: ---> NG
|
|
||||||
device ID:-1 ---> All 3 items test completed !!!
|
|
|
@ -1,4 +0,0 @@
|
||||||
device ID: 1 - Item 1: 后板V851版本: ---> NG
|
|
||||||
device ID: 1 - Item 2: 后板806版本: ---> NG
|
|
||||||
device ID: 1 - Item 3: 后板硬件版本: ---> NG
|
|
||||||
device ID:-1 ---> All 3 items test completed !!!
|
|
|
@ -1,4 +0,0 @@
|
||||||
device ID: 1 - Item 1: 后板V851版本: ---> NG
|
|
||||||
device ID: 1 - Item 2: 后板806版本: ---> NG
|
|
||||||
device ID: 1 - Item 3: 后板硬件版本: ---> NG
|
|
||||||
device ID:-1 ---> All 3 items test completed !!!
|
|
|
@ -1,4 +0,0 @@
|
||||||
device ID: 1 - Item 1: 后板V851版本: ---> NG
|
|
||||||
device ID: 1 - Item 2: 后板806版本: ---> NG
|
|
||||||
device ID: 1 - Item 3: 后板硬件版本: ---> NG
|
|
||||||
device ID:-1 ---> All 3 items test completed !!!
|
|
|
@ -1,4 +0,0 @@
|
||||||
device ID: 1 - Item 1: 后板V851版本: ---> NG
|
|
||||||
device ID: 1 - Item 2: 后板806版本: ---> NG
|
|
||||||
device ID: 1 - Item 3: 后板硬件版本: ---> NG
|
|
||||||
device ID:-1 ---> All 3 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> NG
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> NG
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> NG
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> NG
|
|
||||||
device ID: 1 - Item 5: SN号: ---> NG
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,11 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
||||||
device ID: 1 - Item 22: IR灯开 ---> OK
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID:-1 ---> All 3 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,13 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
||||||
device ID: 1 - Item 23: IR灯关 ---> OK
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 3 items test completed !!!
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 4 items test completed !!!
|
|
|
@ -1,20 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
||||||
device ID: 1 - Item 23: IR灯关 ---> OK
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 3 items test completed !!!
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 4 items test completed !!!
|
|
||||||
device ID: 1 - Item 23: IR灯关 ---> OK
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 8 items test completed !!!
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 9 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,13 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
||||||
device ID: 1 - Item 23: IR灯关 ---> OK
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 10244 items test completed !!!
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 10245 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,14 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
||||||
device ID: 1 - Item 23: IR灯关 ---> OK
|
|
||||||
device ID: 1 - Item 1: get_hw_info ---> OK
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 3 items test completed !!!
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 4 items test completed !!!
|
|
|
@ -1,20 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
||||||
device ID: 1 - Item 23: IR灯关 ---> OK
|
|
||||||
device ID: 1 - Item 1: get_hw_info ---> OK
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 3 items test completed !!!
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 4 items test completed !!!
|
|
||||||
device ID: 1 - Item 1: get_hw_info ---> OK
|
|
||||||
device ID: 1 - Item 22: IR灯开 ---> OK
|
|
||||||
device ID: 1 - Item 23: IR灯关 ---> OK
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,10 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 24: 串口测试 ---> NG
|
|
||||||
device ID: 1 - Item 25: PIR测试 ---> NG
|
|
||||||
device ID:-1 ---> All 4 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
|
@ -1,6 +0,0 @@
|
||||||
device ID: 1 - Item 1: 前板V851版本: ---> OK
|
|
||||||
device ID: 1 - Item 2: 前板MCU版本: ---> OK
|
|
||||||
device ID: 1 - Item 3: 前板硬件版本: ---> OK
|
|
||||||
device ID: 1 - Item 4: 算法版本: ---> OK
|
|
||||||
device ID: 1 - Item 5: SN号: ---> OK
|
|
||||||
device ID:-1 ---> All 5 items test completed !!!
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue