From 1c0ac1c7924efb8a2cb6962d3eda4126533a5ac8 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期一, 14 七月 2025 16:55:55 +0800
Subject: [PATCH] 合并代码(代提交)
---
ENRIT/Grabber/SapLineGrab.cpp | 35 ++++++++++++++++-------------------
1 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/ENRIT/Grabber/SapLineGrab.cpp b/ENRIT/Grabber/SapLineGrab.cpp
index 12c03b4..a918dcb 100644
--- a/ENRIT/Grabber/SapLineGrab.cpp
+++ b/ENRIT/Grabber/SapLineGrab.cpp
@@ -39,16 +39,15 @@
BOOL CSapLineGrab::CreateAcq(char *camFile)
{
- if (SapManager::Open() == FALSE)
- {
- g_pLog->DisplayMessage(_T("Error: SapManager::Open."));
+ if (SapManager::Open() == FALSE) {
+ //g_pLog->DisplayMessage(_T("Error: SapManager::Open."));
return FALSE;
}
// Get actual server count and ensure m_nBoardID is within range
int nCount = SapManager::GetServerCount(SapManager::ResourceAcq);
if (m_nBoardID < 0 || m_nBoardID >= nCount) {
- g_pLog->DisplayMessage(_T("Error: Invalid Board ID. ServerCount=%d, nBoardID=%d"), nCount, m_nBoardID);
+ //g_pLog->DisplayMessage(_T("Error: Invalid Board ID. ServerCount=%d, nBoardID=%d"), nCount, m_nBoardID);
return FALSE;
}
@@ -59,7 +58,7 @@
SapLocation loc(serverName, 0);
nCount = SapManager::GetResourceCount(loc, SapManager::ResourceAcq);
if (nCount < 0) {
- g_pLog->DisplayMessage(_T("Error: Invalid Resource Count. ResourceCount=%d, nBoardID=%d"), nCount, m_nBoardID);
+ //g_pLog->DisplayMessage(_T("Error: Invalid Resource Count. ResourceCount=%d, nBoardID=%d"), nCount, m_nBoardID);
return FALSE;
}
@@ -80,24 +79,24 @@
if (CreateAcq(m_Param.cDCFPath) == FALSE) {
if (pErrorCode) *pErrorCode = INITX64_FAIL_CREATEACQ;
- g_pLog->DisplayMessage(_T("Error: CreateAcq fail."));
+ //g_pLog->DisplayMessage(_T("Error: CreateAcq fail."));
return FALSE;
}
if (CreateBuffer(0) == FALSE) {
if (pErrorCode) *pErrorCode = INITX64_FAIL_CREATEBUFFER;
- g_pLog->DisplayMessage(_T("Error: CreateBuffer fail."));
+ //g_pLog->DisplayMessage(_T("Error: CreateBuffer fail."));
return FALSE;
}
if (ActivateObjects() == FALSE) {
if (pErrorCode) *pErrorCode = INITX64_FAIL_CREATEXFER;
- g_pLog->DisplayMessage(_T("Error: ActivateObjects fail."));
+ //g_pLog->DisplayMessage(_T("Error: ActivateObjects fail."));
return FALSE;
}
if (m_pXfer->Connect() == FALSE) {
- g_pLog->DisplayMessage(_T("Error: m_pXfer->Connect fail."));
+ //g_pLog->DisplayMessage(_T("Error: m_pXfer->Connect fail."));
return FALSE;
}
@@ -140,13 +139,11 @@
m_pFrameBuffer = new CFrameBufferController;
- if(TRUE == m_pFrameBuffer->CreateBuffer(m_Param.nCameraIdx,nBufSizeX ,nBufSizeY,nBufSize, nScanCount))
- {
- g_pLog->DisplayMessage(_T("Create Buffer success!:Id[%d],Frame[%d,%d],Cnt[%d]"),m_Param.nCameraIdx,nBufSizeX,nBufSizeY,nBufSize);
+ if(TRUE == m_pFrameBuffer->CreateBuffer(m_Param.nCameraIdx,nBufSizeX ,nBufSizeY,nBufSize, nScanCount)) {
+ //g_pLog->DisplayMessage(_T("Create Buffer success!:Id[%d],Frame[%d,%d],Cnt[%d]"),m_Param.nCameraIdx,nBufSizeX,nBufSizeY,nBufSize);
}
- else
- {
- g_pLog->DisplayMessage(_T("Create Buffer Fail!:Id[%d],Frame[%d,%d],Cnt[%d]"),m_Param.nCameraIdx,nBufSizeX,nBufSizeY,nBufSize);
+ else {
+ //g_pLog->DisplayMessage(_T("Create Buffer Fail!:Id[%d],Frame[%d,%d],Cnt[%d]"),m_Param.nCameraIdx,nBufSizeX,nBufSizeY,nBufSize);
return FALSE;
}
@@ -182,7 +179,7 @@
if (m_pSapAcq && !*m_pSapAcq) {
if (!m_pSapAcq->Create()) {
DestroyObjects();
- g_pLog->DisplayMessage(_T("Error: m_pSapAcq->Create fail."));
+ //g_pLog->DisplayMessage(_T("Error: m_pSapAcq->Create fail."));
return FALSE;
}
}
@@ -190,7 +187,7 @@
if (m_pSapBuffers && !*m_pSapBuffers) {
if (!m_pSapBuffers->Create()) {
DestroyObjects();
- g_pLog->DisplayMessage(_T("Error: m_pSapBuffers->Create fail."));
+ //g_pLog->DisplayMessage(_T("Error: m_pSapBuffers->Create fail."));
return FALSE;
}
m_pSapBuffers->Clear();
@@ -200,7 +197,7 @@
m_pXfer->SetAutoEmpty(TRUE);
if (!m_pXfer->Create()) {
DestroyObjects();
- g_pLog->DisplayMessage(_T("Error: m_pXfer->Create fail."));
+ //g_pLog->DisplayMessage(_T("Error: m_pXfer->Create fail."));
return FALSE;
}
}
@@ -354,7 +351,7 @@
if(m_pFrameBuffer == NULL)
return;
- int nFrameCnt = m_pFrameBuffer->GetFrameCount();
+ int nFrameCnt = m_pFrameBuffer->GetFrameCount();
m_nEndFrameIdx = nFrameCnt;
m_nSetBufferIdx = nFrameCnt -1;
--
Gitblit v1.9.3