Compare commits

..

No commits in common. "34f5c69ae9a399b00605ca4162d7c1f1a9209276" and "ac569593bf181fb0a382d9f2925f674dff622541" have entirely different histories.

3 changed files with 16 additions and 36 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-ex/entries/help/MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径
static const std::string helpfile_ = "/opt/apps/com.microtekchina.microtekscan/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-ex/doc/MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径
static const std::string helpfile_ = "/opt/apps/scanner-driver-microtek/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,29 +846,11 @@ 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 - 1,//上面设置的是1 - 5 接受范围值为0 - 4默认2
val = check,
old = dev_conf_.params_3399.screw_detect_level;
setting_hardware::HGSCANCONF_3399 cf;
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;
cf.params_3399.screw_detect_level = -1;
if (val < 0)
{
@ -891,7 +873,7 @@ int hg_scanner_239::on_skew_check_level_changed(int& check)
{
check = val;
ret = SCANNER_ERR_NOT_EXACT;
}*/
}
return ret;
}
@ -937,15 +919,13 @@ int hg_scanner_239::on_pick_paper(bool autostrength)
}
int hg_scanner_239::on_pick_paper_threshold(double threshold)
{
float f = threshold;
//threshold *= 10;
int val = *(int*)&f;
int ret = write_register(setting3399::SR_SET_AUTOMATICCONTROLFEEDMODE_THRESHOLD, val);
threshold *= 10;
int val = 0,
ret = write_register(setting3399::SR_SET_AUTOMATICCONTROLFEEDMODE_THRESHOLD, threshold);
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)
@ -1068,7 +1048,7 @@ void hg_scanner_239::thread_get_dves_image(void)
if (ret == SCANNER_ERR_TIMEOUT)
{
if (img_conf_.resolution_dst == 600.0 && ++to_cnt > 60 && !is_auto_paper_scan)
if (img_conf_.resolution_dst == 600.0 && ++to_cnt > 50 && !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); // 取图通信超时
@ -1088,6 +1068,12 @@ 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);
@ -1095,11 +1081,6 @@ 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;
}
@ -1159,7 +1140,6 @@ 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_));