调整线程导致三方不能使用

This commit is contained in:
13038267101 2023-05-24 15:56:03 +08:00
parent 9f312279d0
commit 8ead291274
3 changed files with 10 additions and 10 deletions

View File

@ -366,12 +366,12 @@ void hg_scanner::thread_read_int(void)
while (run_) while (run_)
{ {
wait_read_int.wait(); wait_read_int.wait();
if (is_read_int && is_firstopen_) if (is_read_int && is_firstopen_ && pid_ == 0x300)
{ {
is_read_int = true; is_read_int = true;
notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_DEVS_BOOTING, SANE_EVENT_STATUS, status_); notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_DEVS_BOOTING, SANE_EVENT_STATUS, status_);
discard_all_images(); //discard_all_images();
//set_updata0303(); set_updata0303();
notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_DEVS_START_SUCCES, SANE_EVENT_STATUS, status_); notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_DEVS_START_SUCCES, SANE_EVENT_STATUS, status_);
} }
if (is_firstopen_) if (is_firstopen_)
@ -4095,7 +4095,7 @@ int hg_scanner::set_auto_flat(int data)
} }
int hg_scanner::set_updata0303(void) int hg_scanner::set_updata0303(void)
{ {
return 0; return SCANNER_ERR_DEVICE_NOT_SUPPORT;
} }
int hg_scanner::set_device_model(string sts) int hg_scanner::set_device_model(string sts)
{ {

View File

@ -1323,11 +1323,11 @@ int hg_scanner_239::start(void)
if (handled) if (handled)
return ret; return ret;
if (is_read_int) //if (is_read_int)
{ //{
VLOG_MINI_1(LOG_LEVEL_WARNING, "device status is(%s)\n", STATU_DESC_SCANNER_ERR_DEVICE_DEVS_BOOTING); // VLOG_MINI_1(LOG_LEVEL_WARNING, "device status is(%s)\n", STATU_DESC_SCANNER_ERR_DEVICE_DEVS_BOOTING);
return SCANNER_ERR_DEVICE_DEVS_BOOTING; // return SCANNER_ERR_DEVICE_DEVS_BOOTING;
} //}
user_cancel_ = false; user_cancel_ = false;
ret = on_is_auto_paper(is_auto_paper_scan); ret = on_is_auto_paper(is_auto_paper_scan);

View File

@ -91,7 +91,7 @@ hg_scanner_300::hg_scanner_300(const char* dev_name,int pid, usb_io* io) : hg_sc
else else
init_settings((jsontext3 + jsontext4 + jsontext5).c_str()); init_settings((jsontext3 + jsontext4 + jsontext5).c_str());
} }
//initdevice(); initdevice();
wait_read_int.notify(); wait_read_int.notify();
} }
hg_scanner_300::~hg_scanner_300() hg_scanner_300::~hg_scanner_300()