فهرست منبع

Z991239-5241 #comment 指纹仪去除蓝牙多和一及pad机型适配器判断

Signed-Off-By: commit-hook
刘文涛80174520 1 سال پیش
والد
کامیت
827bac09bf

+ 15 - 74
Module/mod_FingerPrint/FingerPrintFSM.cpp

@@ -34,10 +34,8 @@ void CFingerPrintFSM::s0_on_entry()
 {
 	LOG_FUNCTION();
 	m_devState = DEVICE_STATUS_NORMAL;
+	ToLogWarnInfoAboutTerm();
 
-	if (!(m_csMachineType.Compare("RVC.PAD", true) == 0 && m_fwbSN.IsNullOrEmpty())) {
-		ToLogWarnInfoAboutTerm();
-	}
 }
 
 void CFingerPrintFSM::s0_on_exit()
@@ -113,13 +111,6 @@ unsigned int CFingerPrintFSM::s0_on_event(FSMEvent* e)
 				GetEntityBase()->GetFunction()->PostThreadPoolTask(pMatchTask);
 			}
 			break;
-		case USER_EVT_FWB_OPEN_SUC:
-			{
-				e->SetHandled();
-				ProcFWBReConnTask* task = new ProcFWBReConnTask(this);
-				GetEntityBase()->GetFunction()->PostThreadPoolTask(task);
-			}
-			break;
 		case USER_EVT_FWB_OPEN_SUC_FINISHED:
 			{
 				e->SetHandled();
@@ -245,13 +236,6 @@ unsigned int CFingerPrintFSM::s2_on_event(FSMEvent* e)
 	case USER_EVT_QUIT:
 		e->SetHandled();
 		break;
-	case USER_EVT_FWB_OPEN_SUC:
-		{
-			e->SetHandled();
-			ProcFWBReConnTask* task = new ProcFWBReConnTask(this);
-			GetEntityBase()->GetFunction()->PostThreadPoolTask(task);
-		}
-		break;
 	case USER_EVT_FWB_OPEN_SUC_FINISHED:
 		{
 			e->SetHandled();
@@ -349,44 +333,13 @@ int CFingerPrintFSM::Initial()
 	}
 
 	spConfig->ReadConfigValue("Device.PinPad", "Version", m_version);
-	GetEntityBase()->GetFunction()->GetSysVar("FWBDevSN", m_fwbSN);
-	if (m_csMachineType.Compare("RVC.PAD", true) == 0 && m_fwbSN.IsNullOrEmpty())
-	{
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("RVC.PAD without FWB");
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("指纹仪设备打开成功");
-		return 0;
-	}
 
 	//TODO:device init
 	int initCount = 0;
 	ErrorCodeEnum err;
 	auto pEntity = GET_DEV_ENTITY_BASE_POINTER();
-	//判断是否是蓝牙多合一
-	CSimpleStringA tmpVendor(""), tmpDLLVersion("");
-	bool isFWB = false;
-	CSimpleStringA tmpDevSN = m_fwbSN;
-	GetEntityBase()->GetFunction()->GetSysVar("FWBVendor", tmpVendor);
-	GetEntityBase()->GetFunction()->GetSysVar("FWBVersion", tmpDLLVersion);
-
-	if (tmpDLLVersion.GetLength() < 2)
-		tmpDLLVersion = "8.1";
-	if (tmpDevSN.GetLength() > 12 && tmpDevSN.IndexOf("FWB") > 2)
-	{
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)(CSimpleStringA::Format("This is fwb device. DevSN:%s", tmpDevSN.GetData()));
-		isFWB = true;
-		m_csDevSN = tmpDevSN;
-		VendorLibInfo tmpVendorLibInfo(GetEntityBase()->GetEntityName());
-		tmpVendorLibInfo.strVendor = tmpVendor;
-		CAutoArray<CSimpleStringA> dllVersions = tmpDLLVersion.Split('.');
-		if (dllVersions.GetCount() >= 2) {
-			tmpVendorLibInfo.strVersion = dllVersions[0];
-			tmpVendorLibInfo.strBatch = dllVersions[1];
-		}
-		else {
-			tmpVendorLibInfo.strVersion = tmpDLLVersion;
-		}
-		pEntity->vendorLibInfo = tmpVendorLibInfo;
-	}
+
+
 	BOOL triedFlag = FALSE;
 	if (pEntity->vendorLibInfo.IsNotConfig()) {
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Not config the vendor at root.ini");
@@ -409,18 +362,18 @@ int CFingerPrintFSM::Initial()
 					strVersion = "7";
 					//TODO: Support new or old edition machine.
 				}
-				else if (!m_csMachineType.Compare("RVC.PAD", true)) {
-					if (isFWB) {//蓝牙多合一
-						GetEntityBase()->GetFunction()->GetSysVar("FWBVendor", strVendor);
-						strVersion = "8";
-					}
-					else if ((!strVendor.Compare("Nantian", true) || !strVendor.Compare("grg", true) || !strVendor.Compare("Yihua", true))
-						&& !strVersion.Compare("4", true)) {
-						strVersion = "4";
-					}
-					else
-						strVersion = "1";
-				}
+				//else if (!m_csMachineType.Compare("RVC.PAD", true)) {
+				//	if (isFWB) {//蓝牙多合一
+				//		GetEntityBase()->GetFunction()->GetSysVar("FWBVendor", strVendor);
+				//		strVersion = "8";
+				//	}
+				//	else if ((!strVendor.Compare("Nantian", true) || !strVendor.Compare("grg", true) || !strVendor.Compare("Yihua", true))
+				//		&& !strVersion.Compare("4", true)) {
+				//		strVersion = "4";
+				//	}
+				//	else
+				//		strVersion = "1";
+				//}
 				else if (!m_csMachineType.Compare("RVC.Desk2S", true)) {
 					strVersion = "4";
 					if (m_machineVersion.Compare("1.0", true)) {//低柜一体机(贵宾理财2.0&非贵宾理财2.1)
@@ -1034,18 +987,6 @@ ErrorCodeEnum CFingerPrintFSM::DeleteFileIfExisted(const char* fileName)
 }
 
 
-int CFingerPrintFSM::ProcFWBReConn()
-{
-	if (m_hDevHelper != nullptr)
-	{
-		if (GetDevInitFlag()) {
-			m_bOpened = false;
-		}
-		m_hDevHelper.TearDown();
-	}
-	return 0;
-}
-
 #pragma endregion
 
 

+ 0 - 13
Module/mod_FingerPrint/FingerPrintFSM.h

@@ -273,7 +273,6 @@ public:
 	ErrorCodeEnum GetDevState(int &state);//废弃
 
 	int Initial();
-	int ProcFWBReConn();
 	bool GetDevInitFlag() { return m_bOpened; }
 	void ResetDevInitFlag() { m_bOpened = false; }//蓝牙多合一使用
 	void SetInWhatPage(int bValue) { m_iInWhatPage = bValue; }
@@ -385,17 +384,5 @@ struct InitTask : public ITaskSp
 		fsm->PostEventFIFO(e);
 	}
 };
-//有用
-struct ProcFWBReConnTask : public ITaskSp
-{
-	CFingerPrintFSM* fsm;
-	ProcFWBReConnTask(CFingerPrintFSM* f) : fsm(f) {}
-	void Process()
-	{
-		FSMEvent* e = new FSMEvent(USER_EVT_FWB_OPEN_SUC_FINISHED);
-		e->param1 = fsm->ProcFWBReConn();
-		fsm->PostEventFIFO(e);
-	}
-};
 
 #endif

+ 1 - 9
Module/mod_FingerPrint/mod_FingerPrint.cpp

@@ -100,15 +100,7 @@ void CFingerPrintEntity::OnSysVarEvent(const char *pszKey,
 			m_fsm.SetInWhatPage(PageType_Other);
 		}
 	}
-	else if ((_strnicmp(pszKey, "FWBReConn", strlen("FWBReConn")) == 0))
-	{
-		//"Y":open suc "U":unbind
-		if (_strnicmp(pszValue, "Y", strlen("Y")) == 0 || _strnicmp(pszValue, "U", strlen("U")) == 0)
-		{
-			FSMEvent* e = new FSMEvent(USER_EVT_FWB_OPEN_SUC);
-			m_fsm.PostEventFIFO(e);
-		}
-	}else if (_strnicmp(pszValue, "D", strlen("D")) == 0 )
+	else if (_strnicmp(pszValue, "D", strlen("D")) == 0 )
 	{
 		m_fsm.ResetDevInitFlag();
 	}

+ 0 - 1
Module/mod_FingerPrint/mod_FingerPrint.h

@@ -49,7 +49,6 @@ public:
 		LOG_FUNCTION();
 		ErrorCodeEnum ec = m_fsm.Init(this);
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("OnPreStart, Init:%d", ec);
-		GetFunction()->RegistSysVarEvent("FWBReConn", this);
 		GetFunction()->RegistSysVarEvent("UIState", this);
 		pTransactionContext->SendAnswer(ec);
 	}