This commit is contained in:
gb 2023-08-23 14:07:26 +08:00
commit 33d5df7b45
3 changed files with 25 additions and 2 deletions

View File

@ -691,7 +691,8 @@ namespace setting_hardware
unsigned int enableLed : 1; unsigned int enableLed : 1;
unsigned int enableSizeDetect : 1; unsigned int enableSizeDetect : 1;
unsigned int lutmode : 1; // 设置文本和照片模式, 0 - 文本1 - 照片。默认值为“0” unsigned int lutmode : 1; // 设置文本和照片模式, 0 - 文本1 - 照片。默认值为“0”
unsigned int reversed1 : 4; unsigned int moire : 1;
unsigned int reversed1 : 3;
unsigned int isCorrect : 1; //设置0 为原图1为校正后的图 unsigned int isCorrect : 1; //设置0 为原图1为校正后的图
unsigned int dstHeight : 8; unsigned int dstHeight : 8;
unsigned int reversed2 : 6; unsigned int reversed2 : 6;

View File

@ -4950,7 +4950,7 @@ void hg_scanner::image_process(std::shared_ptr<tiny_buffer>& buffer, uint32_t id
(this->*dump_img_)(ImagePrc_pHandle_, "textureRemove"); (this->*dump_img_)(ImagePrc_pHandle_, "textureRemove");
} }
if (img_conf_.removeMorr && (pid_ != 0x239 && pid_ != 0x439)) if (img_conf_.removeMorr && (pid_ != 0x239 && pid_ != 0x439) && !firmware_sup_morr_)
{ {
hg_imgproc::remove_morr(ImagePrc_pHandle_); hg_imgproc::remove_morr(ImagePrc_pHandle_);
(this->*dump_img_)(ImagePrc_pHandle_, "remove_morr"); (this->*dump_img_)(ImagePrc_pHandle_, "remove_morr");

View File

@ -88,6 +88,21 @@ hg_scanner_300::hg_scanner_300(const char* dev_name,int pid, usb_io* io) :
dsp_config.params_3288.enableLed = 1; //默认值 dsp_config.params_3288.enableLed = 1; //默认值
dsp_config.params_3288.isCorrect = 1; dsp_config.params_3288.isCorrect = 1;
initdevice(); initdevice();
std::string fv(get_firmware_version()),
sn(get_serial_num());
if (fv.empty() || sn.empty())
return;
string dev = fv.substr(0, 2);
string ver = fv.substr(2, 3);
string date = fv.substr(5, 5);
string year = fv.substr(4, 2);
string devType;
string year_date = fv.substr(4, 6);
firmware_sup_morr_ = year_date.compare("230724") >= 0 ? true : false;
#ifndef MAPPING_FUNCTION_IN_BASE #ifndef MAPPING_FUNCTION_IN_BASE
init_setting_map(setting_map_, ARRAY_SIZE(setting_map_));//优先初始化 init_setting_map(setting_map_, ARRAY_SIZE(setting_map_));//优先初始化
#endif #endif
@ -660,6 +675,13 @@ int hg_scanner_300::writedown_device_configuration(bool type,setting_hardware::H
VLOG_MINI_1(LOG_LEVEL_WARNING, "writedown_device_configuration is_quality_ is .(%d)\n", is_quality_) VLOG_MINI_1(LOG_LEVEL_WARNING, "writedown_device_configuration is_quality_ is .(%d)\n", is_quality_)
d->params_3288.dpi = 1; d->params_3288.dpi = 1;
} }
if (image_prc_param_.bits.remove_morr && firmware_sup_morr_)
{
d->params_3288.moire = true;
}
else
d->params_3288.moire = false;
if (image_prc_param_.bits.paper == PAPER_AUTO_MATCH if (image_prc_param_.bits.paper == PAPER_AUTO_MATCH
|| image_prc_param_.bits.paper == PAPER_MAX_SIZE || image_prc_param_.bits.paper == PAPER_MAX_SIZE
|| image_prc_param_.bits.paper == PAPER_MAX_SIZE_CLIP || image_prc_param_.bits.paper == PAPER_MAX_SIZE_CLIP