调整402 403实例化错误
This commit is contained in:
parent
f2cf983bdd
commit
8c3165aef0
|
@ -180,10 +180,13 @@ hg_scanner_302::hg_scanner_302(const char* dev_name, int pid, usb_io* io) : hg_s
|
||||||
#ifndef MAPPING_FUNCTION_IN_BASE
|
#ifndef MAPPING_FUNCTION_IN_BASE
|
||||||
init_setting_map(setting_map_, ARRAY_SIZE(setting_map_));
|
init_setting_map(setting_map_, ARRAY_SIZE(setting_map_));
|
||||||
#endif
|
#endif
|
||||||
if(init_settings(pid_))
|
if (init_settings(pid_))
|
||||||
init_settings((jsontext1 + jsontext2).c_str());
|
{
|
||||||
else
|
if (pid_ == 0x302)
|
||||||
init_settings((jsontext3 + jsontext4).c_str());
|
init_settings((jsontext1 + jsontext2).c_str());
|
||||||
|
else
|
||||||
|
init_settings((jsontext3 + jsontext4).c_str());
|
||||||
|
}
|
||||||
//writedown_device_configuration(); // initialize the hardware settings
|
//writedown_device_configuration(); // initialize the hardware settings
|
||||||
init_version();
|
init_version();
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,7 +262,7 @@ hg_scanner* hg_scanner_mgr::create_scanner_g302(const char* name, usb_io* io, sc
|
||||||
}
|
}
|
||||||
hg_scanner* hg_scanner_mgr::create_scanner_g402(const char* name, usb_io* io, scanner_handle* h)
|
hg_scanner* hg_scanner_mgr::create_scanner_g402(const char* name, usb_io* io, scanner_handle* h)
|
||||||
{
|
{
|
||||||
hg_scanner_302* s = new hg_scanner_302(name, 0x402, io);
|
hg_scanner_302* s = new hg_scanner_302(name, 0x302, io);
|
||||||
|
|
||||||
if (h)
|
if (h)
|
||||||
*h = s;
|
*h = s;
|
||||||
|
|
Loading…
Reference in New Issue