diff --git a/230731软件问题汇总.docx b/230731软件问题汇总.docx deleted file mode 100644 index c95ffe9..0000000 Binary files a/230731软件问题汇总.docx and /dev/null differ diff --git a/Cigarette/cigarette.cpp b/Cigarette/cigarette.cpp index 6f6c7ef..18a16f6 100644 --- a/Cigarette/cigarette.cpp +++ b/Cigarette/cigarette.cpp @@ -251,7 +251,6 @@ Cigarette::Cigarette(QWidget *parent) sThread.sendData("ReStartOk", g_sys_conf.FeedbackPort); sThread.sendData("DebugDis", g_sys_conf.FeedbackPort); sThread.sendData("LockOk", g_sys_conf.FeedbackPort); - #endif #ifdef __ExportData @@ -602,7 +601,7 @@ void Cigarette::on_btn_start_released() } } g_op_time = OP_TIME; - ui.checkBox_debug->setEnabled(true); //ʹcheckBox + //ui.checkBox_debug->setEnabled(true); //ʹcheckBox } void Cigarette::pause_work() @@ -872,56 +871,25 @@ void Cigarette::sendLatestData() { for (int i = 0; i < NumberOfSupportedCameras; i++) { UDPSendInfo.index = i; - UDPSendInfo.FrameID = ok_frame; UDPSendInfo.ok[i] = ok[i]; - //sThread.sendData("4_999", dataport + UDPSendInfo.index); - sThread.sendData(("4_" + to_string(ok[i])).c_str(), dataport + UDPSendInfo.index); - //std::cout << "ok[" << i << "] is " << to_string(ok[i]) << std::endl; - //std::cout << ("4_" + to_string(ok[i])).c_str() << std::endl; - //UDP_Info_queue->put(UDPSendInfo); - +#ifdef __UDPSend + //sThread.sendData(("4_" + to_string(ok[i])).c_str(), dataport + UDPSendInfo.index); + UDP_Info_queue->put(UDPSendInfo); +#endif UDPSendInfo.FrameID = ng_frame; UDPSendInfo.ng[i] = ng[i]; - sThread.sendData(("5_" + to_string(ng[i])).c_str(), dataport + UDPSendInfo.index); - +#ifdef __UDPSend + //sThread.sendData(("5_" + to_string(ng[i])).c_str(), dataport + UDPSendInfo.index); + UDP_Info_queue->put(UDPSendInfo); +#endif UDPSendInfo.FrameID = total_frame; UDPSendInfo.Total = production_number[i]; - sThread.sendData(("7_" + to_string(production_number[i])).c_str(), dataport + UDPSendInfo.index); - } - - //while (isLoop) { - //switch (UDPSendInfo.FrameID) { - // case info_frame: { - // sThread.sendData(&UDPSendInfo, dataport); - // break; - // } - // case speed_frame: { - // sThread.sendSpeed(&UDPSendInfo, dataport); - // break; - // } - // case kick_frame: { - // sThread.sendKick(&UDPSendInfo, dataport); - // break; - // } - // case ok_frame: { - // sThread.sendOK(&UDPSendInfo, dataport); - // break; - // } - // case ng_frame: { - // sThread.sendNG(&UDPSendInfo, dataport); - // break; - // } - // case total_frame: { - // sThread.sendTotal(&UDPSendInfo, dataport); - // break; - // } - // case image_frame: { - // //sThread.sendImage(&UDPSendInfo, imageport); - // break; - // } - //} - //} +#ifdef __UDPSend + //sThread.sendData(("7_" + to_string(production_number[i])).c_str(), dataport + UDPSendInfo.index); + UDP_Info_queue->put(UDPSendInfo); +#endif + } } void Cigarette::OnRotateReleasedHub(int Num)//תť @@ -1396,7 +1364,7 @@ void Cigarette::on_checkBox_debug_clicked(bool checked) { QMessageBox::information(NULL, QStringLiteral("˳ "), QStringLiteral("ȵֹͣťܽģʽ"), QMessageBox::Ok); ui.checkBox_debug->setChecked(false); - return; + //return; } else { @@ -1414,7 +1382,7 @@ void Cigarette::on_checkBox_debug_clicked(bool checked) DisableDebugMode(); //on_pushButton_clear_released(); // ui.checkBox_debug->setChecked(false); - ui.checkBox_debug->setEnabled(true); + //ui.checkBox_debug->setEnabled(true); #ifdef __UDPSend sThread.sendData("DebugDis", g_sys_conf.FeedbackPort); #endif diff --git a/Cigarette/debugthread.h b/Cigarette/debugthread.h index f31d2ca..cdf31af 100644 --- a/Cigarette/debugthread.h +++ b/Cigarette/debugthread.h @@ -8,8 +8,12 @@ #include "SyncQueue.h" #include "basecamera.h" #include "common.h" +#include "balluffcamera.h" +#include "hikcamera.h" + extern SyncQueue *g_debug_queue[NumberOfSupportedCameras]; //相机调试模式图像队列 extern DisplayLabelConf g_display_label_conf[NumberOfSupportedCameras]; +extern SingleCamInfoStruct SingleCamInfo[NumberOfSupportedCameras]; extern int rotationAngle[NumberOfSupportedCameras]; //图片旋转角度 extern bool isNeedRotate[NumberOfSupportedCameras]; @@ -53,12 +57,18 @@ protected: if (image.data) { //cv::cvtColor(image, image, CV_BGR2RGB); //灰度图像转为彩色图像 + // 解决进入调试模式海康彩色相机变色,关闭色彩调整巴鲁夫相机变黑的问题 + if (image.channels() == 1) + { + cv::cvtColor(image, image, CV_BGR2RGB); //灰度图像转为彩色图像 + } if (isNeedRotate[local_camera_number]) { if(rotationAngle[local_camera_number] != (cv::ROTATE_90_COUNTERCLOCKWISE + 1)) { cv::rotate(image, image, rotationAngle[local_camera_number]); } } + //sleep(100); emit notify(local_camera_number,0,image); } #ifdef DRAW_RECT