调整获取睡眠状态 并且激活设备
This commit is contained in:
parent
0ff688a3cf
commit
40fa277d32
|
@ -758,10 +758,14 @@ void hg_scanner_239::image_process(std::shared_ptr<tiny_buffer>& buff)
|
|||
hg_imgproc::release(handle);
|
||||
}
|
||||
|
||||
int hg_scanner_239::get_device_sleep_stautus(void)
|
||||
int hg_scanner_239::get_device_sleep_stautus()
|
||||
{
|
||||
int ret =read_register(SR_GET_SLEEP_STAUTUS,0);
|
||||
return ret;
|
||||
int val = 0,
|
||||
ret = 0;
|
||||
|
||||
ret = read_register(SR_GET_SLEEP_STAUTUS,&val);
|
||||
return val;
|
||||
|
||||
}
|
||||
|
||||
int hg_scanner_239::get_device_paperon_stautus(void)
|
||||
|
@ -1707,8 +1711,16 @@ int hg_scanner_239::start(void)
|
|||
|
||||
reset();
|
||||
get_roller_num();
|
||||
val = get_sleep_time();
|
||||
string a;
|
||||
val = get_device_sleep_stautus();
|
||||
if (val == 0)
|
||||
{
|
||||
status_ = SCANNER_ERR_DEVICE_SLEEPING;
|
||||
//notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_SLEEPING, SANE_EVENT_ERROR, status_);
|
||||
VLOG_MINI_1(LOG_LEVEL_WARNING, "device start status is(%s)\n", STATU_DESC_SCANNER_ERR_DEVICE_SLEEPING);
|
||||
val = notify_sleep();
|
||||
notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_NOTIFY_SLEEP, SANE_EVENT_ERROR, status_);
|
||||
return status_;
|
||||
}
|
||||
|
||||
//if (val != 1)
|
||||
//{
|
||||
|
@ -1717,6 +1729,7 @@ int hg_scanner_239::start(void)
|
|||
|
||||
// return status_;
|
||||
//}
|
||||
|
||||
val = get_scan_mode();
|
||||
if (status_ == SCANNER_ERR_DEVICE_NOT_FOUND)
|
||||
return status_;
|
||||
|
@ -1761,7 +1774,7 @@ int hg_scanner_239::start(void)
|
|||
if (ret == SCANNER_ERR_DEVICE_NO_PAPER)
|
||||
{
|
||||
status_ = ret;
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ class hg_scanner_239 : public hg_scanner
|
|||
int get_image_count(void);
|
||||
int get_front_data_size(void);
|
||||
void init_version(void);
|
||||
int get_device_sleep_stautus(void);
|
||||
int get_device_sleep_stautus();
|
||||
int get_device_paperon_stautus(void);
|
||||
|
||||
int writedown_device_configuration(HGSCANCONF *dev_conf = NULL);
|
||||
|
|
Loading…
Reference in New Issue