移除在start当中的回调

This commit is contained in:
13038267101 2023-01-10 09:36:22 +08:00
parent fa67e6cd17
commit 8df03506e1
6 changed files with 17 additions and 17 deletions

View File

@ -276,7 +276,7 @@ int hg_scanner_200::start(void)
if (!type)
{
status_ = ret = SCANNER_ERR_DEVICE_NO_PAPER;
notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_NO_PAPER, SANE_EVENT_ERROR, status_);
//notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_NO_PAPER, SANE_EVENT_ERROR, status_);
VLOG_MINI_1(LOG_LEVEL_WARNING, "device start status is(%s)\n", STATU_DESC_SCANNER_ERR_DEVICE_NO_PAPER);
return ret;
}

View File

@ -899,8 +899,8 @@ int hg_scanner_239::on_is_auto_paper(bool isautopaper)
dev_conf_.params_3399.is_autopaper = isautopaper;
ret = writedown_device_configuration();
if (isautopaper)
notify_ui_working_status("\345\276\205\347\272\270\346\211\253\346\217\217\347\212\266\346\200\201\344\270\255...", SANE_EVENT_WORKING, status_);
//if (isautopaper)
//notify_ui_working_status("\345\276\205\347\272\270\346\211\253\346\217\217\347\212\266\346\200\201\344\270\255...", SANE_EVENT_WORKING, status_);
}
return ret;
}
@ -1253,7 +1253,7 @@ int hg_scanner_239::start(void)
VLOG_MINI_1(LOG_LEVEL_WARNING, "device start status is(%s)\n", STATU_DESC_SCANNER_ERR_DEVICE_SLEEPING);
if(is_kernelsnap_220830_)
ret = set_notify_sleep();
notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_NOTIFY_SLEEP, SANE_EVENT_ERROR, status_);
//notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_NOTIFY_SLEEP, SANE_EVENT_ERROR, status_);
return status_;
}
bool type = true;
@ -1264,7 +1264,7 @@ int hg_scanner_239::start(void)
return status_;
}
notify_ui_working_status(STATU_DESC_REWRITE_CONFIGURATION);
//notify_ui_working_status(STATU_DESC_REWRITE_CONFIGURATION);
if(ret == SCANNER_ERR_OK)
{
ret = writedown_device_configuration(true);
@ -1278,10 +1278,10 @@ int hg_scanner_239::start(void)
{
VLOG_MINI_1(LOG_LEVEL_WARNING, "Write down image process parameters fail is(%s), the result will be unpredictable.\n", hg_scanner_err_name(ret));
std::string info(STATU_DESC_REWRITE_CONFIGURATION);
//std::string info(STATU_DESC_REWRITE_CONFIGURATION);
info += std::string("\345\244\261\350\264\245\357\274\232") + hg_scanner_err_name(ret);
notify_ui_working_status(info.c_str(), SANE_EVENT_ERROR, ret);
//info += std::string("\345\244\261\350\264\245\357\274\232") + hg_scanner_err_name(ret);
//notify_ui_working_status(info.c_str(), SANE_EVENT_ERROR, ret);
}
if (ret != SCANNER_ERR_OK)

View File

@ -165,7 +165,7 @@ void hg_scanner_300::thread_handle_usb_read(void)
}
}
if (sw.elapsed_ms() > 30000)//防止状态信息一直取不上来导致卡死
if (sw.elapsed_ms() > 15000)//防止状态信息一直取不上来导致卡死
{
//3288固件 获取有纸无纸问题的bug如果是打开盖子在start之前【主动】获取的话会先报无纸而不是开盖。
//但是在【端点】又获取不到有纸还是无纸的状态,所以只能通过等待超时,再来【主动】获取有无纸张。
@ -246,8 +246,8 @@ void hg_scanner_300::thread_handle_usb_read(void)
if (!val)
{
status_ = SCANNER_ERR_DEVICE_SLEEPING;
notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_SLEEPING, SANE_EVENT_ERROR, status_);
notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_NOTIFY_SLEEP, SANE_EVENT_ERROR, status_);
//notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_SLEEPING, SANE_EVENT_ERROR, status_);
//notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_NOTIFY_SLEEP, SANE_EVENT_ERROR, status_);
VLOG_MINI_1(LOG_LEVEL_WARNING, "device start status is(%s)\n", STATU_DESC_SCANNER_ERR_DEVICE_SLEEPING);
return status_;
}

View File

@ -1013,7 +1013,7 @@ int hg_scanner_302::start(void)
split3399_ = 0;
cb_mem_ = true;
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "scanner status: 0x%x\n", get_status());
notify_ui_working_status(STATU_DESC_PREPARE_START);
//notify_ui_working_status(STATU_DESC_PREPARE_START);
reset();
read_register(setting3399::SR_GET_PAPERON, &val);
@ -1022,7 +1022,7 @@ int hg_scanner_302::start(void)
VLOG_MINI_1(LOG_LEVEL_WARNING, "start failed: %s\n", hg_scanner_err_name(SCANNER_ERR_DEVICE_NO_PAPER));
return SCANNER_ERR_DEVICE_NO_PAPER;
}
notify_ui_working_status(STATU_DESC_REWRITE_CONFIGURATION);
//notify_ui_working_status(STATU_DESC_REWRITE_CONFIGURATION);
ret = writedown_device_configuration(true);
if (ret == SCANNER_ERR_OK)
writedown_image_configuration();

View File

@ -239,7 +239,7 @@ int hg_scanner_400::start(void)
{
status_ = SCANNER_ERR_DEVICE_SLEEPING;
//notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_SLEEPING, SANE_EVENT_ERROR, status_);
notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_NOTIFY_SLEEP, SANE_EVENT_ERROR, status_);
//notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_NOTIFY_SLEEP, SANE_EVENT_ERROR, status_);
VLOG_MINI_1(LOG_LEVEL_WARNING, "device start status is(%s)\n", STATU_DESC_SCANNER_ERR_DEVICE_SLEEPING);
return status_;
}
@ -247,7 +247,7 @@ int hg_scanner_400::start(void)
if (!val)
{
status_ = SCANNER_ERR_DEVICE_NO_PAPER;
notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_NO_PAPER, SANE_EVENT_ERROR, status_);
//notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_NO_PAPER, SANE_EVENT_ERROR, status_);
VLOG_MINI_1(LOG_LEVEL_WARNING, "device start status is(%s)\n", STATU_DESC_SCANNER_ERR_DEVICE_NO_PAPER);
return status_;
}

View File

@ -972,7 +972,7 @@ int hg_scanner_402::start(void)
user_cancel_ = false;
cb_mem_ = true;
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "scanner status: 0x%x\n", get_status());
notify_ui_working_status(STATU_DESC_PREPARE_START);
//notify_ui_working_status(STATU_DESC_PREPARE_START);
reset();
@ -982,7 +982,7 @@ int hg_scanner_402::start(void)
VLOG_MINI_1(LOG_LEVEL_WARNING, "start failed: %s\n", hg_scanner_err_name(SCANNER_ERR_DEVICE_NO_PAPER));
return SCANNER_ERR_DEVICE_NO_PAPER;
}
notify_ui_working_status(STATU_DESC_REWRITE_CONFIGURATION);
//notify_ui_working_status(STATU_DESC_REWRITE_CONFIGURATION);
ret = writedown_device_configuration(true);
if (ret == SCANNER_ERR_OK)
writedown_image_configuration();