安卓协议

This commit is contained in:
13038267101 2022-11-23 15:39:13 +08:00
parent 3a89929071
commit 6ec781a4c1
4 changed files with 21 additions and 6 deletions

View File

@ -99,6 +99,7 @@ hg_scanner::hg_scanner(ScannerSerial serial
, async_io_(false), is_white_0_(true), isremove_left_hole(false), isremove_right_hole(false), isremove_top_hole(false), isremove_low_hole(false)
, isremove_left_hole_threshold(0), isremove_right_hole_threshold(0), isremove_top_hole_threshold(0), isremove_low_hole_threshold(0)
, dump_usb_path_(""),is_kernelsnap_211209_(false), pid_(0), dump_img_(&hg_scanner::dump_image_empty), is_kernelsnap_220830_(false),is_kernelsnap3288_221106_(false)
, is_kernelsnap_221027_(false)
{
init_setting_func_map();
final_path_ = hg_log::ini_get("paths", "final_img");
@ -3384,7 +3385,8 @@ void hg_scanner::image_process(std::shared_ptr<tiny_buffer>& buffer)
(this->*dump_img_)(ImagePrc_pHandle_, "errorextention");
}
if ((img_conf_.en_fold && pid_ != 0x239 && pid_ != 0x439))
if (((img_conf_.en_fold && pid_ != 0x239 && pid_ != 0x439))
|| (!is_kernelsnap_221027_ && pid_ != 0x439 && image_prc_param_.bits.page == PAGE_FOLIO))
{
hg_imgproc::fold(ImagePrc_pHandle_);
(this->*dump_img_)(ImagePrc_pHandle_, "fold");
@ -3488,6 +3490,11 @@ int hg_scanner::image_configuration(SCANCONF& ic)
|| image_prc_param_.bits.page == PAGE_FOLIO);
ic.en_fold = (image_prc_param_.bits.page == PAGE_FOLIO);
if (!is_kernelsnap_221027_)
{
ic.en_fold = 0;
}
ic.pixtype = image_prc_param_.bits.color_mode == COLOR_MODE_AUTO_MATCH ? 2 : image_prc_param_.bits.color_mode;
ic.automaticcolor = is_auto_matic_color;
ic.automaticcolortype = 1;// ic.pixtype; //存疑
@ -3590,6 +3597,7 @@ int hg_scanner::image_configuration(SCANCONF& ic)
ic.fadebackrange = erase_bkg_range_;
ic.isuoloadexceptionimage = (double_paper_handle_ & DOUBLE_PAPER_SAVE_IMG) == DOUBLE_PAPER_SAVE_IMG;
adjust_filling_hole(&ic);
ic.fold_concatmode = fold_type_;
//多流输出优先级最高
if (is_multiout)

View File

@ -280,7 +280,7 @@ protected:
int pid_;
bool is_kernelsnap_220830_; //此版本支持待纸扫描,手动睡眠唤醒,分纸强度
bool is_kernelsnap_211209_; //获取固件版本号是否是新旧版本
bool is_kernelsnap_221027_; //此版本一下不支持拆分模式 pc实现
bool is_kernelsnap3288_221106_; //G300 3288 在221106版本支持真实dpi
SCANCONF img_conf_; //此参数外部不做任何改变请在writedown_image_configuration做修改

File diff suppressed because one or more lines are too long

View File

@ -400,8 +400,8 @@ int hg_scanner_400::writedown_device_configuration(bool type,setting_hardware::H
{
d->params_3288.pageSize = setting3288dsp::G400_AUTO;
}
//size = papersize.GetPaperSize(TwSS::A4, 200, img_conf_.paperAlign);
//d->params_3288.dstHeight = (int)((size.cy + 200) / 100); //非安卓可不需要
size = papersize.GetPaperSize(TwSS::A4, 200, img_conf_.paperAlign);
d->params_3288.dstHeight = (int)((size.cy + 200) / 100); //非安卓可不需要
USBCB usbcb = { setting3288dsp::CONFIGURED_DATA, d->value, 0 };
len = sizeof(USBCB);