From 760cfb332b3898c6cf8be9d21f7f57baaed73c28 Mon Sep 17 00:00:00 2001 From: luoliangyi <87842688@qq.com> Date: Fri, 24 Mar 2023 09:16:25 +0800 Subject: [PATCH] =?UTF-8?q?scannerlib=E7=9A=84python=20demo=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=A9=BF=E5=AD=94=E7=A7=BB=E9=99=A4=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/scannerlib/huagao/test.py | 24 ++++++++++++++++++++++++ test/scannerlib/lanxum/test.py | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/test/scannerlib/huagao/test.py b/test/scannerlib/huagao/test.py index ec6124bc..6acca66c 100644 --- a/test/scannerlib/huagao/test.py +++ b/test/scannerlib/huagao/test.py @@ -172,6 +172,30 @@ Ret = HGLib_SetDeviceParam(Device, 37, byref(DevParam)) #HGLIB_OPTION_NAME_XCHK DevParam = ctypes.c_int(54) #HGLIB_OPTION_ENUMVALUE_BJTCFS_ADBX 凸多边形 Ret = HGLib_SetDeviceParam(Device, 42, byref(DevParam)) #HGLIB_OPTION_NAME_BJTCFS 背景填充方式 +DevParam = ctypes.c_int(1) +Ret = HGLib_SetDeviceParam(Device, 45, byref(DevParam)) + +DevParam = ctypes.c_double(0.1) +Ret = HGLib_SetDeviceParam(Device, 46, byref(DevParam)) + +DevParam = ctypes.c_int(1) +Ret = HGLib_SetDeviceParam(Device, 47, byref(DevParam)) + +DevParam = ctypes.c_double(0.1) +Ret = HGLib_SetDeviceParam(Device, 48, byref(DevParam)) + +DevParam = ctypes.c_int(1) +Ret = HGLib_SetDeviceParam(Device, 49, byref(DevParam)) + +DevParam = ctypes.c_double(0.1) +Ret = HGLib_SetDeviceParam(Device, 50, byref(DevParam)) + +DevParam = ctypes.c_int(1) +Ret = HGLib_SetDeviceParam(Device, 51, byref(DevParam)) + +DevParam = ctypes.c_double(0.1) +Ret = HGLib_SetDeviceParam(Device, 52, byref(DevParam)) + #扫描事件回调 def HGLibDeviceScanEventFunc(device: c_void_p, event: c_uint, err: c_int, info: c_char_p, param: c_void_p): diff --git a/test/scannerlib/lanxum/test.py b/test/scannerlib/lanxum/test.py index 764d4c4b..eed4a667 100644 --- a/test/scannerlib/lanxum/test.py +++ b/test/scannerlib/lanxum/test.py @@ -163,6 +163,39 @@ HGLib_SetDeviceParam.restype = ctypes.c_int DevParam = ctypes.c_int(1) #HGLIB_OPTION_ENUMVALUE_DLSCLX_W -> 不进行多流输出类型 Ret = HGLib_SetDeviceParam(Device, 1, byref(DevParam)) #见HGLib_SetDeviceParam 头文件接口说明 1 -> HGLIB_OPTION_NAME_DLSC 多流输出 +DevParam = ctypes.c_int(300) +Ret = HGLib_SetDeviceParam(Device, 27, byref(DevParam)) #HGLIB_OPTION_NAME_FBL 分辨率 + +DevParam = ctypes.c_int(1) +Ret = HGLib_SetDeviceParam(Device, 37, byref(DevParam)) #HGLIB_OPTION_NAME_XCHK 消除黑框 + +DevParam = ctypes.c_int(54) #HGLIB_OPTION_ENUMVALUE_BJTCFS_ADBX 凸多边形 +Ret = HGLib_SetDeviceParam(Device, 42, byref(DevParam)) #HGLIB_OPTION_NAME_BJTCFS 背景填充方式 + +DevParam = ctypes.c_int(1) +Ret = HGLib_SetDeviceParam(Device, 45, byref(DevParam)) + +DevParam = ctypes.c_double(0.1) +Ret = HGLib_SetDeviceParam(Device, 46, byref(DevParam)) + +DevParam = ctypes.c_int(1) +Ret = HGLib_SetDeviceParam(Device, 47, byref(DevParam)) + +DevParam = ctypes.c_double(0.1) +Ret = HGLib_SetDeviceParam(Device, 48, byref(DevParam)) + +DevParam = ctypes.c_int(1) +Ret = HGLib_SetDeviceParam(Device, 49, byref(DevParam)) + +DevParam = ctypes.c_double(0.1) +Ret = HGLib_SetDeviceParam(Device, 50, byref(DevParam)) + +DevParam = ctypes.c_int(1) +Ret = HGLib_SetDeviceParam(Device, 51, byref(DevParam)) + +DevParam = ctypes.c_double(0.1) +Ret = HGLib_SetDeviceParam(Device, 52, byref(DevParam)) + #扫描事件回调 def HGLibDeviceScanEventFunc(device: c_void_p, event: c_uint, err: c_int, info: c_char_p, param: c_void_p):