static public bool INIT() { int cnt_of_mini; int cnt_of_gene; int ret1, ret2; // 0x04D8, // Vendor ID // 0x003F, // Product ID(SAMPLE.PROGRAM) // 0xEF22, // Product ID(SENSOR.BIG) // 0xEED8, // Product ID(SENSOR.MINI) ret1 = HID_ENUM(0x04D8, 0xEED8, out cnt_of_mini); ret2 = HID_ENUM(0x04D8, 0xEF22, out cnt_of_gene); if (ret1 != 0 && cnt_of_mini > 0) { #if true//2019.08.23() if ((G.AS.DEBUG_MODE & 1) != 0) { if (DBGMODE.HID_OPEN(0x04D8, 0xEED8, 0) == 0) { G.mlog("ERROR @ HID_OPEN"); return(false); } } else #endif if (HID_OPEN(0x04D8, 0xEED8, 0) == 0) { G.mlog("ERROR @ HID_OPEN"); return(false); } DEV_TYPE = 0; } else if (ret2 != 0 && cnt_of_gene > 0) { #if true//2019.08.23() if ((G.AS.DEBUG_MODE & 1) != 0) { if (DBGMODE.HID_OPEN(0x04D8, 0xEF22, 0) == 0) { G.mlog("ERROR @ HID_OPEN"); return(false); } } else #endif if (HID_OPEN(0x04D8, 0xEF22, 0) == 0) { G.mlog("ERROR @ HID_OPEN"); return(false); } DEV_TYPE = 1; } else { G.mlog("CAN NOT DETECT KOP SENSOR DEVICE"); return(false); } m_access = true; return(true); }