更新部分代码

CigaretteSH
CJ980606 8 months ago
parent 81409c3f2c
commit 7a2fe26b88

@ -10,15 +10,15 @@
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3bD:\Qt\5.15.2\msvc2019_64\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtLastBackgroundBuild>2024-05-14T07:50:55.2278815Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-05-17T01:16:05.2665950Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2024-05-14T07:50:55.3158777Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-05-17T01:16:05.3293859Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtLastBackgroundBuild>2024-05-14T07:50:55.3628774Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-05-17T01:16:05.3832065Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-05-14T07:50:55.4078779Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-05-17T01:16:05.4290511Z</QtLastBackgroundBuild>
</PropertyGroup>
</Project>

Binary file not shown.

@ -56,7 +56,7 @@ bool PLCDevice::init_plc_tcp(PLCDevice* PLCptr)
}
#endif
#ifdef __ModebusClient
PLCptr->g_modbus = modbus_new_tcp("192.168.1.175", 4444);
PLCptr->g_modbus = modbus_new_tcp("192.168.1.176", 4444);
modbus_set_debug(PLCptr->g_modbus, 0); // 用flag设置debug调试标志位flag=1时显示modbus消息的字节
modbus_set_response_timeout(PLCptr->g_modbus, 1, 0); // 设置响应超时
// 侦听主站连接

@ -2,7 +2,7 @@
#include <opencv2/opencv.hpp>
#define NumberOfSupportedCameras 2
#define NumberOfSupportedCameras 3
//双软件
#define NumberOfIdentityCameras 8
#define EdgeEvent 1

@ -37,8 +37,8 @@
#define Queue_Size 15
#define Unit_Queue_Size Queue_Size*3
#define StrobeLineTime 10000
//设备型号
#define EquipmentModel "条盒"
#define EquipmentModel "TH"//设备型号:TH、XH、THXH
#ifdef __DEBUG
#define DEBUG(format, ...) printf (format, ##__VA_ARGS__)
@ -50,8 +50,8 @@
#define DEFAULT_CONFPATH_PATH "D:/conf"
#define DEFAULT_PIC_SAVE_PATH "D:/image"
// 主界面基本参数配置文件
#define CONFPATH "D:/Release/conf_path2.txt"//小盒
//#define CONFPATH "D:/Release/conf_path3.txt"//条盒
//#define CONFPATH "D:/Release/conf_path2.txt"//XH
#define CONFPATH "D:/Release/conf_path3.txt"//TH
// 相机旋转角度配置文件
#define ROTATE_FILE "rotate.txt"
#define MODBUS_CONFIGURE_FILE "modbus.txt"

@ -350,8 +350,8 @@ void ExportDataThread::run()
zipFilePaths.append(g_conf_path.save_pics_path + "/" + "416_BJ_" + zipTimeStamp[0] + "-00_" + zipTimeStamp[0] + "-59_1.zip");
fileList.append(g_conf_path.save_pics_path + "/" + zipTimeStamp[0] + "ng.txt");
fileList.append(g_conf_path.save_pics_path + "/" + zipTimeStamp[0] + "ok.txt");*/
zipFilePaths.append("416_BJ_" + zipTimeStamp[0] + "-00_" + zipTimeStamp[0] + "-59_0.zip");
zipFilePaths.append("416_BJ_" + zipTimeStamp[0] + "-00_" + zipTimeStamp[0] + "-59_1.zip");
zipFilePaths.append("416_TJ_" + zipTimeStamp[0] + "-00_" + zipTimeStamp[0] + "-59_0.zip");
zipFilePaths.append("416_TJ_" + zipTimeStamp[0] + "-00_" + zipTimeStamp[0] + "-59_1.zip");
fileList.append(zipTimeStamp[0] + "ng.txt");
fileList.append(zipTimeStamp[0] + "ok.txt");

@ -27,26 +27,27 @@ int main(int argc, char* argv[])
QPixmap pixmap("D:/Release/splash.jpg");
#endif
#if defined EquipmentModel
//比较设备型号标志文件-----------------------------------------------------------------------------
//比较设备型号文件-----------------------------------------------------------------------------
string ider;
string name = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5/include/thrust/async/flag.txt";//设备型号标志文件
string name = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5/include/thrust/async/flag.txt";//标志文件
std::ifstream file_(name.c_str());
if (file_.good())
{
getline(file_, ider);
file_.close();
}
else
{
ider = "Default";
}
cout << "设备型号:" << ider << endl;
if(ider!= EquipmentModel)
{
QMessageBox::information(NULL, QStringLiteral("系统自检失败"), QStringLiteral("设备型号匹配失败"), QMessageBox::Ok);
exit(0);
}
//比较设备型号标志文件-----------------------------------------------------------------------------
#else
#endif

@ -356,11 +356,11 @@ void SyncWorkThread::run()
}
//条盒TJ 小盒BJ
file_name = g_conf_path.save_pics_path + "/"
+ now_ts.toString("yyyy-MM-dd") + "/"+"416_BJ_01_"
+ now_ts.toString("yyyy-MM-dd") + "/"+"416_TJ_01_"
+ now_ts.toString("yyyy-MM-dd_HH-mm-ss.zzz_") + ng_reason_maps[ngReason] + ".jpg";
g_save_queue->put(std::make_pair(file_name.toLocal8Bit().constData(), merge_image));
#ifdef __TCPSend
QString sendName = "416_BJ_01_" + now_ts.toString("yyyy-MM-dd_HH-mm-ss.zzz");
QString sendName = "416_TJ_01_" + now_ts.toString("yyyy-MM-dd_HH-mm-ss.zzz");
TCPSendInfo.pics_name = sendName.toLocal8Bit().constData();
TCP_Info_queue->put(TCPSendInfo);
#endif

@ -106,7 +106,7 @@ void threadSendTCP::sendData(_TCPSendInfo* TCPSendInfo, int Num) {
#if defined(__ModebusServer) || defined(__ModebusClient)
std::vector<int> asciiVals = stringToAscii(fileName);
//mySocket->write(fileName.c_str());
int temp = num % 2;
/*int temp = num % 2;
if (temp == 1)
{
m_PLCDevice->write_bit_2_plc(10006, 1);
@ -115,7 +115,7 @@ void threadSendTCP::sendData(_TCPSendInfo* TCPSendInfo, int Num) {
else
{
m_PLCDevice->write_bit_2_plc(10006, 0);
}
}*/
//mySocket->write((char*)&temp,sizeof(char));
//mySocket->write("\n");

Loading…
Cancel
Save