This commit is contained in:
gb 2023-06-17 16:11:43 +08:00
commit 7492883636
2 changed files with 5 additions and 3 deletions

View File

@ -3128,7 +3128,7 @@ int hg_scanner::save_usb_data(std::shared_ptr<tiny_buffer> data)
usb_img_index_++; usb_img_index_++;
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "USB read one picture with %u bytes\n", data->size()); VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "USB read one picture with %u bytes\n", data->size());
if (dump_usb_path_.length()) if (dump_usb_path_.length() && pid_ != 0x0200 && pid_ != 0x100) //这两台设备不是jpg的图 所以不能直接处理
{ {
char name[80] = { 0 }; char name[80] = { 0 };
FILE* dst = nullptr; FILE* dst = nullptr;

View File

@ -256,12 +256,14 @@ void hg_scanner_200::thread_handle_usb_read(void)
else else
{ {
// notify_ui_working_status(hg_scanner::error_description((scanner_err)prev_err).c_str(), SANE_EVENT_ERROR, prev_err); // notify_ui_working_status(hg_scanner::error_description((scanner_err)prev_err).c_str(), SANE_EVENT_ERROR, prev_err);
VLOG_MINI_1(LOG_LEVEL_WARNING, "-x-x-x-: USB thread error: %s\n", hg_scanner_err_name(prev_err));
} }
prev_err = ret; status_ = prev_err = ret;
break; //dsp 设备错误消息不会发stop
} }
this_thread::sleep_for(chrono::milliseconds(2)); this_thread::sleep_for(chrono::milliseconds(2));
} }
VLOG_MINI_2(LOG_LEVEL_DEBUG_INFO, "USB thread exit with code: %s, status = %s\n", hg_scanner_err_name(ret), hg_scanner_err_description(status_));
} }
int hg_scanner_200::start(void) int hg_scanner_200::start(void)
{ {