新增沧田 vid pid,调整239获取序列号长度可能因为睡眠获取不上来的问题,

This commit is contained in:
13038267101 2023-06-07 16:41:16 +08:00
parent c2d4ed7626
commit f7f27d554e
2 changed files with 18 additions and 5 deletions

View File

@ -1462,13 +1462,17 @@ std::string hg_scanner_239::get_serial_num(void)
std::lock_guard<std::mutex> lock(io_lock_);
int len = 0;
read_register(setting3399::SR_GET_SERIAL_LEN, &len);///???
if (len > 30)
{
len = 30;
}
return control_fetch(setting3399::SR_GET_SERIALNUM, 0, len).substr(0,len);
}
std::string hg_scanner_239::get_ip(void)
{
std::lock_guard<std::mutex> lock(io_lock_);
int len = 0;
read_register(setting3399::SR_GET_SERIAL_LEN, &len);
int len = 20;
//read_register(setting3399::SR_GET_SERIAL_LEN, &len);
return control_fetch(setting3399::SR_GET_IPADDR, 0, len);
}
std::string hg_scanner_239::get_device_model(void)

View File

@ -53,10 +53,18 @@ g_supporting_devices[] = {
, {0x2903, 0x8000, SCANNER_NAME_HW_8000, SCANNER_NAME_HW_8000, "", &hg_scanner_mgr::create_scanner_g239} // "HW-8090F"
, {0x2903, 0x9000, SCANNER_NAME_HW_9000, SCANNER_NAME_HW_9000, "", &hg_scanner_mgr::create_scanner_g239} // "HW-9110E"
#elif defined(OEM_CANGTIAN)
{0x3308, 0x6006, SCANNER_NAME_CT_9020, SCANNER_NAME_CT_9020, "", &hg_scanner_mgr::create_scanner_g239}
{0x3072, 0x0303, SCANNER_NAME_CT_4520, SCANNER_NAME_CT_4520, "", &hg_scanner_mgr::create_scanner_g300}
, {0x3072, 0x0403, SCANNER_NAME_CT_138, SCANNER_NAME_CT_138, "", &hg_scanner_mgr::create_scanner_g439}
, {0x3072, 0x0138, SCANNER_NAME_CT_138, SCANNER_NAME_CT_138, "", &hg_scanner_mgr::create_scanner_g239}
, {0x3072, 0x0238, SCANNER_NAME_CT_138, SCANNER_NAME_CT_138, "", &hg_scanner_mgr::create_scanner_g239}
, {0x3308, 0x0138, SCANNER_NAME_CT_138, SCANNER_NAME_CT_138, "", &hg_scanner_mgr::create_scanner_g239}
, {0x3308, 0x0238, SCANNER_NAME_CT_238, SCANNER_NAME_CT_238, "", &hg_scanner_mgr::create_scanner_g239}
, {0x3308, 0x6006, SCANNER_NAME_CT_9020, SCANNER_NAME_CT_9020, "", &hg_scanner_mgr::create_scanner_g239}
, {0x3308, 0x6005, SCANNER_NAME_CT_4520, SCANNER_NAME_CT_4520, "", &hg_scanner_mgr::create_scanner_g300}
, {0x3308, 0x0238, SCANNER_NAME_CT_138, SCANNER_NAME_CT_138, "", &hg_scanner_mgr::create_scanner_g239}
, {0x3308, 0x0138, SCANNER_NAME_CT_238, SCANNER_NAME_CT_238, "", &hg_scanner_mgr::create_scanner_g239}
#elif defined(OEM_ZHONGJING)
{0X05DA, 0x9220, SCANNER_NAME_ZJ_6500, "S6500", "",& hg_scanner_mgr::create_scanner_g439}
#elif defined(OEM_ZIGUANG)
@ -90,6 +98,7 @@ g_supporting_devices[] = {
, {0x3308, 0x6005, SCANNER_NAME_CT_4520, SCANNER_NAME_CT_4520, "", &hg_scanner_mgr::create_scanner_g300}
, {0x3308, 0x0238, SCANNER_NAME_CT_138, SCANNER_NAME_CT_138, "", &hg_scanner_mgr::create_scanner_g239}
, {0x3308, 0x0138, SCANNER_NAME_CT_238, SCANNER_NAME_CT_238, "", &hg_scanner_mgr::create_scanner_g239}
, {0x3072, 0x0303, SCANNER_NAME_CT_4520, SCANNER_NAME_CT_4520, "", &hg_scanner_mgr::create_scanner_g300}
#else
{0x3072, PID_AND_NAME(100, SCANNER_NAME_HG_G100), "G100", "", &hg_scanner_mgr::create_scanner_g100}
, {0x3072, PID_AND_NAME(139, SCANNER_NAME_HG_G100), "G100", "", &hg_scanner_mgr::create_scanner_g239}