Jelajahi Sumber

Z991239-5288 #comment feat: 指纹仪模拟器图片生成问题修复

陈纪林80310970 1 tahun lalu
induk
melakukan
3476f5dd65
1 mengubah file dengan 1 tambahan dan 49 penghapusan
  1. 1 49
      DevAdapter/simulator/FingerPrint.1.1/FingerPrint_impl.cpp

+ 1 - 49
DevAdapter/simulator/FingerPrint.1.1/FingerPrint_impl.cpp

@@ -42,53 +42,7 @@ BOOL APIENTRY DllMain( HMODULE hModule,
     return TRUE;
 }
 #endif
-//string GetLocalIP()
-//{
-//#ifdef RVC_OS_WIN
-//	hostent* ent = gethostbyname(NULL);
-//	if (ent && ent->h_addr_list[0] != NULL)
-//	{
-//		int i = 0;
-//		for (; ent->h_addr_list[i] != NULL; ++i)
-//		{
-//			struct in_addr* in = (struct in_addr*)ent->h_addr_list[i];
-//			if (in->S_un.S_un_b.s_b1 == 99 || in->S_un.S_un_b.s_b1 == 10)
-//				break;
-//		}
-//
-//		if (ent->h_addr_list[i] == NULL)
-//			i = 0;
-//
-//		auto in = (struct in_addr*)ent->h_addr_list[i];
-//		char xIP[64] = {};
-//		sprintf(xIP, "%d.%d.%d.%d", in->S_un.S_un_b.s_b1, in->S_un.S_un_b.s_b2, in->S_un.S_un_b.s_b3, in->S_un.S_un_b.s_b4);
-//		LOG4VTM(INFO, ("ip:%s", xIP));
-//
-//		return string(xIP);
-//	}
-//#else
-//	std::string re = "";
-//	int sfd, intr;
-//	struct ifreq buf[16];
-//	struct ifconf ifc;
-//	sfd = socket(AF_INET, SOCK_DGRAM, 0);
-//	if (sfd < 0)
-//		return "wrong 1: get ip socket failed";
-//	ifc.ifc_len = sizeof(buf);
-//	ifc.ifc_buf = (caddr_t)buf;
-//	if (ioctl(sfd, SIOCGIFCONF, (char*)&ifc))
-//		return "wrong 2: get ip ioctl failed";
-//	intr = ifc.ifc_len / sizeof(struct ifreq);
-//	while (intr-- > 0 && ioctl(sfd, SIOCGIFADDR, (char*)&buf[intr]));
-//	close(sfd);
-//	unsigned long ip = ntohl(((struct sockaddr_in*)(&buf[intr].ifr_addr))->sin_addr.s_addr);
-//
-//	char* str = new char[1024];
-//	sprintf(str, "%u.%u.%u.%u", ip >> 24 & 0xFF, ip >> 16 & 0xFF, ip >> 8 & 0xFF, ip >> 0 & 0xFF);
-//	re = str;
-//	return re;
-//#endif
-//}
+
 string get_current_directory() {
 	char buff[256];
 	GetCurrentDir(buff, 256);
@@ -190,7 +144,6 @@ ErrorCodeEnum FingerPrintImpl::DevOpen(DWORD dwPort, DWORD dwBaudRate)
 
 ErrorCodeEnum FingerPrintImpl::Image2Feature(const char* imageName, LPBYTE lpbFeature, int& iLength)
 {
-	return Error_Succeed;
 	//imageName写入的文件,lpbFeature 特征码,iLength特征码长度
 	string imgName(imageName);
 	string imgPath = get_current_directory() + SPLIT_SLASH_STR + "dep" + SPLIT_SLASH_STR + imgName;
@@ -217,7 +170,6 @@ ErrorCodeEnum FingerPrintImpl::Image2Template(const char* imagePath1, const char
 	else {
 		return Error_Exception;
 	}
-	return Error_Succeed;
 }
 
 ErrorCodeEnum FingerPrintImpl::Match(LPBYTE lpbTemplate[], int iTemplateLen[], int templateNum, LPBYTE lbpFeature, int& iFeatureLen, int level /*= 3*/)