From 80b9dc604f2a5b01899899a61c06e8f15fd4a2fb Mon Sep 17 00:00:00 2001 From: gb <741021719@qq.com> Date: Sun, 25 Jun 2023 11:03:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B8=A6=E5=AD=94=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E5=A4=84=E7=90=86IO=5FCTRL=5FCODE=5FGET=5FSCAN=5FWITH?= =?UTF-8?q?=5FHOLE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hgdriver/hgdev/hg_scanner.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hgdriver/hgdev/hg_scanner.cpp b/hgdriver/hgdev/hg_scanner.cpp index 07681a2..1b3b15a 100644 --- a/hgdriver/hgdev/hg_scanner.cpp +++ b/hgdriver/hgdev/hg_scanner.cpp @@ -4174,6 +4174,18 @@ int hg_scanner::device_io_control(unsigned long code, void* data, unsigned* len) strcpy((char*)data, str.c_str()); return SCANNER_ERR_OK; } + else if (code == IO_CTRL_CODE_GET_SCAN_WITH_HOLE) + { + *(SANE_Bool*)data = image_prc_param_.bits.rid_hole || isremove_left_hole || isremove_low_hole || isremove_right_hole || isremove_top_hole ? SANE_TRUE : SANE_FALSE; + return SCANNER_ERR_OK; + } + else if (code == IO_CTRL_CODE_SET_SCAN_WITH_HOLE) + { + image_prc_param_.bits.rid_hole = *(SANE_Bool*)data == SANE_TRUE; + + return SCANNER_ERR_OK; + } + return SCANNER_ERR_DEVICE_NOT_SUPPORT; } int hg_scanner::get_roller_life(void)