调整是402设备不需要矫正流程,调整固件升级流程,调整402设备阴影问题

This commit is contained in:
13038267101 2022-11-04 16:04:38 +08:00
parent 0caa028997
commit e519ff64a6
3 changed files with 15 additions and 13 deletions

View File

@ -3684,16 +3684,14 @@ void hg_scanner::image_process(std::shared_ptr<tiny_buffer>& buffer)
if ((img_conf_.filter != ColorFilter::FILTER_NONE && (img_conf_.pixtype == COLOR_MODE_BLACK_WHITE || img_conf_.pixtype == COLOR_MODE_256_GRAY)) && (pid_ != 0x239 && pid_ != 0x439)) if ((img_conf_.filter != ColorFilter::FILTER_NONE && (img_conf_.pixtype == COLOR_MODE_BLACK_WHITE || img_conf_.pixtype == COLOR_MODE_256_GRAY)) && (pid_ != 0x239 && pid_ != 0x439))
{ {
hg_imgproc::channel(ImagePrc_pHandle_); hg_imgproc::channel(ImagePrc_pHandle_);
(this->*dump_img_)(ImagePrc_pHandle_, "channel"); (this->*dump_img_)(ImagePrc_pHandle_, "filter");
} }
if (pid_ != 0x239 && pid_ != 0x439)
{ {
adjust_color(ImagePrc_pHandle_); adjust_color(ImagePrc_pHandle_); //色调曲线 普通dsp版本需要矫正颜色
(this->*dump_img_)(ImagePrc_pHandle_, "channel"); (this->*dump_img_)(ImagePrc_pHandle_, "adjust_color");
} }
if ((img_conf_.pixtype == COLOR_MODE_24_BITS && img_conf_.hsvcorrect) && (pid_ != 0x239 && pid_ != 0x439)) if ((img_conf_.pixtype == COLOR_MODE_24_BITS && img_conf_.hsvcorrect) && (pid_ != 0x239 && pid_ != 0x439))
{ {
hg_imgproc::answerSheetFilterRed(ImagePrc_pHandle_); hg_imgproc::answerSheetFilterRed(ImagePrc_pHandle_);

View File

@ -1946,26 +1946,29 @@ int hg_scanner_239::firmware_upgrade(std::string filename)
int to_cnt = 0; int to_cnt = 0;
//暂时屏蔽 到这个位置已经能够升级成功了 后面对升级结果做下判断 //暂时屏蔽 到这个位置已经能够升级成功了 后面对升级结果做下判断
//while (to_cnt++ > 20) auto now = std::chrono::steady_clock::now();
while (std::chrono::duration<double>(std::chrono::steady_clock::now() - now).count() < 70)
{ {
/*int ret = read_register(setting3399::SR_UPDATA_MD5_RELUST, &val); int ret = read_register(setting3399::SR_UPDATA_MD5_RELUST, &val);
if (ret != SCANNER_ERR_OK) if (ret != SCANNER_ERR_OK)
{ {
return ret; return ret;
} }
if (val == 2) if (val == 2)
{ {
int ret = read_register(setting3399::SR_UPDATA_REBOOT, &val);
return ret;
} }
else if(val ==3) else if(val ==3)
{ {
int ret = read_register(setting3399::SR_UPDATA_RECOVERY, &val);
return ret;
} }
else if (true) else if (val == 6)
{ {
return false;
} }
this_thread::sleep_for(std::chrono::milliseconds(20));*/ this_thread::sleep_for(std::chrono::milliseconds(20));
} }
return ret; return ret;
} }

View File

@ -377,6 +377,7 @@ namespace hg_imgproc
{ {
if (!buffer_) if (!buffer_)
return SCANNER_ERR_NO_DATA; return SCANNER_ERR_NO_DATA;
pid_ = pid;
img_conf_ = *img_param; img_conf_ = *img_param;
param_ = *param; param_ = *param;
size_t origin = buffer_->size(); size_t origin = buffer_->size();
@ -824,7 +825,7 @@ namespace hg_imgproc
gamme.apply(mats, img_conf_.is_duplex); gamme.apply(mats, img_conf_.is_duplex);
} }
else else if(pid_ != 0x0402 && pid_ != 0x0239 && pid_ != 0x439 && pid_ != 0x0302 && pid_ != 0x0139)
{ {
if (img_conf_.brightness != 128 ||img_conf_.contrast != 4 || ((img_conf_.gamma < (1.0f - 1e-2)) || (img_conf_.gamma > (1.0f + 1e-2))) ) if (img_conf_.brightness != 128 ||img_conf_.contrast != 4 || ((img_conf_.gamma < (1.0f - 1e-2)) || (img_conf_.gamma > (1.0f + 1e-2))) )