Compare commits

...

3 Commits

Author SHA1 Message Date
13038267101 34f5c69ae9 linux中晶打包路径 2023-03-16 19:09:18 +08:00
13038267101 6517f8dbab Merge branch 'master' of http://192.168.10.5:8099/sane/code_device 2023-03-16 18:49:32 +08:00
13038267101 88f755e4c4 调整自动分纸强度,歪斜检测 2023-03-16 18:49:24 +08:00
3 changed files with 36 additions and 16 deletions

View File

@ -996,7 +996,7 @@ namespace setting3399
SR_SET_SLEEPTIME,
SR_GET_SLEEPTIME,
SR_GET_SLEEP_STAUTUS, //返回1不在睡眠状态 0反之
SR_GET_IMAGEPROCESSDONE,
SR_GET_IMAGEPROCESSDONE,//指设备所有图像处理完成没有
SR_GET_KEEP_LAST_PAPER,
SR_GET_PAPERON,
SR_SET_SPEEDMODE,

View File

@ -538,7 +538,7 @@ public:
#elif defined(OEM_CANGTIAN)
static const std::string helpfile_ = "/opt/apps/com.cumtennchina.cumtennscan/entries/help/CumtennScan_scanSettings_Help_manual.pdf";//帮助文档路径
#elif defined(OEM_ZHONGJING)
static const std::string helpfile_ = "/opt/apps/com.microtekchina.microtekscan/entries/help/MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径
static const std::string helpfile_ = "/opt/apps/com.microtekchina.microtekscan-ex/entries/help/MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径
#elif defined(OEM_ZIGUANG)
static const std::string helpfile_ = "/opt/apps/com.unisgroup.uniscan/entries/help/UniScan_scanSettings_Help_manual.pdf";//帮助文档路径
#else
@ -552,7 +552,7 @@ public:
#elif defined(OEM_CANGTIAN)
static const std::string helpfile_ = "/opt/apps/scanner-driver-cumtenn/doc/CumtennScan_scanSettings_Help_manual.pdf";//帮助文档路径
#elif defined(OEM_ZHONGJING)
static const std::string helpfile_ = "/opt/apps/scanner-driver-microtek/doc/MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径
static const std::string helpfile_ = "/opt/apps/scanner-driver-microtek-ex/doc/MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径
#elif defined(OEM_ZIGUANG)
static const std::string helpfile_ = "/opt/apps/scanner-driver-unis/doc/UniScan_scanSettings_Help_manual.pdf";//帮助文档路径
#else

View File

@ -846,11 +846,29 @@ int hg_scanner_239::on_skew_check_changed(bool& check)
int hg_scanner_239::on_skew_check_level_changed(int& check)
{
int ret = SCANNER_ERR_OK,
val = check,
val = check - 1,//上面设置的是1 - 5 接受范围值为0 - 4默认2
old = dev_conf_.params_3399.screw_detect_level;
setting_hardware::HGSCANCONF_3399 cf;
cf.params_3399.screw_detect_level = -1;
if (val < 0 && val>5)
{
check = 3;
ret = SCANNER_ERR_NOT_EXACT;
}
if (val != dev_conf_.params_3399.screw_detect_level)
{
dev_conf_.params_3399.screw_detect_level = val;
ret = writedown_device_configuration();
if (ret)
{
check = dev_conf_.params_3399.screw_detect_level = old;
check += 1;
}
}
/*cf.params_3399.screw_detect_level = -1;
if (val < 0)
{
@ -873,7 +891,7 @@ int hg_scanner_239::on_skew_check_level_changed(int& check)
{
check = val;
ret = SCANNER_ERR_NOT_EXACT;
}
}*/
return ret;
}
@ -919,13 +937,15 @@ int hg_scanner_239::on_pick_paper(bool autostrength)
}
int hg_scanner_239::on_pick_paper_threshold(double threshold)
{
threshold *= 10;
int val = 0,
ret = write_register(setting3399::SR_SET_AUTOMATICCONTROLFEEDMODE_THRESHOLD, threshold);
float f = threshold;
//threshold *= 10;
int val = *(int*)&f;
int ret = write_register(setting3399::SR_SET_AUTOMATICCONTROLFEEDMODE_THRESHOLD, val);
if (ret != SCANNER_ERR_OK)
return ret;
ret = read_register(setting3399::SR_GET_AUTOMATICCONTROLFEEDMODE_THRESHOLD,&val);
float v = *(float*)&val;
return ret;
}
int hg_scanner_239::on_is_auto_paper(bool isautopaper)
@ -1048,7 +1068,7 @@ void hg_scanner_239::thread_get_dves_image(void)
if (ret == SCANNER_ERR_TIMEOUT)
{
if (img_conf_.resolution_dst == 600.0 && ++to_cnt > 50 && !is_auto_paper_scan)
if (img_conf_.resolution_dst == 600.0 && ++to_cnt > 60 && !is_auto_paper_scan)
{
status_ = ret;
notify_ui_working_status(hg_log::lang_load(ID_STATU_DESC_SCANNER_ERR_DEVICE_GET_IMAGE_OUTTIME), SANE_EVENT_ERROR, ret); // 取图通信超时
@ -1068,12 +1088,6 @@ void hg_scanner_239::thread_get_dves_image(void)
stop();
notify_ui_working_status(from_default_language(STATU_DESC_SCANNER_ERR_DEVICE_EXIT_WAIT_SCAN), SANE_EVENT_ERROR, status_);
}
if ((get_status() & 0x03) == 0)
{
status_ = SCANNER_ERR_OK;
//break;
}
if (user_cancel_ && is_auto_paper_scan)
{
size = sizeof(buf);
@ -1081,6 +1095,11 @@ void hg_scanner_239::thread_get_dves_image(void)
info->From = setting3399::STOPSCAN;
LOG_INFO(LOG_LEVEL_DEBUG_INFO, "User cancelled (checked when read INT timeout), we faked a 'STOP' messag to enter exiting process ...\n");
}
if ((get_status() & 0x03) == 0)
{
status_ = SCANNER_ERR_OK;
//break;
}
else
continue;
}
@ -1140,6 +1159,7 @@ void hg_scanner_239::thread_get_dves_image(void)
break;
}
status_ = st;
//break;
}
svdevs_err_.push_back(status_);
VLOG_MINI_1(LOG_LEVEL_WARNING, "\346\211\253\346\217\217\345\244\261\350\264\245, read interrupt\350\277\224\345\233\236\347\212\266\346\200\201\344\270\272\357\274\232%s\n", hg_scanner_err_description(status_));