From 10a1704d136e026da425e82ded34a5fa01cbd462 Mon Sep 17 00:00:00 2001 From: gb <741021719@qq.com> Date: Mon, 22 Aug 2022 14:32:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=9E=E7=BB=AD=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E6=A8=A1=E5=BC=8F=E6=97=B6=EF=BC=8C=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=E5=BC=A0=E6=95=B0=E8=AE=BE=E7=BD=AEBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hgdriver/hgdev/hg_scanner_239.cpp | 5 ++++- hgdriver/hgdev/hg_scanner_302.cpp | 5 ++++- hgdriver/hgdev/hg_scanner_402.cpp | 5 ++++- hgdriver/hgdev/hg_scanner_439.cpp | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/hgdriver/hgdev/hg_scanner_239.cpp b/hgdriver/hgdev/hg_scanner_239.cpp index 7f2f273..828af58 100644 --- a/hgdriver/hgdev/hg_scanner_239.cpp +++ b/hgdriver/hgdev/hg_scanner_239.cpp @@ -891,7 +891,10 @@ int hg_scanner_239::writedown_image_configuration(void) } else { - ic.scannum = (ic.is_duplex ? scan_count_ * 2 : scan_count_); + if (scan_count_ == -1) + ic.scannum = -1; + else + ic.scannum = (ic.is_duplex ? scan_count_ * 2 : scan_count_); } ic.is_backrotate180 = image_prc_param_.bits.rotate_back_180; ic.is_dogeardetection = image_prc_param_.bits.fractate_check; diff --git a/hgdriver/hgdev/hg_scanner_302.cpp b/hgdriver/hgdev/hg_scanner_302.cpp index 19ca1fb..132378e 100644 --- a/hgdriver/hgdev/hg_scanner_302.cpp +++ b/hgdriver/hgdev/hg_scanner_302.cpp @@ -993,7 +993,10 @@ int hg_scanner_302::writedown_image_configuration(void) } else { - ic.scannum = (ic.is_duplex ? scan_count_ * 2 : scan_count_); + if (scan_count_ == -1) + ic.scannum = -1; + else + ic.scannum = (ic.is_duplex ? scan_count_ * 2 : scan_count_); } ic.is_backrotate180 = image_prc_param_.bits.rotate_back_180; ic.is_dogeardetection = image_prc_param_.bits.fractate_check; diff --git a/hgdriver/hgdev/hg_scanner_402.cpp b/hgdriver/hgdev/hg_scanner_402.cpp index a9a5696..685685f 100644 --- a/hgdriver/hgdev/hg_scanner_402.cpp +++ b/hgdriver/hgdev/hg_scanner_402.cpp @@ -998,7 +998,10 @@ int hg_scanner_402::writedown_image_configuration(void) } else { - ic.scannum = (ic.is_duplex ? scan_count_ * 2 : scan_count_); + if (scan_count_ == -1) + ic.scannum = -1; + else + ic.scannum = scan_count_; // (ic.is_duplex ? scan_count_ * 2 : scan_count_); } ic.is_backrotate180 = image_prc_param_.bits.rotate_back_180; ic.is_dogeardetection = image_prc_param_.bits.fractate_check; diff --git a/hgdriver/hgdev/hg_scanner_439.cpp b/hgdriver/hgdev/hg_scanner_439.cpp index 91fabfb..7a09688 100644 --- a/hgdriver/hgdev/hg_scanner_439.cpp +++ b/hgdriver/hgdev/hg_scanner_439.cpp @@ -863,7 +863,10 @@ int hg_scanner_439::writedown_image_configuration(void) } else { - ic.scannum = (ic.is_duplex ? scan_count_ * 2 : scan_count_); + if (scan_count_ == -1) + ic.scannum = -1; + else + ic.scannum = (ic.is_duplex ? scan_count_ * 2 : scan_count_); } ic.is_backrotate180 = image_prc_param_.bits.rotate_back_180; ic.is_dogeardetection = image_prc_param_.bits.fractate_check;