调整3288和3399设备匹配原始尺寸,尺寸检测仍然生效的问题,300设备支持导出设备日志
This commit is contained in:
parent
2e7f7bee1b
commit
c09d6eeba8
|
@ -480,6 +480,11 @@ int hg_scanner_200::writedown_device_configuration(bool type,setting_hardware::H
|
|||
d->params_dsp.color = 1;
|
||||
}
|
||||
|
||||
if (paper_size_ == TwSS::None || paper_size_ == TwSS::USStatement || paper_size_ == TwSS::MaxSize || paper_size_ == TwSS::Trigeminy)
|
||||
{
|
||||
d->params_dsp.enable_sizecheck = false;
|
||||
}
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(io_lock_);
|
||||
|
||||
|
|
|
@ -602,6 +602,19 @@ int hg_scanner_239::writedown_image_configuration(void)
|
|||
}
|
||||
ic.contrast = (contrast_ - 4) * 333.0;
|
||||
ic.brightness = (bright_ - 128) * (2000.0 / 254.0);
|
||||
|
||||
if (image_prc_param_.bits.paper == PAPER_AUTO_MATCH
|
||||
|| image_prc_param_.bits.paper == PAPER_MAX_SIZE
|
||||
|| image_prc_param_.bits.paper == PAPER_MAX_SIZE_CLIP
|
||||
|| image_prc_param_.bits.paper == PAPER_TRIGEMINY
|
||||
|| image_prc_param_.bits.paper == PAPER_16K
|
||||
|| image_prc_param_.bits.paper == PAPER_8K
|
||||
|| image_prc_param_.bits.paper == PAPER_16K_LATERAL
|
||||
)
|
||||
{
|
||||
ic.en_sizecheck = false;
|
||||
}
|
||||
|
||||
image_configuration(ic);
|
||||
|
||||
{
|
||||
|
|
|
@ -1122,7 +1122,62 @@ int hg_scanner_300::on_get_feedmode(int &feedmode)
|
|||
}
|
||||
int hg_scanner_300::get_device_log(string &log)
|
||||
{
|
||||
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
|
||||
int ret = SCANNER_ERR_OK,
|
||||
len = 0;
|
||||
string save_path = hg_log::temporary_path() + PATH_SEPARATOR + "device.log";
|
||||
string str;
|
||||
string str2;
|
||||
USBCB usbcb = { setting3288dsp::GET_LOG_FILES_INFO, 0, 0 };
|
||||
len = sizeof(USBCB);
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(io_lock_);
|
||||
|
||||
ret = writeusb(usbcb);
|
||||
if (ret == SCANNER_ERR_OK)
|
||||
{
|
||||
ret = readusb(usbcb);
|
||||
}
|
||||
|
||||
int block = usbcb.u32_Count,
|
||||
total = usbcb.u32_Count,
|
||||
index = 0;
|
||||
|
||||
if (total == 0)
|
||||
{
|
||||
return SCANNER_ERR_NO_DATA;
|
||||
}
|
||||
str.resize(total);
|
||||
str2.resize(total);
|
||||
ret = io_->read_bulk(&str[index], &block);
|
||||
//while (ret == SCANNER_ERR_TIMEOUT) ///设备代码是进行了第二次 write 条件是len > 0 如果出现问题这个地方需要打开
|
||||
//{
|
||||
// block = 1024 * 1024;
|
||||
// if (total < block)
|
||||
// {
|
||||
// block = total;
|
||||
// }
|
||||
// ret = io_->read_bulk(&str2[index], &block);
|
||||
// //if (ret != SCANNER_ERR_OK)
|
||||
// //return ret;
|
||||
|
||||
// index += block;
|
||||
// total -= block;
|
||||
//}
|
||||
}
|
||||
|
||||
if (ret != SCANNER_ERR_OK)
|
||||
return ret;
|
||||
|
||||
ofstream f;
|
||||
f.open(save_path, ios::out | ios::trunc);
|
||||
if (!f.is_open())
|
||||
return SCANNER_ERR_CREATE_FILE_FAILED;
|
||||
|
||||
f << str << endl;
|
||||
f.close();
|
||||
log = save_path;
|
||||
|
||||
return SCANNER_ERR_OK;
|
||||
}
|
||||
int hg_scanner_300::set_devreboot(int data)
|
||||
{
|
||||
|
|
|
@ -519,6 +519,19 @@ int hg_scanner_302::writedown_image_configuration(void)
|
|||
}
|
||||
ic.contrast = contrast_;//(contrast_ - 4) * 333.0;
|
||||
ic.brightness = bright_;// (bright_ - 128)* (2000.0 / 254.0);
|
||||
|
||||
if (image_prc_param_.bits.paper == PAPER_AUTO_MATCH
|
||||
|| image_prc_param_.bits.paper == PAPER_MAX_SIZE
|
||||
|| image_prc_param_.bits.paper == PAPER_MAX_SIZE_CLIP
|
||||
|| image_prc_param_.bits.paper == PAPER_TRIGEMINY
|
||||
|| image_prc_param_.bits.paper == PAPER_16K
|
||||
|| image_prc_param_.bits.paper == PAPER_8K
|
||||
|| image_prc_param_.bits.paper == PAPER_16K_LATERAL
|
||||
)
|
||||
{
|
||||
ic.en_sizecheck = false;
|
||||
}
|
||||
|
||||
image_configuration(ic);
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue