From d514c6dc1e903fd8924ba1e01e3b55b998eacd06 Mon Sep 17 00:00:00 2001 From: gb <741021719@qq.com> Date: Tue, 23 Jan 2024 17:33:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=97=E6=B3=95=E8=80=97=E6=97=B6=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=88=B0=E6=97=A5=E5=BF=97=E6=96=87=E4=BB=B6=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hgdriver/hgdev/hg_scanner.cpp | 5 +++-- sdk/base/data.cpp | 1 + sdk/imgprc/img_processor.h | 7 +++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hgdriver/hgdev/hg_scanner.cpp b/hgdriver/hgdev/hg_scanner.cpp index 257094c..e46c7fb 100644 --- a/hgdriver/hgdev/hg_scanner.cpp +++ b/hgdriver/hgdev/hg_scanner.cpp @@ -182,6 +182,7 @@ void hg_scanner::init(void) scanner_->set_status_notifyer(on_status); ret = scanner_->open_usb_scanner(dev_.dev); img_prc_name_[0] = "raw"; + img_prc_name_[10] = "rebuild"; if (ret == SCANNER_ERR_OK) { @@ -252,9 +253,9 @@ void hg_scanner::dump_image(image_holder_ptr img) char alg[128] = { 0 }; if (img_prc_name_.count(stage)) - sprintf(alg, "%04X_%s(%u)", stage, img_prc_name_[stage].c_str(), img->get_info()->prc_time); + sprintf(alg, "%04X_%s", stage, img_prc_name_[stage].c_str()); else - sprintf(alg, "%04X_Unk(%u)", stage, img->get_info()->prc_time); + sprintf(alg, "%04X_Unk", stage); img->save_2_file(dump_path_.c_str(), alg); } diff --git a/sdk/base/data.cpp b/sdk/base/data.cpp index 470b989..5a008b0 100644 --- a/sdk/base/data.cpp +++ b/sdk/base/data.cpp @@ -169,6 +169,7 @@ int image_holder::save_2_file(const char* root_dir, const char* alg) if (dst) fclose(dst); + utils::to_log(LOG_LEVEL_ALL, "Image-Process of file '%s' is %ums.\n", file.c_str(), head_.prc_time); return err; } diff --git a/sdk/imgprc/img_processor.h b/sdk/imgprc/img_processor.h index 038e282..5d17465 100644 --- a/sdk/imgprc/img_processor.h +++ b/sdk/imgprc/img_processor.h @@ -56,3 +56,10 @@ public: virtual int process(LPPROCIIM* in, size_t cnt, bool(*result)(LPPROCIIM, void*), void* param); }; +#define ADD_THIS_JSON() \ + { \ + std::string t(""); \ + for(auto& v: device_opt_json) \ + t += v; \ + set_opt_json_text(&t[0]); \ + }