diff --git a/docs/sane-opts/color_correct.txt b/docs/sane-opts/color_correct.txt index b38c92e..6ad8928 100644 --- a/docs/sane-opts/color_correct.txt +++ b/docs/sane-opts/color_correct.txt @@ -1,27 +1,29 @@ { "clr-correct": { "cat": "imgp", - "group": "高级设置", + "group": "advance", "title": "颜色校正", "desc": "根据校正参数,调整从CIS出来的原始图像颜色", "type": "bool", "pos": 24, - "ui-pos": 10, - "auth": 0, + "ui-pos": 15, + "auth": 100, + "visible": 2, "size": 4, "cur": true, "default": true }, "lut-file": { "cat": "imgp", - "group": "高级设置", + "group": "advance", "title": "校正模板", "desc": "颜色校正使用的基准图像数据", "type": "string", "pos": 25, - "ui-pos": 11, - "auth": 0, + "ui-pos": 16, + "auth": 100, "bind": true, + "visible": 2, "size": 80, "default": { "cis-mode==彩色&&resolution>200&&resolution<400": "\/usr\/local\/huago\/Textlut300clr.bmp", diff --git a/docs/sane-opts/hardware.txt b/docs/sane-opts/hardware.txt index 9e9bd23..a946f93 100644 --- a/docs/sane-opts/hardware.txt +++ b/docs/sane-opts/hardware.txt @@ -6,8 +6,9 @@ "desc": "选择镜头色彩工作模式", "type": "string", "ui-pos": 10, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 12, "default": { "(mode.enabled&&(mode==256级灰度||mode==黑白)) || (multiout-type.enabled&&multiout-type==灰度+黑白)": "灰度", @@ -22,8 +23,9 @@ "desc": "设置镜头工作的分辨率", "type": "int", "ui-pos": 11, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "resolution>=400": 600, @@ -31,22 +33,19 @@ }, "range": [300, 600] }, - "y-dpi": { - "cat": "none", - "group": "CIS", - "title": "走纸分辨率", - "desc": "走纸方向的图像采集分辨率", + "resolution": { + "cat": "imgp", + "group": "base", + "title": "分辨率", + "desc": "设置扫描图像的分辨率", "type": "int", - "ui-pos": 13, + "pos": 9999, + "fix-id": 34840, + "ui-pos": 20, "auth": 0, - "bind": true, - "size": 4, - "default": { - "resolution>200 && resolution<400": 300, - "resolution>=400": 600, - "default": 200 - }, - "range": [200, 300, 600] + "affect": 6, + "unit": "dpi", + "size": 4 }, "cis-led": { "cat": "none", @@ -55,7 +54,8 @@ "desc": "CIS工作时,是否打开背景灯", "type": "bool", "ui-pos": 12, - "auth": 0, + "auth": 100, + "visible": 2, "size": 4, "cur": true, "default": true @@ -257,7 +257,8 @@ "desc": "CIS控制通信速率", "type": "int", "ui-pos": 20, - "auth": 0, + "auth": 100, + "visible": 2, "size": 4, "cur": 921600, "default": 921600, @@ -270,8 +271,9 @@ "desc": "采集头接受命令后的动作延迟时间", "type": "int", "ui-pos": 21, - "auth": 0, + "auth": 100, "unit": "microsec", + "visible": 2, "size": 4, "cur": 1000, "default": 1000 @@ -283,7 +285,8 @@ "desc": "采集头每一帧的采集高度", "type": "int", "ui-pos": 22, - "auth": 0, + "auth": 100, + "visible": 2, "size": 4, "cur": 12, "default": 12 @@ -295,7 +298,8 @@ "desc": "采样频率", "type": "int", "ui-pos": 23, - "auth": 0, + "auth": 100, + "visible": 2, "size": 4, "cur": 201, "default": 201 @@ -349,7 +353,8 @@ "desc": "设置走纸电机的速度,张\/分(PPM)", "type": "int", "ui-pos": 25, - "auth": 0, + "auth": 100, + "visible": 2, "size": 4, "cur": 100, "default": 100, @@ -375,7 +380,8 @@ "type": "bool", "fix-id": 34868, "ui-pos": 22, - "auth": 0, + "auth": 100, + "visible": 2, "size": 4, "cur": true, "default": true @@ -388,7 +394,8 @@ "type": "int", "fix-id": 34869, "ui-pos": 23, - "auth": 0, + "auth": 100, + "visible": 2, "size": 4, "cur": 3, "default": 3, @@ -401,14 +408,15 @@ }, "motor-ver": { "cat": "none", - "group": "关于", + "group": "about", "title": "电机驱动版本", "desc": "电机板驱动程序版本号", "type": "string", "fix-id": 34909, "ui-pos": 16, - "auth": 0, + "auth": 100, "readonly": true, + "visible": 2, "size": 24, "auto": false, "cur": "", @@ -416,13 +424,14 @@ }, "fpga-ver": { "cat": "none", - "group": "关于", + "group": "about", "title": "CIS控制器版本", "desc": "镜头参数控制驱动程序版本号", "type": "string", "ui-pos": 17, - "auth": 0, + "auth": 100, "readonly": true, + "visible": 2, "size": 24, "auto": false, "cur": "", @@ -430,14 +439,15 @@ }, "cis-len": { "cat": "base", - "group": "关于", + "group": "about", "title": "镜头长", "desc": "图像采集镜头的长度,单位为毫米(mm)", "type": "int", "ui-pos": 30, - "auth": 0, + "auth": 100, "unit": "mm", "readonly": true, + "visible": 2, "size": 4, "auto": false, "cur": 3888, @@ -450,7 +460,8 @@ "desc": "为抵抗形变,在水平方向的拉伸率", "type": "float", "ui-pos": 40, - "auth": 0, + "auth": 100, + "visible": 2, "size": 8, "auto": false, "default": { @@ -472,7 +483,8 @@ "desc": "为抵抗形变,在垂直方向的拉伸率", "type": "float", "ui-pos": 41, - "auth": 0, + "auth": 100, + "visible": 2, "size": 8, "auto": false, "default": { @@ -494,8 +506,9 @@ "desc": "FPGA最佳速率", "type": "int", "ui-pos": 42, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "auto": false, "default": { @@ -512,8 +525,9 @@ "desc": "正面红色通道的曝光强度", "type": "int", "ui-pos": 70, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 336, @@ -534,8 +548,9 @@ "desc": "正面绿色通道的曝光强度", "type": "int", "ui-pos": 71, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 336, @@ -556,8 +571,9 @@ "desc": "正面蓝色通道的曝光强度", "type": "int", "ui-pos": 72, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 336, @@ -578,8 +594,9 @@ "desc": "背面红色通道的曝光强度", "type": "int", "ui-pos": 73, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 410, @@ -600,8 +617,9 @@ "desc": "背面绿色通道的曝光强度", "type": "int", "ui-pos": 74, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 410, @@ -622,8 +640,9 @@ "desc": "背面蓝色通道的曝光强度", "type": "int", "ui-pos": 75, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 410, @@ -644,8 +663,9 @@ "desc": "正面通道1的增益量", "type": "int", "ui-pos": 90, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 170, @@ -666,8 +686,9 @@ "desc": "正面通道2的增益量", "type": "int", "ui-pos": 91, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 170, @@ -688,8 +709,9 @@ "desc": "正面通道3的增益量", "type": "int", "ui-pos": 92, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 170, @@ -710,8 +732,9 @@ "desc": "正面通道4的增益量", "type": "int", "ui-pos": 93, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 170, @@ -732,8 +755,9 @@ "desc": "正面通道5的增益量", "type": "int", "ui-pos": 94, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 170, @@ -754,8 +778,9 @@ "desc": "正面通道6的增益量", "type": "int", "ui-pos": 95, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 170, @@ -776,8 +801,9 @@ "desc": "背面通道1的增益量", "type": "int", "ui-pos": 120, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 170, @@ -798,8 +824,9 @@ "desc": "背面通道2的增益量", "type": "int", "ui-pos": 121, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 170, @@ -820,8 +847,9 @@ "desc": "背面通道3的增益量", "type": "int", "ui-pos": 122, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 170, @@ -842,8 +870,9 @@ "desc": "背面通道4的增益量", "type": "int", "ui-pos": 123, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 170, @@ -864,8 +893,9 @@ "desc": "背面通道5的增益量", "type": "int", "ui-pos": 124, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 170, @@ -886,8 +916,9 @@ "desc": "背面通道6的增益量", "type": "int", "ui-pos": 125, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 170, @@ -908,8 +939,9 @@ "desc": "正面通道1的增益补偿量", "type": "int", "ui-pos": 160, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 116, @@ -930,8 +962,9 @@ "desc": "正面通道2的增益补偿量", "type": "int", "ui-pos": 161, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 121, @@ -952,8 +985,9 @@ "desc": "正面通道3的增益补偿量", "type": "int", "ui-pos": 162, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 119, @@ -974,8 +1008,9 @@ "desc": "正面通道4的增益补偿量", "type": "int", "ui-pos": 163, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 128, @@ -996,8 +1031,9 @@ "desc": "正面通道5的增益补偿量", "type": "int", "ui-pos": 164, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 129, @@ -1018,8 +1054,9 @@ "desc": "正面通道6的增益补偿量", "type": "int", "ui-pos": 165, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 127, @@ -1040,8 +1077,9 @@ "desc": "背面通道1的增益补偿量", "type": "int", "ui-pos": 200, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 110, @@ -1062,8 +1100,9 @@ "desc": "背面通道2的增益补偿量", "type": "int", "ui-pos": 201, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 120, @@ -1084,8 +1123,9 @@ "desc": "背面通道3的增益补偿量", "type": "int", "ui-pos": 202, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 115, @@ -1106,8 +1146,9 @@ "desc": "背面通道4的增益补偿量", "type": "int", "ui-pos": 203, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 117, @@ -1128,8 +1169,9 @@ "desc": "背面通道5的增益补偿量", "type": "int", "ui-pos": 204, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 118, @@ -1150,8 +1192,9 @@ "desc": "背面通道6的增益补偿量", "type": "int", "ui-pos": 205, - "auth": 0, + "auth": 100, "bind": true, + "visible": 2, "size": 4, "default": { "cis-mode==灰度 && cis-dpi==300": 121, @@ -1172,7 +1215,8 @@ "desc": "CIS正面分段之间的相位差", "type": "int", "ui-pos": 26, - "auth": 0, + "auth": 100, + "visible": 2, "size": 4, "cur": 66, "default": 66, @@ -1189,7 +1233,8 @@ "desc": "CIS背面分段之间的相位差", "type": "int", "ui-pos": 27, - "auth": 0, + "auth": 100, + "visible": 2, "size": 4, "cur": 67, "default": 67, @@ -1198,5 +1243,19 @@ "max": 256, "step": 1 } + }, + "paper-timer": { + "cat": "base", + "group": "advance", + "title": "输出走纸时间", + "desc": "输出走纸过程中,各阶段耗时", + "type": "bool", + "pos": 50, + "ui-pos": 40, + "auth": 100, + "visible": 2, + "size": 4, + "cur": false, + "default": false } } \ No newline at end of file diff --git a/docs/sane-opts/image_encoder.txt b/docs/sane-opts/image_encoder.txt index 21d4bff..fe5cbfb 100644 --- a/docs/sane-opts/image_encoder.txt +++ b/docs/sane-opts/image_encoder.txt @@ -8,8 +8,8 @@ "ver": 1, "pos": 9900, "ui-pos": 10, - "auth": 0, - "visible": 0, + "auth": 10, + "visible": 2, "size": 16, "cur": "JPEG", "default": "JPEG", @@ -24,10 +24,10 @@ "ver": 1, "pos": 9901, "ui-pos": 11, - "auth": 0, + "auth": 10, "affect": 4, "unit": "%", - "visible": 0, + "visible": 2, "size": 4, "cur": 100, "default": 100, diff --git a/docs/sane-opts/imgprc_mgr.txt b/docs/sane-opts/imgprc_mgr.txt index e77219c..fb2c6e7 100644 --- a/docs/sane-opts/imgprc_mgr.txt +++ b/docs/sane-opts/imgprc_mgr.txt @@ -1,13 +1,14 @@ { "dump-img": { "cat": "base", - "group": "高级设置", + "group": "advance", "title": "输出中间图像", "desc": "输出各算法中间结果图像", "type": "bool", - "ui-pos": 10, - "auth": 0, + "ui-pos": 20, + "auth": 10, "affect": 2, + "visible": 2, "size": 4, "cur": false, "default": false diff --git a/docs/sane-opts/rebuild.txt b/docs/sane-opts/rebuild.txt index 05b7222..ac3e98d 100644 --- a/docs/sane-opts/rebuild.txt +++ b/docs/sane-opts/rebuild.txt @@ -1,14 +1,14 @@ { "rebuild": { "cat": "imgp", - "group": "高级设置", + "group": "advance", "title": "CIS图像还原", "desc": "将从CIS输出的原始数据流,还原为BMP图片,并拆分正反面", "type": "bool", "pos": 10, "ui-pos": 1, - "auth": 0, - "visible": 0, + "auth": 100, + "visible": 2, "size": 4, "auto": false, "cur": true, diff --git a/docs/sane-opts/scanner_const_opts.txt b/docs/sane-opts/scanner_const_opts.txt index 69813e6..28cdb12 100644 --- a/docs/sane-opts/scanner_const_opts.txt +++ b/docs/sane-opts/scanner_const_opts.txt @@ -1,7 +1,7 @@ { "dev-vid": { "cat": "base", - "group": "关于", + "group": "about", "title": "USB-VID", "desc": "设备制造商在USB组织的ID", "type": "string", @@ -16,7 +16,7 @@ }, "dev-pid": { "cat": "base", - "group": "关于", + "group": "about", "title": "USB-PID", "desc": "设备在USB组织中的产品ID", "type": "string", @@ -31,7 +31,7 @@ }, "dev-name": { "cat": "base", - "group": "关于", + "group": "about", "title": "设备名称", "desc": "设备名称", "type": "string", @@ -41,12 +41,12 @@ "readonly": true, "size": 96, "auto": false, - "cur": "300NewTx", - "default": "300NewTx" + "cur": "HUAGOSCAN G200", + "default": "HUAGOSCAN G200" }, "dev-model": { "cat": "base", - "group": "关于", + "group": "about", "title": "产品系列", "desc": "设备所属产品系列名称", "type": "string", @@ -61,7 +61,7 @@ }, "dev-sn": { "cat": "base", - "group": "关于", + "group": "about", "title": "序列号", "desc": "设备序列号", "type": "string", @@ -77,7 +77,7 @@ }, "fmw-ver": { "cat": "base", - "group": "关于", + "group": "about", "title": "固件版本", "desc": "设备固件版本号", "type": "string", @@ -92,7 +92,7 @@ }, "roller-life": { "cat": "base", - "group": "关于", + "group": "about", "title": "滚轴寿命", "desc": "该设备滚轴过纸的最大张数", "type": "int", @@ -105,14 +105,46 @@ "cur": 450000, "default": 450000 }, + "roll-cnt": { + "cat": "base", + "group": "about", + "title": "滚轴张数", + "desc": "当前滚轴扫描张数", + "type": "int", + "fix-id": 39170, + "ui-pos": 21, + "auth": 0, + "readonly": true, + "size": 4, + "auto": false, + "ownread": true, + "cur": 0, + "default": 0 + }, + "total-cnt": { + "cat": "base", + "group": "about", + "title": "历史张数", + "desc": "该设备历史总计扫描张数", + "type": "int", + "fix-id": 34889, + "ui-pos": 22, + "auth": 0, + "readonly": true, + "size": 4, + "auto": false, + "ownread": true, + "cur": 0, + "default": 0 + }, "ip-addr": { "cat": "base", - "group": "关于", + "group": "about", "title": "IP", "desc": "设备联网时所分配的IP地址", "type": "string", "fix-id": 34904, - "ui-pos": 21, + "ui-pos": 30, "auth": 0, "readonly": true, "size": 96, @@ -123,12 +155,12 @@ }, "mac-addr": { "cat": "base", - "group": "关于", + "group": "about", "title": "MAC", "desc": "设备网卡地址", "type": "string", "fix-id": 34905, - "ui-pos": 22, + "ui-pos": 31, "auth": 0, "readonly": true, "size": 96, @@ -137,4 +169,4 @@ "cur": "0", "default": "0" } -} +} \ No newline at end of file diff --git a/docs/sane-opts/user.txt b/docs/sane-opts/user.txt index be6ac23..0ac4cb7 100644 --- a/docs/sane-opts/user.txt +++ b/docs/sane-opts/user.txt @@ -1,12 +1,26 @@ { + "login-hint": { + "cat": "none", + "group": "user", + "title": "登录提示", + "desc": "登录帐户提示", + "type": "string", + "ui-pos": 10, + "auth": 0, + "readonly": true, + "size": 32, + "ownread": true, + "cur": "", + "default": "" + }, "user-name": { "cat": "none", - "group": "用户", + "group": "user", "title": "用户名", "desc": "登录用户账号", "type": "string", "fix-id": 39173, - "ui-pos": 10, + "ui-pos": 15, "auth": 0, "size": 32, "cur": "", @@ -14,12 +28,12 @@ }, "user-pwd": { "cat": "none", - "group": "用户", + "group": "user", "title": "密码", "desc": "登录用户账号密码", "type": "string", "fix-id": 39174, - "ui-pos": 11, + "ui-pos": 16, "auth": 0, "size": 32, "cur": "", @@ -27,7 +41,7 @@ }, "login": { "cat": "none", - "group": "用户", + "group": "user", "title": "登录", "desc": "用户登录", "type": "button", @@ -40,7 +54,7 @@ }, "logout": { "cat": "none", - "group": "用户", + "group": "user", "title": "注销", "desc": "用户登出", "type": "button", @@ -53,17 +67,17 @@ }, "dev-sn": { "cat": "base", - "group": "关于", + "group": "about", "title": "序列号", "desc": "设备序列号", "type": "string", + "pos": 100, "fix-id": 34902, "ui-pos": 14, - "pos": 100, "auth": 0, "size": 32, "auto": false, "cur": "", "default": "" } -} +} \ No newline at end of file diff --git a/hardware/hardware.cpp b/hardware/hardware.cpp index 474a4b1..fa9fc7d 100644 --- a/hardware/hardware.cpp +++ b/hardware/hardware.cpp @@ -9,20 +9,16 @@ #include #include -// #define DBG_PRINT printf -#define DBG_PRINT no_printf ///////////////////////////////////////////////////////////////////////////////////////////////////////// // scanner_hw static std::string device_opt_json[] = { - "{\"cis-mode\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"CIS\\u989c\\u8272\\u6a21\\u5f0f\",\"desc\":\"\\u9009\\u62e9\\u955c\\u5934\\u8272\\u5f69\\u5de5\\u4f5c\\u6a21\\u5f0f\",\"type\":\"string\",\"ui-pos\":10,\"auth\":0,\"bind\":true,\"size\":12,\"default\":{\"(mode.enabled&&(mode==256\\u7ea7\\u7070\\u5ea6||mode==\\u9ed1\\u767d)) || (multiout-type.enabled&&multiout-type==\\u7070\\u5ea6+\\u9ed1\\u767d)\":\"\\u7070\\u5ea6\",\"default\":\"\\u5f69\\u8272\"},\"range\":[\"\\u5f69\\u8272\",\"\\u7070\\u5ea6\"]},\"cis-dpi\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"CIS\\u5206\\u8fa8\\u7387\",\"desc\":\"\\u8bbe\\u7f6e\\u955c\\u5934\\u5de5\\u4f5c\\u7684\\u5206\\u8fa8\\u7387\",\"type\":\"int\",\"ui-pos\":11,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"resolution>=400\":600,\"default\":300},\"range\":[300,600]},\"y-dpi\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u8d70\\u7eb8\\u5206\\u8fa8\\u7387\",\"desc\":\"\\u8d70\\u7eb8\\u65b9\\u5411\\u7684\\u56fe\\u50cf\\u91c7\\u96c6\\u5206\\u8fa8\\u7387\",\"type\":\"int\",\"ui-pos\":13,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"resolution>200 && resolution<400\":300,\"resolution>=400\":600,\"default\":200},\"range\":[200,300,600]},\"cis-led\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"CIS\\u706f\",\"desc\":\"CIS\\u5de5\\u4f5c\\u65f6\\uff0c\\u662f\\u5426\\u6253\\u5f00\\u80cc\\u666f\\u706f\",\"type\":\"bool\",\"ui-pos\":12,\"auth\":0,\"size\":4,\"cur\":true,\"default\":true},\"paper\":{\"cat\":\"base\",\"group\":\"base\",\"title\":\"\\u7eb8\\u5f20\\u5c3a\\u5bf8\",\"desc\":\"\\u8bbe\\u7f6e\\u51fa\\u56fe\\u5927\\u5c0f\",\"type\":\"string\",\"fix-id\":34831,\"ui-pos\":30,\"auth\":0,\"size\":44,\"cur\":\"\\u5339\\u914d\\u539f\\u59cb\\u5c3a\\u5bf8\",\"default\":\"\\u5339\\u914d\\u539f\\u59cb\\u5c3a\\u5bf8\",\"range\":[\"A3\",\"8\\u5f00\",\"A4\",\"16\\u5f00\",\"A5\",\"A6\",\"B4\",\"B5\",\"B6\",\"Letter\",\"Double Letter\",\"LEGAL\",\"\\u5339\\u914d\\u539f\\u59cb\\u5c3a\\u5bf8\",{\"resolution<500\":\"\\u6700\\u5927\\u626b\\u63cf\\u5c3a\\u5bf8\\u81ea\\u52a8\\u88c1\\u5207\"},{\"resolution<500\":\"\\u6700\\u5927\\u626b\\u63cf\\u5c3a\\u5bf8\"},{\"resolution<500\":\"\\u4e09\\u8054\\u8bd5\\u5377\"}]},\"lateral\":{\"cat\":\"base\",\"group\":\"base\",\"title\":\"\\u6a2a\\u5411\",\"desc\":\"\\u6a2a\\u5411\\u653e\\u7f6e\\u7eb8\\u5f20\",\"type\":\"bool\",\"fix-id\":34924,\"ui-pos\":31,\"auth\":0,\"affect\":6,\"visible\":0,\"size\":4,\"cur\":false,\"default\":false,\"depend\":\"paper==A4 || paper==16\\u5f00 || paper==A5 || paper==A6 || paper==B5 || paper==B6 || paper==Letter\"},\"paper-w\":{\"cat\":\"base\",\"group\":\"base\",\"title\":\"\\u7eb8\\u5f20\\u5bbd\\u5ea6\",\"desc\":\"\\u4ee5\\u6beb\\u7c73\\u4e3a\\u5355\\u4f4d\\u7684\\u7eb8\\u5f20\\u5bbd\",\"type\":\"float\",\"fix-id\":34922,\"ui-pos\":32,\"auth\":0,\"unit\":\"mm\",\"readonly\":true,\"visible\":0,\"size\":8,\"auto\":false,\"ownread\":true,\"cur\":210.000000,\"default\":210.000000},\"paper-h\":{\"cat\":\"base\",\"group\":\"base\",\"title\":\"\\u7eb8\\u5f20\\u9ad8\\u5ea6\",\"desc\":\"\\u4ee5\\u6beb\\u7c73\\u4e3a\\u5355\\u4f4d\\u7684\\u7eb8\\u5f20\\u9ad8\",\"type\":\"float\",\"fix-id\":34923,\"ui-pos\":33,\"auth\":0,\"unit\":\"mm\",\"readonly\":true,\"visible\":0,\"size\":8,\"auto\":false,\"ownread\":true,\"cur\":297.000000,\"default\":297.000000},\"is-wait-scan\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\"\\u5f85\\u7eb8\\u626b\\u63cf\",\"desc\":\"\\u542f\\u7528\\u540e\\uff0c\\u6587\\u7a3f\\u653e\\u5165\\u626b\\u63cf\\u4eea\\u65f6\\u5c06\\u81ea\\u52a8\\u542f\\u52a8\\u626b\\u63cf\",\"type\":\"bool\",\"fix-id\":34873,\"ui-pos\":12,\"auth\":0,\"size\":4,\"cur\":false,\"default\":false},\"wait-scan-exit\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\"\\u5f85\\u7eb8\\u626b\\u63cf\\u9000\\u51fa\\u65f6\\u95f4\",\"desc\":\"\\u8bbe\\u7f6e\\u7ed3\\u675f\\u5f85\\u7eb8\\u626b\\u63cf\\u7684\\u65f6\\u95f4\",\"type\":\"string\",\"fix-id\":34920,\"ui-pos\":13,\"auth\":0,\"size\":16,\"cur\":\"60s\",\"default\":\"60s\",\"range\":[\"15s\",\"30s\",\"60s\",\"2min\",\"4min\",\"8min\"],\"depend\":\"is-wait-scan==true\"},\"scan-mode\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\"\\u626b\\u63cf\\u5f20\\u6570\",\"desc\":\"\\u9009\\u62e9\\u6307\\u5b9a\\u6570\\u91cf\\u626b\\u63cf\\u6216\\u8fde\\u7eed\\u626b\\u63cf\",\"type\":\"string\",\"fix-id\":34862,\"ui-pos\":15,\"auth\":0,\"size\":24,\"cur\":\"\\u8fde\\u7eed\\u626b\\u63cf\",\"default\":\"\\u8fde\\u7eed\\u626b\\u63cf\",\"range\":[\"\\u8fde\\u7eed\\u626b\\u63cf\",\"\\u626b\\u63cf\\u6307\\u5b9a\\u5f20\\u6570\"],\"depend\":\"is-wait-scan==false\"},\"scan-count\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\" \\u626b\\u63cf\\u6570\\u91cf\",\"desc\":\"\\u626b\\u63cf\\u6307\\u5b9a\\u6570\\u91cf\",\"type\":\"int\",\"fix-id\":34863,\"ui-pos\":16,\"auth\":0,\"size\":4,\"cur\":-1,\"default\":-1,\"depend\":\"scan-mode.enabled&&scan-mode==\\u626b\\u63cf\\u6307\\u5b9a\\u5f20\\u6570\"},\"is-auto-strength\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\"\\u81ea\\u52a8\\u5206\\u7eb8\\u5f3a\\u5ea6\",\"desc\":\"\\u626b\\u63cf\\u4eea\\u81ea\\u52a8\\u4fee\\u6b63\\u5206\\u7eb8\\u529b\\u5ea6\",\"type\":\"bool\",\"fix-id\":34876,\"ui-pos\":27,\"auth\":0,\"size\":4,\"cur\":false,\"default\":false},\"feed-strength-value\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\" \\u8fdb\\u7eb8\\u5931\\u8d25\\u7387\",\"desc\":\"\\u9ad8\\u4e8e\\u8be5\\u503c\\u65f6\\u626b\\u63cf\\u4eea\\u5c06\\u8c03\\u6574\\u5206\\u7eb8\\u529b\\u5ea6\",\"type\":\"float\",\"fix-id\":34877,\"ui-pos\":28,\"auth\":0,\"size\":8,\"cur\":0.000000,\"default\":0.000000,\"range\":{\"min\":0.100000,\"max\":0.900000,\"step\":0.080000},\"depend\":\"is-auto-strength==true\"},\"feed-strength\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\"\\u5206\\u7eb8\\u5f3a\\u5ea6\",\"desc\":\"\\u8bbe\\u7f6e\\u626b\\u63cf\\u4eea\\u7684\\u5206\\u7eb8\\u529b\\u5ea6\",\"type\":\"string\",\"fix-id\":34874,\"ui-pos\":30,\"auth\":0,\"size\":12,\"cur\":\"\\u4e00\\u822c\",\"default\":\"\\u4e00\\u822c\",\"range\":[\"\\u5f31\",\"\\u4e00\\u822c\",\"\\u5f3a\"],\"depend\":\"is-auto-strength!=true\"},\"time-to-sleep\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\"\\u4f11\\u7720\\u65f6\\u95f4\",\"desc\":\"\\u8bbe\\u7f6e\\u626b\\u63cf\\u4eea\\u7684\\u4f11\\u7720\\u65f6\\u95f4\",\"type\":\"string\",\"fix-id\":34875,\"ui-pos\":33,\"auth\":0,\"size\":16,\"cur\":\"\\u4e0d\\u4f11\\u7720\",\"default\":\"\\u4e0d\\u4f11\\u7720\",\"range\":[\"\\u4e0d\\u4f11\\u7720\",\"\\u4e94\\u5206\\u949f\",\"\\u5341\\u5206\\u949f\",\"\\u534a\\u5c0f\\u65f6\",\"\\u4e00\\u5c0f\\u65f6\",\"\\u4e24\\u5c0f\\u65f6\",\"\\u56db\\u5c0f\\u65f6\"]},\"baud\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u6ce2\\u7279\\u7387\",\"desc\":\"CIS\\u63a7\\u5236\\u901a\\u4fe1\\u901f\\u7387\",\"type\":\"int\",\"ui-pos\":20,\"auth\":0,\"size\":4,\"cur\":921600,\"default\":921600,\"range\":[110,300,600,1200,2400,4800,9600,19200,38400,57600,115200,500000,921600,1500000]},\"act-after\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u5ef6\\u8fdf\\u54cd\\u5e94\",\"desc\":\"\\u91c7\\u96c6\\u5934\\u63a5\\u53d7\\u547d\\u4ee4\\u540e\\u7684\\u52a8\\u4f5c\\u5ef6\\u8fdf\\u65f6\\u95f4\",\"type\":\"int\",\"ui-pos\":21,\"auth\":0,\"unit\":\"microsec\",\"size\":4,\"cur\":1000,\"default\":1000},\"frame-h\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u5e27\\u9ad8\\u5ea6\",\"desc\":\"\\u91c7\\u96c6\\u5934\\u6bcf\\u4e00\\u5e27\\u7684\\u91c7\\u96c6\\u9ad8\\u5ea6\",\"type\":\"int\",\"ui-pos\":22,\"auth\":0,\"size\":4,\"cur\":12,\"default\":12},\"sample\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u91c7\\u6837\\u9891\\u7387\",\"desc\":\"\\u91c7\\u6837\\u9891\\u7387\",\"type\":\"int\",\"ui-pos\":23,\"auth\":0,\"size\":4,\"cur\":201,\"default\":201},\"paper-on\":{\"cat\":\"none\",\"group\":\"feeder\",\"title\":\"\\u7eb8\\u5f20\\u5c31\\u7eea\",\"desc\":\"\\u7eb8\\u5f20\\u5df2\\u7ecf\\u5728\\u8fdb\\u7eb8\\u53f0\\u4e0a\\u653e\\u7f6e\\u597d\",\"type\":\"bool\",\"fix-id\":34912,\"ui-pos\":10,\"auth\":0,\"readonly\":true,\"size\":4,\"auto\":false,\"ownread\":true,\"cur\":false,\"default\":false},\"double-chk\":{\"cat\":\"none\",\"group\":\"feeder\",\"title\":\"\\u53cc\\u5f20\\u68c0\\u6d4b\",\"desc\":\"\\u68c0\\u6d4b\\u662f\\u5426\\u6709\\u4e24\\u5f20\\u6216\\u8005\\u591a\\u5f20\\u7eb8\\u540c\\u65f6\\u6413\\u8fdb\",\"type\":\"string\",\"ui-pos\":18,\"auth\":0,\"size\":16,\"cur\":\"\\u8d85\\u58f0\\u6ce2\",\"default\":\"\\u8d85\\u58f0\\u6ce2\",\"range\":[\"\\u8d85\\u58f0\\u6ce2\",\"\\u7981\\u7528\"]},\"is-staple\":{\"cat\":\"none\",\"group\":\"feeder\",\"title\":\"\\u88c5\\u8ba2\\u68c0\\u6d4b\",\"desc\":\"\\u68c0\\u6d4b\\u662f\\u5426\\u6709\\u8ba2\\u4e66\\u9489\\u5b58\\u5728\",\"type\":\"bool\",\"fix-id\":34861,\"ui-pos\":20,\"auth\":0,\"size\":4,\"cur\":true,\"default\":true},\"motor-speed\":{\"cat\":\"none\",\"group\":\"feeder\",\"title\":\"\\u8d70\\u7eb8\\u901f\\u5ea6\",\"desc\":\"\\u8bbe\\u7f6e\\u8d70\\u7eb8\\u7535\\u673a\\u7684\\u901f\\u5ea6\\uff0c\\u5f20\\/\\u5206\\uff08PPM\\uff09\",\"type\":\"int\",\"ui-pos\":25,\"auth\":0,\"size\":4,\"cur\":100,\"default\":100,\"range\":[{\"dev-model!=G200\":70},{\"dev-model!=G200\":80},{\"dev-model!=G200\":90},100,{\"dev-model==G200\":110},{\"dev-model==G200\":120},{\"dev-model==G200\":130}]},\"is-check-askew\":{\"cat\":\"none\",\"group\":\"feeder\",\"title\":\"\\u6b6a\\u659c\\u68c0\\u6d4b\",\"desc\":\"\\u68c0\\u6d4b\\u8fdb\\u7eb8\\u662f\\u5426\\u6b6a\\u659c\",\"type\":\"bool\",\"fix-id\":34868,\"ui-pos\":22,\"auth\":0,\"size\":4,\"cur\":true,\"default\":true},\"askew-range\":{\"cat\":\"none\",\"group\":\"feeder\",\"title\":\"\\u6b6a\\u659c\\u5bb9\\u5fcd\\u5ea6\",\"desc\":\"\\u503c\\u8d8a\\u5c0f\\uff0c\\u80fd\\u5bb9\\u5fcd\\u5f97\\u9001\\u5165\\u6587\\u7a3f\\u6b6a\\u659c\\u89d2\\u5ea6\\u8d8a\\u5c0f\",\"type\":\"int\",\"fix-id\":34869,\"ui-pos\":23,\"auth\":0,\"size\":4,\"cur\":3,\"default\":3,\"range\":{\"min\":1,\"max\":7,\"step\":1},\"depend\":\"is-check-askew==true\"},\"motor-ver\":{\"cat\":\"none\",\"group\":\"\\u5173\\u4e8e\",\"title\":\"\\u7535\\u673a\\u9a71\\u52a8\\u7248\\u672c\",\"desc\":\"\\u7535\\u673a\\u677f\\u9a71\\u52a8\\u7a0b\\u5e8f\\u7248\\u672c\\u53f7\",\"type\":\"string\",\"fix-id\":34909,\"ui-pos\":16,\"auth\":0,\"readonly\":true,\"size\":24,\"auto\":false,\"cur\":\"\",\"def", - "ault\":\"\"},\"fpga-ver\":{\"cat\":\"none\",\"group\":\"\\u5173\\u4e8e\",\"title\":\"CIS\\u63a7\\u5236\\u5668\\u7248\\u672c\",\"desc\":\"\\u955c\\u5934\\u53c2\\u6570\\u63a7\\u5236\\u9a71\\u52a8\\u7a0b\\u5e8f\\u7248\\u672c\\u53f7\",\"type\":\"string\",\"ui-pos\":17,\"auth\":0,\"readonly\":true,\"size\":24,\"auto\":false,\"cur\":\"\",\"default\":\"\"},\"cis-len\":{\"cat\":\"base\",\"group\":\"\\u5173\\u4e8e\",\"title\":\"\\u955c\\u5934\\u957f\",\"desc\":\"\\u56fe\\u50cf\\u91c7\\u96c6\\u955c\\u5934\\u7684\\u957f\\u5ea6\\uff0c\\u5355\\u4f4d\\u4e3a\\u6beb\\u7c73\\uff08mm\\uff09\",\"type\":\"int\",\"ui-pos\":30,\"auth\":0,\"unit\":\"mm\",\"readonly\":true,\"size\":4,\"auto\":false,\"cur\":3888,\"default\":3888},\"stretch-h\":{\"cat\":\"base\",\"group\":\"CIS\",\"title\":\"\\u6c34\\u5e73\\u62c9\\u4f38\\u7387\",\"desc\":\"\\u4e3a\\u62b5\\u6297\\u5f62\\u53d8\\uff0c\\u5728\\u6c34\\u5e73\\u65b9\\u5411\\u7684\\u62c9\\u4f38\\u7387\",\"type\":\"float\",\"ui-pos\":40,\"auth\":0,\"size\":8,\"auto\":false,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":1.000000,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":1.000000,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":1.000000,\"default\":1.000000},\"range\":{\"min\":0.500000,\"max\":2.000000,\"step\":0.100000}},\"stretch-v\":{\"cat\":\"base\",\"group\":\"CIS\",\"title\":\"\\u5782\\u76f4\\u62c9\\u4f38\\u7387\",\"desc\":\"\\u4e3a\\u62b5\\u6297\\u5f62\\u53d8\\uff0c\\u5728\\u5782\\u76f4\\u65b9\\u5411\\u7684\\u62c9\\u4f38\\u7387\",\"type\":\"float\",\"ui-pos\":41,\"auth\":0,\"size\":8,\"auto\":false,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":1.000000,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":1.000000,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":1.000000,\"default\":1.000000},\"range\":{\"min\":0.500000,\"max\":2.000000,\"step\":0.100000}},\"cis-sp\":{\"cat\":\"base\",\"group\":\"CIS\",\"title\":\"\\u901f\\u73871\",\"desc\":\"FPGA\\u6700\\u4f73\\u901f\\u7387\",\"type\":\"int\",\"ui-pos\":42,\"auth\":0,\"bind\":true,\"size\":4,\"auto\":false,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":2637,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":1531,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":4595,\"default\":816}},\"expo-fr\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u66dd\\u5149\\u5ea6\\uff08\\u6b63\\u9762\\u7ea2\\u8272\\u901a\\u9053\\uff09\",\"desc\":\"\\u6b63\\u9762\\u7ea2\\u8272\\u901a\\u9053\\u7684\\u66dd\\u5149\\u5f3a\\u5ea6\",\"type\":\"int\",\"ui-pos\":70,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":336,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":622,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":673,\"default\":313},\"range\":{\"min\":1,\"max\":1100,\"step\":1}},\"expo-fg\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u66dd\\u5149\\u5ea6\\uff08\\u6b63\\u9762\\u7eff\\u8272\\u901a\\u9053\\uff09\",\"desc\":\"\\u6b63\\u9762\\u7eff\\u8272\\u901a\\u9053\\u7684\\u66dd\\u5149\\u5f3a\\u5ea6\",\"type\":\"int\",\"ui-pos\":71,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":336,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":611,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":673,\"default\":306},\"range\":{\"min\":1,\"max\":1100,\"step\":1}},\"expo-fb\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u66dd\\u5149\\u5ea6\\uff08\\u6b63\\u9762\\u84dd\\u8272\\u901a\\u9053\\uff09\",\"desc\":\"\\u6b63\\u9762\\u84dd\\u8272\\u901a\\u9053\\u7684\\u66dd\\u5149\\u5f3a\\u5ea6\",\"type\":\"int\",\"ui-pos\":72,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":336,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":590,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":673,\"default\":297},\"range\":{\"min\":1,\"max\":1100,\"step\":1}},\"expo-br\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u66dd\\u5149\\u5ea6\\uff08\\u80cc\\u9762\\u7ea2\\u8272\\u901a\\u9053\\uff09\",\"desc\":\"\\u80cc\\u9762\\u7ea2\\u8272\\u901a\\u9053\\u7684\\u66dd\\u5149\\u5f3a\\u5ea6\",\"type\":\"int\",\"ui-pos\":73,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":410,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":713,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":811,\"default\":360},\"range\":{\"min\":1,\"max\":1100,\"step\":1}},\"expo-bg\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u66dd\\u5149\\u5ea6\\uff08\\u80cc\\u9762\\u7eff\\u8272\\u901a\\u9053\\uff09\",\"desc\":\"\\u80cc\\u9762\\u7eff\\u8272\\u901a\\u9053\\u7684\\u66dd\\u5149\\u5f3a\\u5ea6\",\"type\":\"int\",\"ui-pos\":74,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":410,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":758,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":811,\"default\":380},\"range\":{\"min\":1,\"max\":1100,\"step\":1}},\"expo-bb\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u66dd\\u5149\\u5ea6\\uff08\\u80cc\\u9762\\u84dd\\u8272\\u901a\\u9053\\uff09\",\"desc\":\"\\u80cc\\u9762\\u84dd\\u8272\\u901a\\u9053\\u7684\\u66dd\\u5149\\u5f3a\\u5ea6\",\"type\":\"int\",\"ui-pos\":75,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":410,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":722,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":811,\"default\":361},\"range\":{\"min\":1,\"max\":1100,\"step\":1}},\"gain-f-1\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u6b63\\u9762\\u901a\\u90531\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90531\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":90,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-f-2\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u6b63\\u9762\\u901a\\u90532\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90532\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":91,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-f-3\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u6b63\\u9762\\u901a\\u90533\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90533\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":92,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-f-4\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u6b63\\u9762\\u901a\\u90534\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90534\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":93,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-f-5\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u6b63\\u9762\\u901a\\u90535\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90535\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":94,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-f-6\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u6b63\\u9762\\u901a\\u90536\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90536\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":95,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-b-1\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u80cc\\u9762\\u901a\\u90531\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90531\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":120,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-b-2\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u80cc\\u9762\\u901a\\u90532\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90532\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":121,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-b-3\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u80cc\\u9762\\u901a\\u90533\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90533\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":122,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-b-4\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u80cc\\u9762\\u901a\\u90534\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90534\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":123,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-b-5\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff", - "08\\u80cc\\u9762\\u901a\\u90535\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90535\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":124,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-b-6\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u80cc\\u9762\\u901a\\u90536\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90536\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":125,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-f-1\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u6b63\\u9762\\u901a\\u90531\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90531\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":160,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":116,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":115,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":116,\"default\":113},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-f-2\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u6b63\\u9762\\u901a\\u90532\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90532\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":161,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":121,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":119,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":121,\"default\":118},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-f-3\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u6b63\\u9762\\u901a\\u90533\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90533\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":162,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":119,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":118,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":121,\"default\":118},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-f-4\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u6b63\\u9762\\u901a\\u90534\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90534\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":163,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":128,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":126,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":129,\"default\":124},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-f-5\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u6b63\\u9762\\u901a\\u90535\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90535\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":164,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":129,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":127,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":130,\"default\":126},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-f-6\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u6b63\\u9762\\u901a\\u90536\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90536\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":165,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":127,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":125,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":127,\"default\":125},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-b-1\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u80cc\\u9762\\u901a\\u90531\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90531\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":200,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":110,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":109,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":112,\"default\":109},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-b-2\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u80cc\\u9762\\u901a\\u90532\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90532\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":201,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":120,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":120,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":121,\"default\":118},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-b-3\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u80cc\\u9762\\u901a\\u90533\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90533\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":202,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":115,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":114,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":116,\"default\":114},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-b-4\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u80cc\\u9762\\u901a\\u90534\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90534\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":203,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":117,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":117,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":120,\"default\":117},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-b-5\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u80cc\\u9762\\u901a\\u90535\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90535\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":204,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":118,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":117,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":119,\"default\":116},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-b-6\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u80cc\\u9762\\u901a\\u90536\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90536\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":205,\"auth\":0,\"bind\":true,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":121,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":120,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":123,\"default\":119},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"phase-f\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u6b63\\u9762\\u76f8\\u4f4d\",\"desc\":\"CIS\\u6b63\\u9762\\u5206\\u6bb5\\u4e4b\\u95f4\\u7684\\u76f8\\u4f4d\\u5dee\",\"type\":\"int\",\"ui-pos\":26,\"auth\":0,\"size\":4,\"cur\":66,\"default\":66,\"range\":{\"min\":0,\"max\":256,\"step\":1}},\"phase-b\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u80cc\\u9762\\u76f8\\u4f4d\",\"desc\":\"CIS\\u80cc\\u9762\\u5206\\u6bb5\\u4e4b\\u95f4\\u7684\\u76f8\\u4f4d\\u5dee\",\"type\":\"int\",\"ui-pos\":27,\"auth\":0,\"size\":4,\"cur\":67,\"default\":67,\"range\":{\"min\":0,\"max\":256,\"step\":1}}}" + "{\"cis-mode\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"CIS\\u989c\\u8272\\u6a21\\u5f0f\",\"desc\":\"\\u9009\\u62e9\\u955c\\u5934\\u8272\\u5f69\\u5de5\\u4f5c\\u6a21\\u5f0f\",\"type\":\"string\",\"ui-pos\":10,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":12,\"default\":{\"(mode.enabled&&(mode==256\\u7ea7\\u7070\\u5ea6||mode==\\u9ed1\\u767d)) || (multiout-type.enabled&&multiout-type==\\u7070\\u5ea6+\\u9ed1\\u767d)\":\"\\u7070\\u5ea6\",\"default\":\"\\u5f69\\u8272\"},\"range\":[\"\\u5f69\\u8272\",\"\\u7070\\u5ea6\"]},\"cis-dpi\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"CIS\\u5206\\u8fa8\\u7387\",\"desc\":\"\\u8bbe\\u7f6e\\u955c\\u5934\\u5de5\\u4f5c\\u7684\\u5206\\u8fa8\\u7387\",\"type\":\"int\",\"ui-pos\":11,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"resolution>=400\":600,\"default\":300},\"range\":[300,600]},\"resolution\":{\"cat\":\"imgp\",\"group\":\"base\",\"title\":\"\\u5206\\u8fa8\\u7387\",\"desc\":\"\\u8bbe\\u7f6e\\u626b\\u63cf\\u56fe\\u50cf\\u7684\\u5206\\u8fa8\\u7387\",\"type\":\"int\",\"pos\":9999,\"fix-id\":34840,\"ui-pos\":20,\"auth\":0,\"affect\":6,\"unit\":\"dpi\",\"size\":4},\"cis-led\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"CIS\\u706f\",\"desc\":\"CIS\\u5de5\\u4f5c\\u65f6\\uff0c\\u662f\\u5426\\u6253\\u5f00\\u80cc\\u666f\\u706f\",\"type\":\"bool\",\"ui-pos\":12,\"auth\":100,\"visible\":2,\"size\":4,\"cur\":true,\"default\":true},\"paper\":{\"cat\":\"base\",\"group\":\"base\",\"title\":\"\\u7eb8\\u5f20\\u5c3a\\u5bf8\",\"desc\":\"\\u8bbe\\u7f6e\\u51fa\\u56fe\\u5927\\u5c0f\",\"type\":\"string\",\"fix-id\":34831,\"ui-pos\":30,\"auth\":0,\"size\":44,\"cur\":\"\\u5339\\u914d\\u539f\\u59cb\\u5c3a\\u5bf8\",\"default\":\"\\u5339\\u914d\\u539f\\u59cb\\u5c3a\\u5bf8\",\"range\":[\"A3\",\"8\\u5f00\",\"A4\",\"16\\u5f00\",\"A5\",\"A6\",\"B4\",\"B5\",\"B6\",\"Letter\",\"Double Letter\",\"LEGAL\",\"\\u5339\\u914d\\u539f\\u59cb\\u5c3a\\u5bf8\",{\"resolution<500\":\"\\u6700\\u5927\\u626b\\u63cf\\u5c3a\\u5bf8\\u81ea\\u52a8\\u88c1\\u5207\"},{\"resolution<500\":\"\\u6700\\u5927\\u626b\\u63cf\\u5c3a\\u5bf8\"},{\"resolution<500\":\"\\u4e09\\u8054\\u8bd5\\u5377\"}]},\"lateral\":{\"cat\":\"base\",\"group\":\"base\",\"title\":\"\\u6a2a\\u5411\",\"desc\":\"\\u6a2a\\u5411\\u653e\\u7f6e\\u7eb8\\u5f20\",\"type\":\"bool\",\"fix-id\":34924,\"ui-pos\":31,\"auth\":0,\"affect\":6,\"visible\":0,\"size\":4,\"cur\":false,\"default\":false,\"depend\":\"paper==A4 || paper==16\\u5f00 || paper==A5 || paper==A6 || paper==B5 || paper==B6 || paper==Letter\"},\"paper-w\":{\"cat\":\"base\",\"group\":\"base\",\"title\":\"\\u7eb8\\u5f20\\u5bbd\\u5ea6\",\"desc\":\"\\u4ee5\\u6beb\\u7c73\\u4e3a\\u5355\\u4f4d\\u7684\\u7eb8\\u5f20\\u5bbd\",\"type\":\"float\",\"fix-id\":34922,\"ui-pos\":32,\"auth\":0,\"unit\":\"mm\",\"readonly\":true,\"visible\":0,\"size\":8,\"auto\":false,\"ownread\":true,\"cur\":210.000000,\"default\":210.000000},\"paper-h\":{\"cat\":\"base\",\"group\":\"base\",\"title\":\"\\u7eb8\\u5f20\\u9ad8\\u5ea6\",\"desc\":\"\\u4ee5\\u6beb\\u7c73\\u4e3a\\u5355\\u4f4d\\u7684\\u7eb8\\u5f20\\u9ad8\",\"type\":\"float\",\"fix-id\":34923,\"ui-pos\":33,\"auth\":0,\"unit\":\"mm\",\"readonly\":true,\"visible\":0,\"size\":8,\"auto\":false,\"ownread\":true,\"cur\":297.000000,\"default\":297.000000},\"is-wait-scan\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\"\\u5f85\\u7eb8\\u626b\\u63cf\",\"desc\":\"\\u542f\\u7528\\u540e\\uff0c\\u6587\\u7a3f\\u653e\\u5165\\u626b\\u63cf\\u4eea\\u65f6\\u5c06\\u81ea\\u52a8\\u542f\\u52a8\\u626b\\u63cf\",\"type\":\"bool\",\"fix-id\":34873,\"ui-pos\":12,\"auth\":0,\"size\":4,\"cur\":false,\"default\":false},\"wait-scan-exit\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\"\\u5f85\\u7eb8\\u626b\\u63cf\\u9000\\u51fa\\u65f6\\u95f4\",\"desc\":\"\\u8bbe\\u7f6e\\u7ed3\\u675f\\u5f85\\u7eb8\\u626b\\u63cf\\u7684\\u65f6\\u95f4\",\"type\":\"string\",\"fix-id\":34920,\"ui-pos\":13,\"auth\":0,\"size\":16,\"cur\":\"60s\",\"default\":\"60s\",\"range\":[\"15s\",\"30s\",\"60s\",\"2min\",\"4min\",\"8min\"],\"depend\":\"is-wait-scan==true\"},\"scan-mode\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\"\\u626b\\u63cf\\u5f20\\u6570\",\"desc\":\"\\u9009\\u62e9\\u6307\\u5b9a\\u6570\\u91cf\\u626b\\u63cf\\u6216\\u8fde\\u7eed\\u626b\\u63cf\",\"type\":\"string\",\"fix-id\":34862,\"ui-pos\":15,\"auth\":0,\"size\":24,\"cur\":\"\\u8fde\\u7eed\\u626b\\u63cf\",\"default\":\"\\u8fde\\u7eed\\u626b\\u63cf\",\"range\":[\"\\u8fde\\u7eed\\u626b\\u63cf\",\"\\u626b\\u63cf\\u6307\\u5b9a\\u5f20\\u6570\"],\"depend\":\"is-wait-scan==false\"},\"scan-count\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\" \\u626b\\u63cf\\u6570\\u91cf\",\"desc\":\"\\u626b\\u63cf\\u6307\\u5b9a\\u6570\\u91cf\",\"type\":\"int\",\"fix-id\":34863,\"ui-pos\":16,\"auth\":0,\"size\":4,\"cur\":-1,\"default\":-1,\"depend\":\"scan-mode.enabled&&scan-mode==\\u626b\\u63cf\\u6307\\u5b9a\\u5f20\\u6570\"},\"is-auto-strength\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\"\\u81ea\\u52a8\\u5206\\u7eb8\\u5f3a\\u5ea6\",\"desc\":\"\\u626b\\u63cf\\u4eea\\u81ea\\u52a8\\u4fee\\u6b63\\u5206\\u7eb8\\u529b\\u5ea6\",\"type\":\"bool\",\"fix-id\":34876,\"ui-pos\":27,\"auth\":0,\"size\":4,\"cur\":false,\"default\":false},\"feed-strength-value\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\" \\u8fdb\\u7eb8\\u5931\\u8d25\\u7387\",\"desc\":\"\\u9ad8\\u4e8e\\u8be5\\u503c\\u65f6\\u626b\\u63cf\\u4eea\\u5c06\\u8c03\\u6574\\u5206\\u7eb8\\u529b\\u5ea6\",\"type\":\"float\",\"fix-id\":34877,\"ui-pos\":28,\"auth\":0,\"size\":8,\"cur\":0.000000,\"default\":0.000000,\"range\":{\"min\":0.100000,\"max\":0.900000,\"step\":0.080000},\"depend\":\"is-auto-strength==true\"},\"feed-strength\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\"\\u5206\\u7eb8\\u5f3a\\u5ea6\",\"desc\":\"\\u8bbe\\u7f6e\\u626b\\u63cf\\u4eea\\u7684\\u5206\\u7eb8\\u529b\\u5ea6\",\"type\":\"string\",\"fix-id\":34874,\"ui-pos\":30,\"auth\":0,\"size\":12,\"cur\":\"\\u4e00\\u822c\",\"default\":\"\\u4e00\\u822c\",\"range\":[\"\\u5f31\",\"\\u4e00\\u822c\",\"\\u5f3a\"],\"depend\":\"is-auto-strength!=true\"},\"time-to-sleep\":{\"cat\":\"base\",\"group\":\"feeder\",\"title\":\"\\u4f11\\u7720\\u65f6\\u95f4\",\"desc\":\"\\u8bbe\\u7f6e\\u626b\\u63cf\\u4eea\\u7684\\u4f11\\u7720\\u65f6\\u95f4\",\"type\":\"string\",\"fix-id\":34875,\"ui-pos\":33,\"auth\":0,\"size\":16,\"cur\":\"\\u4e0d\\u4f11\\u7720\",\"default\":\"\\u4e0d\\u4f11\\u7720\",\"range\":[\"\\u4e0d\\u4f11\\u7720\",\"\\u4e94\\u5206\\u949f\",\"\\u5341\\u5206\\u949f\",\"\\u534a\\u5c0f\\u65f6\",\"\\u4e00\\u5c0f\\u65f6\",\"\\u4e24\\u5c0f\\u65f6\",\"\\u56db\\u5c0f\\u65f6\"]},\"baud\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u6ce2\\u7279\\u7387\",\"desc\":\"CIS\\u63a7\\u5236\\u901a\\u4fe1\\u901f\\u7387\",\"type\":\"int\",\"ui-pos\":20,\"auth\":100,\"visible\":2,\"size\":4,\"cur\":921600,\"default\":921600,\"range\":[110,300,600,1200,2400,4800,9600,19200,38400,57600,115200,500000,921600,1500000]},\"act-after\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u5ef6\\u8fdf\\u54cd\\u5e94\",\"desc\":\"\\u91c7\\u96c6\\u5934\\u63a5\\u53d7\\u547d\\u4ee4\\u540e\\u7684\\u52a8\\u4f5c\\u5ef6\\u8fdf\\u65f6\\u95f4\",\"type\":\"int\",\"ui-pos\":21,\"auth\":100,\"unit\":\"microsec\",\"visible\":2,\"size\":4,\"cur\":1000,\"default\":1000},\"frame-h\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u5e27\\u9ad8\\u5ea6\",\"desc\":\"\\u91c7\\u96c6\\u5934\\u6bcf\\u4e00\\u5e27\\u7684\\u91c7\\u96c6\\u9ad8\\u5ea6\",\"type\":\"int\",\"ui-pos\":22,\"auth\":100,\"visible\":2,\"size\":4,\"cur\":12,\"default\":12},\"sample\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u91c7\\u6837\\u9891\\u7387\",\"desc\":\"\\u91c7\\u6837\\u9891\\u7387\",\"type\":\"int\",\"ui-pos\":23,\"auth\":100,\"visible\":2,\"size\":4,\"cur\":201,\"default\":201},\"paper-on\":{\"cat\":\"none\",\"group\":\"feeder\",\"title\":\"\\u7eb8\\u5f20\\u5c31\\u7eea\",\"desc\":\"\\u7eb8\\u5f20\\u5df2\\u7ecf\\u5728\\u8fdb\\u7eb8\\u53f0\\u4e0a\\u653e\\u7f6e\\u597d\",\"type\":\"bool\",\"fix-id\":34912,\"ui-pos\":10,\"auth\":0,\"readonly\":true,\"size\":4,\"auto\":false,\"ownread\":true,\"cur\":false,\"default\":false},\"double-chk\":{\"cat\":\"none\",\"group\":\"feeder\",\"title\":\"\\u53cc\\u5f20\\u68c0\\u6d4b\",\"desc\":\"\\u68c0\\u6d4b\\u662f\\u5426\\u6709\\u4e24\\u5f20\\u6216\\u8005\\u591a\\u5f20\\u7eb8\\u540c\\u65f6\\u6413\\u8fdb\",\"type\":\"string\",\"ui-pos\":18,\"auth\":0,\"size\":16,\"cur\":\"\\u8d85\\u58f0\\u6ce2\",\"default\":\"\\u8d85\\u58f0\\u6ce2\",\"range\":[\"\\u8d85\\u58f0\\u6ce2\",\"\\u7981\\u7528\"]},\"is-staple\":{\"cat\":\"none\",\"group\":\"feeder\",\"title\":\"\\u88c5\\u8ba2\\u68c0\\u6d4b\",\"desc\":\"\\u68c0\\u6d4b\\u662f\\u5426\\u6709\\u8ba2\\u4e66\\u9489\\u5b58\\u5728\",\"type\":\"bool\",\"fix-id\":34861,\"ui-pos\":20,\"auth\":0,\"size\":4,\"cur\":true,\"default\":true},\"motor-speed\":{\"cat\":\"none\",\"group\":\"feeder\",\"title\":\"\\u8d70\\u7eb8\\u901f\\u5ea6\",\"desc\":\"\\u8bbe\\u7f6e\\u8d70\\u7eb8\\u7535\\u673a\\u7684\\u901f\\u5ea6\\uff0c\\u5f20\\/\\u5206\\uff08PPM\\uff09\",\"type\":\"int\",\"ui-pos\":25,\"auth\":100,\"visible\":2,\"size\":4,\"cur\":100,\"default\":100,\"range\":[{\"dev-model!=G200\":70},{\"dev-model!=G200\":80},{\"dev-model!=G200\":90},100,{\"dev-model==G200\":110},{\"dev-model==G200\":120},{\"dev-model==G200\":130}]},\"is-check-askew\":{\"cat\":\"none\",\"group\":\"feeder\",\"title\":\"\\u6b6a\\u659c\\u68c0\\u6d4b\",\"desc\":\"\\u68c0\\u6d4b\\u8fdb\\u7eb8\\u662f\\u5426\\u6b6a\\u659c\",\"type\":\"bool\",\"fix-id\":34868,\"ui-pos\":22,\"auth\":100,\"visible\":2,\"size\":4,\"cur\":true,\"default\":true},\"askew-range\":{\"cat\":\"none\",\"group\":\"feeder\",\"title\":\"\\u6b6a\\u659c\\u5bb9\\u5fcd\\u5ea6\",\"desc\":\"\\u503c\\u8d8a\\u5c0f\\uff0c\\u80fd\\u5bb9\\u5fcd\\u5f97\\u9001\\u5165\\u6587\\u7a3f\\u6b6a\\u659c\\u89d2\\u5ea6\\u8d8a\\u5c0f\",\"type\":\"int\",\"fix-id\":34869,\"ui-pos\":23,\"auth\":100,\"visible\":2,\"size\":4,\"cur\":3,\"default\":3,\"range\":{\"min\":1,\"max\":7,\"step\":1},\"depend\":\"is-check-askew==true\"},\"motor-ver\":{\"cat\":\"none\",\"group\":\"about\",\"title\":\"\\u7535\\u673a\\u9a71\\u52a8\\u7248\\u672c\",\"desc\":\"\\u7535\\u673a\\u677f\\u9a71\\u52a8\\u7a0b\\u5e8f\\u7248\\u672c\\u53f7\",\"type\":\"string\",\"fix-id\":34909,\"ui-pos\":16,\"auth\":100,\"rea", + "donly\":true,\"visible\":2,\"size\":24,\"auto\":false,\"cur\":\"\",\"default\":\"\"},\"fpga-ver\":{\"cat\":\"none\",\"group\":\"about\",\"title\":\"CIS\\u63a7\\u5236\\u5668\\u7248\\u672c\",\"desc\":\"\\u955c\\u5934\\u53c2\\u6570\\u63a7\\u5236\\u9a71\\u52a8\\u7a0b\\u5e8f\\u7248\\u672c\\u53f7\",\"type\":\"string\",\"ui-pos\":17,\"auth\":100,\"readonly\":true,\"visible\":2,\"size\":24,\"auto\":false,\"cur\":\"\",\"default\":\"\"},\"cis-len\":{\"cat\":\"base\",\"group\":\"about\",\"title\":\"\\u955c\\u5934\\u957f\",\"desc\":\"\\u56fe\\u50cf\\u91c7\\u96c6\\u955c\\u5934\\u7684\\u957f\\u5ea6\\uff0c\\u5355\\u4f4d\\u4e3a\\u6beb\\u7c73\\uff08mm\\uff09\",\"type\":\"int\",\"ui-pos\":30,\"auth\":100,\"unit\":\"mm\",\"readonly\":true,\"visible\":2,\"size\":4,\"auto\":false,\"cur\":3888,\"default\":3888},\"stretch-h\":{\"cat\":\"base\",\"group\":\"CIS\",\"title\":\"\\u6c34\\u5e73\\u62c9\\u4f38\\u7387\",\"desc\":\"\\u4e3a\\u62b5\\u6297\\u5f62\\u53d8\\uff0c\\u5728\\u6c34\\u5e73\\u65b9\\u5411\\u7684\\u62c9\\u4f38\\u7387\",\"type\":\"float\",\"ui-pos\":40,\"auth\":100,\"visible\":2,\"size\":8,\"auto\":false,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":1.000000,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":1.000000,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":1.000000,\"default\":1.000000},\"range\":{\"min\":0.500000,\"max\":2.000000,\"step\":0.100000}},\"stretch-v\":{\"cat\":\"base\",\"group\":\"CIS\",\"title\":\"\\u5782\\u76f4\\u62c9\\u4f38\\u7387\",\"desc\":\"\\u4e3a\\u62b5\\u6297\\u5f62\\u53d8\\uff0c\\u5728\\u5782\\u76f4\\u65b9\\u5411\\u7684\\u62c9\\u4f38\\u7387\",\"type\":\"float\",\"ui-pos\":41,\"auth\":100,\"visible\":2,\"size\":8,\"auto\":false,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":1.000000,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":1.000000,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":1.000000,\"default\":1.000000},\"range\":{\"min\":0.500000,\"max\":2.000000,\"step\":0.100000}},\"cis-sp\":{\"cat\":\"base\",\"group\":\"CIS\",\"title\":\"\\u901f\\u73871\",\"desc\":\"FPGA\\u6700\\u4f73\\u901f\\u7387\",\"type\":\"int\",\"ui-pos\":42,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"auto\":false,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":2637,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":1531,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":4595,\"default\":816}},\"expo-fr\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u66dd\\u5149\\u5ea6\\uff08\\u6b63\\u9762\\u7ea2\\u8272\\u901a\\u9053\\uff09\",\"desc\":\"\\u6b63\\u9762\\u7ea2\\u8272\\u901a\\u9053\\u7684\\u66dd\\u5149\\u5f3a\\u5ea6\",\"type\":\"int\",\"ui-pos\":70,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":336,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":622,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":673,\"default\":313},\"range\":{\"min\":1,\"max\":1100,\"step\":1}},\"expo-fg\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u66dd\\u5149\\u5ea6\\uff08\\u6b63\\u9762\\u7eff\\u8272\\u901a\\u9053\\uff09\",\"desc\":\"\\u6b63\\u9762\\u7eff\\u8272\\u901a\\u9053\\u7684\\u66dd\\u5149\\u5f3a\\u5ea6\",\"type\":\"int\",\"ui-pos\":71,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":336,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":611,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":673,\"default\":306},\"range\":{\"min\":1,\"max\":1100,\"step\":1}},\"expo-fb\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u66dd\\u5149\\u5ea6\\uff08\\u6b63\\u9762\\u84dd\\u8272\\u901a\\u9053\\uff09\",\"desc\":\"\\u6b63\\u9762\\u84dd\\u8272\\u901a\\u9053\\u7684\\u66dd\\u5149\\u5f3a\\u5ea6\",\"type\":\"int\",\"ui-pos\":72,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":336,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":590,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":673,\"default\":297},\"range\":{\"min\":1,\"max\":1100,\"step\":1}},\"expo-br\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u66dd\\u5149\\u5ea6\\uff08\\u80cc\\u9762\\u7ea2\\u8272\\u901a\\u9053\\uff09\",\"desc\":\"\\u80cc\\u9762\\u7ea2\\u8272\\u901a\\u9053\\u7684\\u66dd\\u5149\\u5f3a\\u5ea6\",\"type\":\"int\",\"ui-pos\":73,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":410,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":713,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":811,\"default\":360},\"range\":{\"min\":1,\"max\":1100,\"step\":1}},\"expo-bg\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u66dd\\u5149\\u5ea6\\uff08\\u80cc\\u9762\\u7eff\\u8272\\u901a\\u9053\\uff09\",\"desc\":\"\\u80cc\\u9762\\u7eff\\u8272\\u901a\\u9053\\u7684\\u66dd\\u5149\\u5f3a\\u5ea6\",\"type\":\"int\",\"ui-pos\":74,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":410,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":758,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":811,\"default\":380},\"range\":{\"min\":1,\"max\":1100,\"step\":1}},\"expo-bb\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u66dd\\u5149\\u5ea6\\uff08\\u80cc\\u9762\\u84dd\\u8272\\u901a\\u9053\\uff09\",\"desc\":\"\\u80cc\\u9762\\u84dd\\u8272\\u901a\\u9053\\u7684\\u66dd\\u5149\\u5f3a\\u5ea6\",\"type\":\"int\",\"ui-pos\":75,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":410,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":722,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":811,\"default\":361},\"range\":{\"min\":1,\"max\":1100,\"step\":1}},\"gain-f-1\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u6b63\\u9762\\u901a\\u90531\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90531\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":90,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-f-2\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u6b63\\u9762\\u901a\\u90532\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90532\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":91,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-f-3\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u6b63\\u9762\\u901a\\u90533\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90533\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":92,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-f-4\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u6b63\\u9762\\u901a\\u90534\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90534\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":93,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-f-5\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u6b63\\u9762\\u901a\\u90535\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90535\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":94,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-f-6\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u6b63\\u9762\\u901a\\u90536\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90536\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":95,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-b-1\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u80cc\\u9762\\u901a\\u90531\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90531\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":120,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-b-2\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u80cc\\u9762\\u901a\\u90532\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90532\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":121,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-b-3\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u80cc\\u9762\\u901a\\u90533\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90533\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":122,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-b-4\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u80cc\\u9762\\u901a\\u90534\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90534\\u7684\\u589e\\u76ca\\u91cf", + "\",\"type\":\"int\",\"ui-pos\":123,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-b-5\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u80cc\\u9762\\u901a\\u90535\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90535\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":124,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"gain-b-6\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\uff08\\u80cc\\u9762\\u901a\\u90536\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90536\\u7684\\u589e\\u76ca\\u91cf\",\"type\":\"int\",\"ui-pos\":125,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":170,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":170,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":170,\"default\":170},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-f-1\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u6b63\\u9762\\u901a\\u90531\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90531\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":160,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":116,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":115,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":116,\"default\":113},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-f-2\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u6b63\\u9762\\u901a\\u90532\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90532\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":161,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":121,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":119,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":121,\"default\":118},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-f-3\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u6b63\\u9762\\u901a\\u90533\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90533\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":162,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":119,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":118,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":121,\"default\":118},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-f-4\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u6b63\\u9762\\u901a\\u90534\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90534\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":163,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":128,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":126,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":129,\"default\":124},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-f-5\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u6b63\\u9762\\u901a\\u90535\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90535\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":164,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":129,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":127,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":130,\"default\":126},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-f-6\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u6b63\\u9762\\u901a\\u90536\\uff09\",\"desc\":\"\\u6b63\\u9762\\u901a\\u90536\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":165,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":127,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":125,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":127,\"default\":125},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-b-1\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u80cc\\u9762\\u901a\\u90531\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90531\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":200,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":110,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":109,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":112,\"default\":109},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-b-2\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u80cc\\u9762\\u901a\\u90532\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90532\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":201,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":120,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":120,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":121,\"default\":118},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-b-3\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u80cc\\u9762\\u901a\\u90533\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90533\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":202,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":115,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":114,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":116,\"default\":114},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-b-4\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u80cc\\u9762\\u901a\\u90534\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90534\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":203,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":117,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":117,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":120,\"default\":117},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-b-5\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u80cc\\u9762\\u901a\\u90535\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90535\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":204,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":118,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":117,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":119,\"default\":116},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"off-b-6\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u589e\\u76ca\\u8865\\u507f\\uff08\\u80cc\\u9762\\u901a\\u90536\\uff09\",\"desc\":\"\\u80cc\\u9762\\u901a\\u90536\\u7684\\u589e\\u76ca\\u8865\\u507f\\u91cf\",\"type\":\"int\",\"ui-pos\":205,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":4,\"default\":{\"cis-mode==\\u7070\\u5ea6 && cis-dpi==300\":121,\"cis-mode==\\u5f69\\u8272 && cis-dpi==600\":120,\"cis-mode==\\u7070\\u5ea6 && cis-dpi==600\":123,\"default\":119},\"range\":{\"min\":1,\"max\":200,\"step\":1}},\"phase-f\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u6b63\\u9762\\u76f8\\u4f4d\",\"desc\":\"CIS\\u6b63\\u9762\\u5206\\u6bb5\\u4e4b\\u95f4\\u7684\\u76f8\\u4f4d\\u5dee\",\"type\":\"int\",\"ui-pos\":26,\"auth\":100,\"visible\":2,\"size\":4,\"cur\":66,\"default\":66,\"range\":{\"min\":0,\"max\":256,\"step\":1}},\"phase-b\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"\\u80cc\\u9762\\u76f8\\u4f4d\",\"desc\":\"CIS\\u80cc\\u9762\\u5206\\u6bb5\\u4e4b\\u95f4\\u7684\\u76f8\\u4f4d\\u5dee\",\"type\":\"int\",\"ui-pos\":27,\"auth\":100,\"visible\":2,\"size\":4,\"cur\":67,\"default\":67,\"range\":{\"min\":0,\"max\":256,\"step\":1}},\"paper-timer\":{\"cat\":\"base\",\"group\":\"advance\",\"title\":\"\\u8f93\\u51fa\\u8d70\\u7eb8\\u65f6\\u95f4\",\"desc\":\"\\u8f93\\u51fa\\u8d70\\u7eb8\\u8fc7\\u7a0b\\u4e2d\\uff0c\\u5404\\u9636\\u6bb5\\u8017\\u65f6\",\"type\":\"bool\",\"pos\":50,\"ui-pos\":40,\"auth\":100,\"visible\":2,\"size\":4,\"cur\":false,\"default\":false}}" }; -static void no_printf(const char* fmt, ...) -{} ///////////////////////////////////////////////////////////////////////////////////////////////////////// // scanner_hw @@ -55,6 +51,11 @@ scanner_hw::~scanner_hw() close(); } +int scanner_hw::empty_printf(const char* fmt, ...) +{ + return 0; +} + void scanner_hw::init(void) { std::string text(""); @@ -178,7 +179,7 @@ void scanner_hw::init(void) opt_handler_[SANE_OPT_NAME(CIS_MODE)] = m; opt_handler_[SANE_OPT_NAME(CIS_DPI)] = r; - opt_handler_[SANE_OPT_NAME(Y_DPI)] = y; + opt_handler_[SANE_OPT_NAME(RESOLUTION)] = y; opt_handler_[SANE_OPT_NAME(CIS_BAUD)] = b; opt_handler_[SANE_OPT_NAME(CIS_DELAY)] = d; opt_handler_[SANE_OPT_NAME(CIS_FRAME_H)] = f; @@ -282,6 +283,13 @@ void scanner_hw::init(void) { }; + OPT_HANDLER(papertm) + { + if(*(bool*)value) + dbg_print_ = printf; + else + dbg_print_ = &scanner_hw::empty_printf; + }; opt_handler_[SANE_OPT_NAME(IS_CHECK_STAPLE)] = staple; opt_handler_[SANE_OPT_NAME(IS_CHECK_ASKEW)] = screw; @@ -293,6 +301,7 @@ void scanner_hw::init(void) opt_handler_[SANE_OPT_NAME(SCAN_COUNT)] = cnt; opt_handler_[SANE_OPT_NAME(IS_AUTO_FEED_STRENGTH)] = afs; opt_handler_[SANE_OPT_NAME(FEED_STRENGTH_VALUE)] = ff; + opt_handler_[SANE_OPT_NAME(CIS_PAPER_TIME)] = papertm; opt_handler_[SANE_OPT_NAME(FEED_STRENGTH)] = fs; opt_handler_[SANE_OPT_NAME(TIME_TO_SLEEP)] = slp; } @@ -438,6 +447,8 @@ void scanner_hw::thread_image_capture(bool paper_ready) { motor_->clear_error(); } + else if(!scanning_) + break; } if(!waited) break; @@ -528,7 +539,7 @@ int scanner_hw::scan_one_turn(LPPACKIMAGE img, safe_fifo* cism, int* cism_c if(mem) { img_callback(mem, true, img); - DBG_PRINT("\n\t%d: to rebuild spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); + dbg_print_("\n\t%d: to rebuild spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); mem->release(); mem = nullptr; retrieve_v4l2_mem(cism, cism_cnt); @@ -538,7 +549,7 @@ int scanner_hw::scan_one_turn(LPPACKIMAGE img, safe_fifo* cism, int* cism_c ret = SCANNER_ERR_DEVICE_HD_002; words = ID_WORDS_STATUS_DEVICE_HD_002; resok = res_(TASK_CAPTURER, false, 0); - DBG_PRINT("\t%d: to check resource spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); + dbg_print_("\t%d: to check resource spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); if(!motor_->wait_event(MOTOR_BORD_EVENT_PAPER_PASSING, &ret, to_paper_out_, &fatal, &words)) { @@ -560,7 +571,7 @@ int scanner_hw::scan_one_turn(LPPACKIMAGE img, safe_fifo* cism, int* cism_c ret = SCANNER_ERR_OK; words = 0; } - DBG_PRINT("\t%d: to wait paper-out spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); + dbg_print_("\t%d: to wait paper-out spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); pass = watch.elapse_ms(); img->pos.paper_ind++; @@ -568,13 +579,13 @@ int scanner_hw::scan_one_turn(LPPACKIMAGE img, safe_fifo* cism, int* cism_c if(!count_mode_) { img->height = get_image_real_height(minh); - DBG_PRINT("\t%d: to get_image_real_height spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); + dbg_print_("\t%d: to get_image_real_height spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); size_t size = 0; int ind = -1; void* frame = camera_->read_frame(to_stream_, size, ind); - DBG_PRINT("\t%d: to read_frame spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); + dbg_print_("\t%d: to read_frame spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); if(!frame) { if(fatal != MOTOR_BORD_EVENT_SCAN_DONE) @@ -592,7 +603,7 @@ int scanner_hw::scan_one_turn(LPPACKIMAGE img, safe_fifo* cism, int* cism_c mem->set_param(cism, 0); mem->set_param((void*)(long)ind, 1); img->pos.status = hg_err_2_image_status(ret); - DBG_PRINT("\t%d: to construct dyn_mem_shared spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); + dbg_print_("\t%d: to construct dyn_mem_shared spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); #ifndef REBUILD_IN_CIS_THREAD img_handler_(mem, true, img); // (frame, ind, LPPACKIMAGE, cism, ret, pass, bool) mem->release(); @@ -607,7 +618,7 @@ int scanner_hw::scan_one_turn(LPPACKIMAGE img, safe_fifo* cism, int* cism_c #ifndef REBUILD_IN_CIS_THREAD // retrieve V4L2 memory ... retrieve_v4l2_mem(cism, cism_cnt); - DBG_PRINT("\t%d: to retrieve_v4l2_mem spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); + dbg_print_("\t%d: to retrieve_v4l2_mem spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); if(cism_cnt[0] >= camera_->get_mem_count()) { ret = SCANNER_ERR_DEVICE_CIS_OUT_OF_MEM; @@ -630,7 +641,7 @@ int scanner_hw::scan_one_turn(LPPACKIMAGE img, safe_fifo* cism, int* cism_c resok = res_(TASK_CAPTURER, true, SEC_2_MS(10)); if(resok && scanning_) { - DBG_PRINT("\t%d: to flow completed spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); + dbg_print_("\t%d: to flow completed spend %ums.\n", ++oper_index, chronograph::from_process_born() - bgn); // should check paper ready ? watch.reset(); diff --git a/hardware/hardware.h b/hardware/hardware.h index 1bbea81..514270d 100644 --- a/hardware/hardware.h +++ b/hardware/hardware.h @@ -98,6 +98,9 @@ class scanner_hw : public sane_opt_provider int to_paper_out_ = 5000; // timeout in ms of paper passed int to_stream_ = 5000; // timeout in ms of frame data can be read + static int empty_printf(const char* fmt, ...); + int (*dbg_print_)(const char* fmt, ...) = &scanner_hw::empty_printf; + void init(void); void init_version(std::string& text); void load_correct_data(std::string& text); diff --git a/imgproc/algs/color_correct.cpp b/imgproc/algs/color_correct.cpp index 83c06a4..ed4a57f 100644 --- a/imgproc/algs/color_correct.cpp +++ b/imgproc/algs/color_correct.cpp @@ -11,7 +11,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // static std::string device_opt_json[] = { - "{\"clr-correct\":{\"cat\":\"imgp\",\"group\":\"\\u9ad8\\u7ea7\\u8bbe\\u7f6e\",\"title\":\"\\u989c\\u8272\\u6821\\u6b63\",\"desc\":\"\\u6839\\u636e\\u6821\\u6b63\\u53c2\\u6570\\uff0c\\u8c03\\u6574\\u4eceCIS\\u51fa\\u6765\\u7684\\u539f\\u59cb\\u56fe\\u50cf\\u989c\\u8272\",\"type\":\"bool\",\"pos\":24,\"ui-pos\":10,\"auth\":0,\"size\":4,\"cur\":true,\"default\":true},\"lut-file\":{\"cat\":\"imgp\",\"group\":\"\\u9ad8\\u7ea7\\u8bbe\\u7f6e\",\"title\":\"\\u6821\\u6b63\\u6a21\\u677f\",\"desc\":\"\\u989c\\u8272\\u6821\\u6b63\\u4f7f\\u7528\\u7684\\u57fa\\u51c6\\u56fe\\u50cf\\u6570\\u636e\",\"type\":\"string\",\"pos\":25,\"ui-pos\":11,\"auth\":0,\"bind\":true,\"size\":80,\"default\":{\"cis-mode==\\u5f69\\u8272&&resolution>200&&resolution<400\":\"\\/usr\\/local\\/huago\\/Textlut300clr.bmp\",\"cis-mode==\\u5f69\\u8272&&resolution>=400\":\"\\/usr\\/local\\/huago\\/Textlut600clr.bmp\",\"cis-mode==\\u7070\\u5ea6&&resolution<=200\":\"\\/usr\\/local\\/huago\\/Textlut200gray.bmp\",\"cis-mode==\\u7070\\u5ea6&&resolution>200&&resolution<400\":\"\\/usr\\/local\\/huago\\/Textlut300gray.bmp\",\"cis-mode==\\u7070\\u5ea6&&resolution>=400\":\"\\/usr\\/local\\/huago\\/Textlut600gray.bmp\",\"default\":\"\\/usr\\/local\\/huago\\/Textlut200clr.bmp\"}},\"cis-mode\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"CIS\\u989c\\u8272\\u6a21\\u5f0f\",\"desc\":\"\\u9009\\u62e9\\u955c\\u5934\\u8272\\u5f69\\u5de5\\u4f5c\\u6a21\\u5f0f\",\"type\":\"string\",\"pos\":1000,\"ui-pos\":10,\"auth\":0,\"bind\":true,\"size\":12,\"default\":{\"(mode.enabled&&(mode==256\\u7ea7\\u7070\\u5ea6||mode==\\u9ed1\\u767d)) || (multiout-type.enabled&&multiout-type==\\u7070\\u5ea6+\\u9ed1\\u767d)\":\"\\u7070\\u5ea6\",\"default\":\"\\u5f69\\u8272\"},\"range\":[\"\\u5f69\\u8272\",\"\\u7070\\u5ea6\"]}}" + "{\"clr-correct\":{\"cat\":\"imgp\",\"group\":\"advance\",\"title\":\"\\u989c\\u8272\\u6821\\u6b63\",\"desc\":\"\\u6839\\u636e\\u6821\\u6b63\\u53c2\\u6570\\uff0c\\u8c03\\u6574\\u4eceCIS\\u51fa\\u6765\\u7684\\u539f\\u59cb\\u56fe\\u50cf\\u989c\\u8272\",\"type\":\"bool\",\"pos\":24,\"ui-pos\":15,\"auth\":100,\"visible\":2,\"size\":4,\"cur\":true,\"default\":true},\"lut-file\":{\"cat\":\"imgp\",\"group\":\"advance\",\"title\":\"\\u6821\\u6b63\\u6a21\\u677f\",\"desc\":\"\\u989c\\u8272\\u6821\\u6b63\\u4f7f\\u7528\\u7684\\u57fa\\u51c6\\u56fe\\u50cf\\u6570\\u636e\",\"type\":\"string\",\"pos\":25,\"ui-pos\":16,\"auth\":100,\"bind\":true,\"visible\":2,\"size\":80,\"default\":{\"cis-mode==\\u5f69\\u8272&&resolution>200&&resolution<400\":\"\\/usr\\/local\\/huago\\/Textlut300clr.bmp\",\"cis-mode==\\u5f69\\u8272&&resolution>=400\":\"\\/usr\\/local\\/huago\\/Textlut600clr.bmp\",\"cis-mode==\\u7070\\u5ea6&&resolution<=200\":\"\\/usr\\/local\\/huago\\/Textlut200gray.bmp\",\"cis-mode==\\u7070\\u5ea6&&resolution>200&&resolution<400\":\"\\/usr\\/local\\/huago\\/Textlut300gray.bmp\",\"cis-mode==\\u7070\\u5ea6&&resolution>=400\":\"\\/usr\\/local\\/huago\\/Textlut600gray.bmp\",\"default\":\"\\/usr\\/local\\/huago\\/Textlut200clr.bmp\"}},\"cis-mode\":{\"cat\":\"none\",\"group\":\"CIS\",\"title\":\"CIS\\u989c\\u8272\\u6a21\\u5f0f\",\"desc\":\"\\u9009\\u62e9\\u955c\\u5934\\u8272\\u5f69\\u5de5\\u4f5c\\u6a21\\u5f0f\",\"type\":\"string\",\"pos\":1000,\"ui-pos\":10,\"auth\":0,\"bind\":true,\"size\":12,\"default\":{\"(mode.enabled&&(mode==256\\u7ea7\\u7070\\u5ea6||mode==\\u9ed1\\u767d)) || (multiout-type.enabled&&multiout-type==\\u7070\\u5ea6+\\u9ed1\\u767d)\":\"\\u7070\\u5ea6\",\"default\":\"\\u5f69\\u8272\"},\"range\":[\"\\u5f69\\u8272\",\"\\u7070\\u5ea6\"]}}" }; diff --git a/imgproc/algs/image_encoder.cpp b/imgproc/algs/image_encoder.cpp index 9ea7eee..5c74541 100644 --- a/imgproc/algs/image_encoder.cpp +++ b/imgproc/algs/image_encoder.cpp @@ -6,7 +6,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // img_encoder static std::string device_opt_json[] = { - "{\"img-fmt\":{\"cat\":\"imgp\",\"group\":\"output\",\"title\":\"\\u56fe\\u7247\\u683c\\u5f0f\",\"desc\":\"\\u8bbe\\u5907\\u8f93\\u51fa\\u7684\\u56fe\\u7247\\u6587\\u4ef6\\u683c\\u5f0f\",\"type\":\"string\",\"ver\":1,\"pos\":9900,\"ui-pos\":10,\"auth\":0,\"visible\":0,\"size\":16,\"cur\":\"JPEG\",\"default\":\"JPEG\",\"range\":[\"JPEG\",\"PNG\",\"BMP\"]},\"jpeg-quality\":{\"cat\":\"imgp\",\"group\":\"output\",\"title\":\"JPEG\\u8d28\\u91cf\",\"desc\":\"\\u8bbe\\u7f6eJPEG\\u538b\\u7f29\\u8d28\\u91cf\\uff0c\\u8d28\\u91cf\\u8d8a\\u9ad8\\uff0c\\u538b\\u7f29\\u7387\\u8d8a\\u4f4e\",\"type\":\"int\",\"ver\":1,\"pos\":9901,\"ui-pos\":11,\"auth\":0,\"affect\":4,\"unit\":\"%\",\"visible\":0,\"size\":4,\"cur\":100,\"default\":100,\"range\":{\"min\":10,\"max\":100,\"step\":1},\"depend\":\"img-fmt==JPEG\"}}" + "{\"img-fmt\":{\"cat\":\"imgp\",\"group\":\"output\",\"title\":\"\\u56fe\\u7247\\u683c\\u5f0f\",\"desc\":\"\\u8bbe\\u5907\\u8f93\\u51fa\\u7684\\u56fe\\u7247\\u6587\\u4ef6\\u683c\\u5f0f\",\"type\":\"string\",\"ver\":1,\"pos\":9900,\"ui-pos\":10,\"auth\":10,\"visible\":2,\"size\":16,\"cur\":\"JPEG\",\"default\":\"JPEG\",\"range\":[\"JPEG\",\"PNG\",\"BMP\"]},\"jpeg-quality\":{\"cat\":\"imgp\",\"group\":\"output\",\"title\":\"JPEG\\u8d28\\u91cf\",\"desc\":\"\\u8bbe\\u7f6eJPEG\\u538b\\u7f29\\u8d28\\u91cf\\uff0c\\u8d28\\u91cf\\u8d8a\\u9ad8\\uff0c\\u538b\\u7f29\\u7387\\u8d8a\\u4f4e\",\"type\":\"int\",\"ver\":1,\"pos\":9901,\"ui-pos\":11,\"auth\":10,\"affect\":4,\"unit\":\"%\",\"visible\":2,\"size\":4,\"cur\":100,\"default\":100,\"range\":{\"min\":10,\"max\":100,\"step\":1},\"depend\":\"img-fmt==JPEG\"}}" }; diff --git a/imgproc/algs/rebuild.cpp b/imgproc/algs/rebuild.cpp index 4cad754..750af6f 100644 --- a/imgproc/algs/rebuild.cpp +++ b/imgproc/algs/rebuild.cpp @@ -8,7 +8,7 @@ static std::string device_opt_json[] = { - "{\"rebuild\":{\"cat\":\"imgp\",\"group\":\"\\u9ad8\\u7ea7\\u8bbe\\u7f6e\",\"title\":\"CIS\\u56fe\\u50cf\\u8fd8\\u539f\",\"desc\":\"\\u5c06\\u4eceCIS\\u8f93\\u51fa\\u7684\\u539f\\u59cb\\u6570\\u636e\\u6d41\\uff0c\\u8fd8\\u539f\\u4e3aBMP\\u56fe\\u7247\\uff0c\\u5e76\\u62c6\\u5206\\u6b63\\u53cd\\u9762\",\"type\":\"bool\",\"pos\":10,\"ui-pos\":1,\"auth\":0,\"visible\":0,\"size\":4,\"auto\":false,\"cur\":true,\"default\":true}}" + "{\"rebuild\":{\"cat\":\"imgp\",\"group\":\"advance\",\"title\":\"CIS\\u56fe\\u50cf\\u8fd8\\u539f\",\"desc\":\"\\u5c06\\u4eceCIS\\u8f93\\u51fa\\u7684\\u539f\\u59cb\\u6570\\u636e\\u6d41\\uff0c\\u8fd8\\u539f\\u4e3aBMP\\u56fe\\u7247\\uff0c\\u5e76\\u62c6\\u5206\\u6b63\\u53cd\\u9762\",\"type\":\"bool\",\"pos\":10,\"ui-pos\":1,\"auth\":100,\"visible\":2,\"size\":4,\"auto\":false,\"cur\":true,\"default\":true}}" }; rebuild::rebuild(bool weaker) : image_processor("rebuild") diff --git a/imgproc/imgprc_mgr.cpp b/imgproc/imgprc_mgr.cpp index 15f5989..b6eb792 100644 --- a/imgproc/imgprc_mgr.cpp +++ b/imgproc/imgprc_mgr.cpp @@ -25,7 +25,7 @@ } static std::string device_opt_json[] = { - "{\"dump-img\":{\"cat\":\"base\",\"group\":\"\\u9ad8\\u7ea7\\u8bbe\\u7f6e\",\"title\":\"\\u8f93\\u51fa\\u4e2d\\u95f4\\u56fe\\u50cf\",\"desc\":\"\\u8f93\\u51fa\\u5404\\u7b97\\u6cd5\\u4e2d\\u95f4\\u7ed3\\u679c\\u56fe\\u50cf\",\"type\":\"bool\",\"ui-pos\":10,\"auth\":0,\"affect\":2,\"size\":4,\"cur\":false,\"default\":false}}" + "{\"dump-img\":{\"cat\":\"base\",\"group\":\"advance\",\"title\":\"\\u8f93\\u51fa\\u4e2d\\u95f4\\u56fe\\u50cf\",\"desc\":\"\\u8f93\\u51fa\\u5404\\u7b97\\u6cd5\\u4e2d\\u95f4\\u7ed3\\u679c\\u56fe\\u50cf\",\"type\":\"bool\",\"ui-pos\":20,\"auth\":10,\"affect\":2,\"visible\":2,\"size\":4,\"cur\":false,\"default\":false}}" }; diff --git a/scanner/async_scanner.cpp b/scanner/async_scanner.cpp index 09d53c5..b4e9780 100644 --- a/scanner/async_scanner.cpp +++ b/scanner/async_scanner.cpp @@ -154,7 +154,6 @@ async_scanner::async_scanner() : usb_(nullptr), cfg_mgr_(nullptr), scan_id_(0) cfg_mgr_ = new device_option(true, user, on_log); utils::to_log(LOG_LEVEL_DEBUG, "OPT - initializing ...\n"); - const_opts_ = new scanner_const_opts(); user_ = new user_priv(); cfg_mgr_->add(const_opts_); @@ -294,6 +293,7 @@ dyn_mem_ptr async_scanner::handle_bulk_cmd(LPPACK_BASE pack, uint32_t* used, pac void async_scanner::init(void) { cis_ = new scanner_hw(); + const_opts_ = new scanner_const_opts(); auto uicb = [this](devui::LPMSGSTREAM pack) -> void { @@ -320,9 +320,19 @@ void async_scanner::init(void) { cis_->clean_paper_passway(); } + else if(devui::UI_CMD_GET_HISTORY_COUNT == pack->msg) + { + const_opts_->set_history_count(*(uint32_t*)pack->data); + } + else if(devui::UI_CMD_GET_ROLLER_COUNT == pack->msg) + { + const_opts_->set_roller_count(*(uint32_t*)pack->data); + } }; devui::init_ui(uicb, false); + devui::send_message(devui::UI_CMD_GET_HISTORY_COUNT); + devui::send_message(devui::UI_CMD_GET_ROLLER_COUNT); } bool async_scanner::on_energy_conservation(bool normal) { @@ -441,6 +451,11 @@ dyn_mem_ptr async_scanner::handle_set_opt(LPPACK_BASE pack, uint32_t* used, pack } cfg_ret->after_do = after; cfg_ret->val_size = val_size; + if(name == SANE_OPT_NAME(LOGIN)) + { + int priv = user_->get_current_privilege(); + memcpy(cfg_ret->data + cfg_ret->val_off, &priv, sizeof(priv)); + } BASE_PACKET_REPLY(*pk, pack->cmd + 1, pack->pack_id, err); pk->payload_len = sizeof(CFGVAL) + name.length() + 1 + cfg->max_size + 1; reply->set_len(l); diff --git a/scanner/scanner_const_opts.cpp b/scanner/scanner_const_opts.cpp index 4d34bbd..f6c73ea 100644 --- a/scanner/scanner_const_opts.cpp +++ b/scanner/scanner_const_opts.cpp @@ -3,6 +3,7 @@ #include #include #include +#include @@ -20,7 +21,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // option json: static std::string device_opt_json[] = { - "{\"dev-vid\":{\"cat\":\"base\",\"group\":\"\\u5173\\u4e8e\",\"title\":\"USB-VID\",\"desc\":\"\\u8bbe\\u5907\\u5236\\u9020\\u5546\\u5728USB\\u7ec4\\u7ec7\\u7684ID\",\"type\":\"string\",\"fix-id\":34898,\"ui-pos\":10,\"auth\":0,\"readonly\":true,\"size\":16,\"auto\":false,\"cur\":\"3072\",\"default\":\"3072\"},\"dev-pid\":{\"cat\":\"base\",\"group\":\"\\u5173\\u4e8e\",\"title\":\"USB-PID\",\"desc\":\"\\u8bbe\\u5907\\u5728USB\\u7ec4\\u7ec7\\u4e2d\\u7684\\u4ea7\\u54c1ID\",\"type\":\"string\",\"fix-id\":34899,\"ui-pos\":11,\"auth\":0,\"readonly\":true,\"size\":16,\"auto\":false,\"cur\":\"0306\",\"default\":\"0306\"},\"dev-name\":{\"cat\":\"base\",\"group\":\"\\u5173\\u4e8e\",\"title\":\"\\u8bbe\\u5907\\u540d\\u79f0\",\"desc\":\"\\u8bbe\\u5907\\u540d\\u79f0\",\"type\":\"string\",\"fix-id\":34900,\"ui-pos\":12,\"auth\":0,\"readonly\":true,\"size\":96,\"auto\":false,\"cur\":\"300NewTx\",\"default\":\"300NewTx\"},\"dev-model\":{\"cat\":\"base\",\"group\":\"\\u5173\\u4e8e\",\"title\":\"\\u4ea7\\u54c1\\u7cfb\\u5217\",\"desc\":\"\\u8bbe\\u5907\\u6240\\u5c5e\\u4ea7\\u54c1\\u7cfb\\u5217\\u540d\\u79f0\",\"type\":\"string\",\"fix-id\":34901,\"ui-pos\":13,\"auth\":0,\"readonly\":true,\"size\":96,\"auto\":false,\"cur\":\"G200\",\"default\":\"G200\"},\"dev-sn\":{\"cat\":\"base\",\"group\":\"\\u5173\\u4e8e\",\"title\":\"\\u5e8f\\u5217\\u53f7\",\"desc\":\"\\u8bbe\\u5907\\u5e8f\\u5217\\u53f7\",\"type\":\"string\",\"fix-id\":34902,\"ui-pos\":14,\"auth\":0,\"readonly\":true,\"size\":32,\"auto\":false,\"ownread\":true,\"cur\":\"GB20231201\",\"default\":\"GB20231201\"},\"fmw-ver\":{\"cat\":\"base\",\"group\":\"\\u5173\\u4e8e\",\"title\":\"\\u56fa\\u4ef6\\u7248\\u672c\",\"desc\":\"\\u8bbe\\u5907\\u56fa\\u4ef6\\u7248\\u672c\\u53f7\",\"type\":\"string\",\"fix-id\":34903,\"ui-pos\":15,\"auth\":0,\"readonly\":true,\"size\":32,\"auto\":false,\"cur\":\"G2393B0500\",\"default\":\"G2393B0500\"},\"roller-life\":{\"cat\":\"base\",\"group\":\"\\u5173\\u4e8e\",\"title\":\"\\u6eda\\u8f74\\u5bff\\u547d\",\"desc\":\"\\u8be5\\u8bbe\\u5907\\u6eda\\u8f74\\u8fc7\\u7eb8\\u7684\\u6700\\u5927\\u5f20\\u6570\",\"type\":\"int\",\"fix-id\":34907,\"ui-pos\":20,\"auth\":0,\"readonly\":true,\"size\":4,\"auto\":false,\"cur\":450000,\"default\":450000},\"ip-addr\":{\"cat\":\"base\",\"group\":\"\\u5173\\u4e8e\",\"title\":\"IP\",\"desc\":\"\\u8bbe\\u5907\\u8054\\u7f51\\u65f6\\u6240\\u5206\\u914d\\u7684IP\\u5730\\u5740\",\"type\":\"string\",\"fix-id\":34904,\"ui-pos\":21,\"auth\":0,\"readonly\":true,\"size\":96,\"auto\":false,\"ownread\":true,\"cur\":\"0\",\"default\":\"0\"},\"mac-addr\":{\"cat\":\"base\",\"group\":\"\\u5173\\u4e8e\",\"title\":\"MAC\",\"desc\":\"\\u8bbe\\u5907\\u7f51\\u5361\\u5730\\u5740\",\"type\":\"string\",\"fix-id\":34905,\"ui-pos\":22,\"auth\":0,\"readonly\":true,\"size\":96,\"auto\":false,\"ownread\":true,\"cur\":\"0\",\"default\":\"0\"}}" + "{\"dev-vid\":{\"cat\":\"base\",\"group\":\"about\",\"title\":\"USB-VID\",\"desc\":\"\\u8bbe\\u5907\\u5236\\u9020\\u5546\\u5728USB\\u7ec4\\u7ec7\\u7684ID\",\"type\":\"string\",\"fix-id\":34898,\"ui-pos\":10,\"auth\":0,\"readonly\":true,\"size\":16,\"auto\":false,\"cur\":\"3072\",\"default\":\"3072\"},\"dev-pid\":{\"cat\":\"base\",\"group\":\"about\",\"title\":\"USB-PID\",\"desc\":\"\\u8bbe\\u5907\\u5728USB\\u7ec4\\u7ec7\\u4e2d\\u7684\\u4ea7\\u54c1ID\",\"type\":\"string\",\"fix-id\":34899,\"ui-pos\":11,\"auth\":0,\"readonly\":true,\"size\":16,\"auto\":false,\"cur\":\"0306\",\"default\":\"0306\"},\"dev-name\":{\"cat\":\"base\",\"group\":\"about\",\"title\":\"\\u8bbe\\u5907\\u540d\\u79f0\",\"desc\":\"\\u8bbe\\u5907\\u540d\\u79f0\",\"type\":\"string\",\"fix-id\":34900,\"ui-pos\":12,\"auth\":0,\"readonly\":true,\"size\":96,\"auto\":false,\"cur\":\"HUAGOSCAN G200\",\"default\":\"HUAGOSCAN G200\"},\"dev-model\":{\"cat\":\"base\",\"group\":\"about\",\"title\":\"\\u4ea7\\u54c1\\u7cfb\\u5217\",\"desc\":\"\\u8bbe\\u5907\\u6240\\u5c5e\\u4ea7\\u54c1\\u7cfb\\u5217\\u540d\\u79f0\",\"type\":\"string\",\"fix-id\":34901,\"ui-pos\":13,\"auth\":0,\"readonly\":true,\"size\":96,\"auto\":false,\"cur\":\"G200\",\"default\":\"G200\"},\"dev-sn\":{\"cat\":\"base\",\"group\":\"about\",\"title\":\"\\u5e8f\\u5217\\u53f7\",\"desc\":\"\\u8bbe\\u5907\\u5e8f\\u5217\\u53f7\",\"type\":\"string\",\"fix-id\":34902,\"ui-pos\":14,\"auth\":0,\"readonly\":true,\"size\":32,\"auto\":false,\"ownread\":true,\"cur\":\"GB20231201\",\"default\":\"GB20231201\"},\"fmw-ver\":{\"cat\":\"base\",\"group\":\"about\",\"title\":\"\\u56fa\\u4ef6\\u7248\\u672c\",\"desc\":\"\\u8bbe\\u5907\\u56fa\\u4ef6\\u7248\\u672c\\u53f7\",\"type\":\"string\",\"fix-id\":34903,\"ui-pos\":15,\"auth\":0,\"readonly\":true,\"size\":32,\"auto\":false,\"cur\":\"G2393B0500\",\"default\":\"G2393B0500\"},\"roller-life\":{\"cat\":\"base\",\"group\":\"about\",\"title\":\"\\u6eda\\u8f74\\u5bff\\u547d\",\"desc\":\"\\u8be5\\u8bbe\\u5907\\u6eda\\u8f74\\u8fc7\\u7eb8\\u7684\\u6700\\u5927\\u5f20\\u6570\",\"type\":\"int\",\"fix-id\":34907,\"ui-pos\":20,\"auth\":0,\"readonly\":true,\"size\":4,\"auto\":false,\"cur\":450000,\"default\":450000},\"roll-cnt\":{\"cat\":\"base\",\"group\":\"about\",\"title\":\"\\u6eda\\u8f74\\u5f20\\u6570\",\"desc\":\"\\u5f53\\u524d\\u6eda\\u8f74\\u626b\\u63cf\\u5f20\\u6570\",\"type\":\"int\",\"fix-id\":39170,\"ui-pos\":21,\"auth\":0,\"readonly\":true,\"size\":4,\"auto\":false,\"ownread\":true,\"cur\":0,\"default\":0},\"total-cnt\":{\"cat\":\"base\",\"group\":\"about\",\"title\":\"\\u5386\\u53f2\\u5f20\\u6570\",\"desc\":\"\\u8be5\\u8bbe\\u5907\\u5386\\u53f2\\u603b\\u8ba1\\u626b\\u63cf\\u5f20\\u6570\",\"type\":\"int\",\"fix-id\":34889,\"ui-pos\":22,\"auth\":0,\"readonly\":true,\"size\":4,\"auto\":false,\"ownread\":true,\"cur\":0,\"default\":0},\"ip-addr\":{\"cat\":\"base\",\"group\":\"about\",\"title\":\"IP\",\"desc\":\"\\u8bbe\\u5907\\u8054\\u7f51\\u65f6\\u6240\\u5206\\u914d\\u7684IP\\u5730\\u5740\",\"type\":\"string\",\"fix-id\":34904,\"ui-pos\":30,\"auth\":0,\"readonly\":true,\"size\":96,\"auto\":false,\"ownread\":true,\"cur\":\"0\",\"default\":\"0\"},\"mac-addr\":{\"cat\":\"base\",\"group\":\"about\",\"title\":\"MAC\",\"desc\":\"\\u8bbe\\u5907\\u7f51\\u5361\\u5730\\u5740\",\"type\":\"string\",\"fix-id\":34905,\"ui-pos\":31,\"auth\":0,\"readonly\":true,\"size\":96,\"auto\":false,\"ownread\":true,\"cur\":\"0\",\"default\":\"0\"}}" }; @@ -87,6 +88,7 @@ void scanner_const_opts::init(void) for(auto& v: device_opt_json) text += v; + ; if(jsn->attach_text(&text[0])) { gb_json *child = nullptr; @@ -176,6 +178,21 @@ void scanner_const_opts::init(void) child->release(); } + jsn->get_value(SANE_OPT_NAME(ROLLER_COUNT), child); + if(child) + { + child->set_value("cur", (int)roller_cnt_); + child->set_value("default", (int)roller_cnt_); + child->release(); + } + jsn->get_value(SANE_OPT_NAME(HISTORY_COUNT), child); + if(child) + { + child->set_value("cur", (int)hist_cnt_); + child->set_value("default", (int)hist_cnt_); + child->release(); + } + text = jsn->to_string(); set_opt_json_text(&text[0]); } @@ -208,6 +225,18 @@ char* scanner_const_opts::get_value(const char* name, void* value, size_t* size, sprintf(ver, "%u.%u.%u%02u", VER_MAIN, VER_FAMILY, VER_DATE, VER_BUILD); val = ver; } + else if(strcmp(SANE_OPT_NAME(ROLLER_COUNT), name) == 0) + { + devui::send_message(devui::UI_CMD_GET_ROLLER_COUNT); + std::this_thread::sleep_for(std::chrono::milliseconds(50)); + val = std::string((char*)&roller_cnt_, sizeof(roller_cnt_)); + } + else if(strcmp(SANE_OPT_NAME(HISTORY_COUNT), name) == 0) + { + devui::send_message(devui::UI_CMD_GET_HISTORY_COUNT); + std::this_thread::sleep_for(std::chrono::milliseconds(50)); + val = std::string((char*)&hist_cnt_, sizeof(hist_cnt_)); + } else if(err) *err = ENOTSUP; @@ -221,4 +250,13 @@ char* scanner_const_opts::get_value(const char* name, void* value, size_t* size, } return ret; -} \ No newline at end of file +} + +void scanner_const_opts::set_roller_count(uint32_t cnt) +{ + roller_cnt_ = cnt; +} +void scanner_const_opts::set_history_count(uint32_t cnt) +{ + hist_cnt_ = cnt; +} diff --git a/scanner/scanner_const_opts.h b/scanner/scanner_const_opts.h index 64778e3..e14f87e 100644 --- a/scanner/scanner_const_opts.h +++ b/scanner/scanner_const_opts.h @@ -9,6 +9,8 @@ class scanner_const_opts : public sane_opt_provider { std::string root_; + uint32_t hist_cnt_ = 0; + uint32_t roller_cnt_ = 0; std::string get_device_content(const char* path, bool truncate_from_lrn = false); std::string get_ip(void); @@ -24,5 +26,10 @@ protected: public: // return malloc(), real data size stored in parameter 'size'. invoker should free() the returned value virtual char* get_value(const char* name, void* value, size_t* size, int* err = nullptr) override; + +public: + void set_roller_count(uint32_t cnt); + void set_history_count(uint32_t cnt); }; + diff --git a/sdk/base/ui.h b/sdk/base/ui.h index 9ed3b5a..a37efc3 100644 --- a/sdk/base/ui.h +++ b/sdk/base/ui.h @@ -25,6 +25,9 @@ namespace devui UI_CMD_CLEAN_PASSWAY = 0x30, + UI_CMD_GET_HISTORY_COUNT = 0x50, + UI_CMD_GET_ROLLER_COUNT, + UI_STATUS_SCANNING = 0x1000, // begin scanning. data: (LPSCANSTREAM) UI_STATUS_PAPER_CNT, // ONE paper has pass through. data: (uint32_t*)milliseconds for paper pass through UI_STATUS_MESSAGE, // status message, hold screen. data: LPSTATMSG diff --git a/sdk/imgprc/img_processor.h b/sdk/imgprc/img_processor.h index 1b39ae0..b5331c7 100644 --- a/sdk/imgprc/img_processor.h +++ b/sdk/imgprc/img_processor.h @@ -59,11 +59,3 @@ public: // 跨模块图像处理接口。回调函数返回false,则停止处理;void*参数同 'param'。 virtual int process(LPPROCIIM* in, size_t cnt, bool(*result)(LPPROCIIM, void*), void* param); }; - -#define ADD_THIS_JSON() \ - { \ - std::string t(""); \ - for(auto& v: device_opt_json) \ - t += v; \ - set_opt_json_text(&t[0]); \ - } diff --git a/sdk/sane/sane_name.h b/sdk/sane/sane_name.h index ff420ce..4850c4b 100644 --- a/sdk/sane/sane_name.h +++ b/sdk/sane/sane_name.h @@ -135,6 +135,7 @@ #define SANE_STD_OPT_NAME_CO_GPS "co-gps" // 公司地图定位 over-line #define SANE_STD_OPT_NAME_USER_NAME "user-name" // 登录账号 over-line #define SANE_STD_OPT_NAME_USER_PASSWORD "user-pwd" // 登录密码 over-line +#define SANE_STD_OPT_NAME_USER_LOGIN_HINT "login-hint" // 用户登录密码提示 over-line #define SANE_STD_OPT_NAME_LOGIN "login" // 登录 over-line #define SANE_STD_OPT_NAME_LOGOUT "logout" // 登出 over-line #define SANE_STD_OPT_NAME_DRIVER_LOG "drv-log" // 驱动日志 over-line @@ -168,7 +169,6 @@ #define SANE_STD_OPT_NAME_CIS_REBUILD "rebuild" // 复原从CIS出来的数据流为原始图像 over-line #define SANE_STD_OPT_NAME_CIS_MODE "cis-mode" #define SANE_STD_OPT_NAME_CIS_DPI "cis-dpi" -#define SANE_STD_OPT_NAME_Y_DPI "y-dpi" #define SANE_STD_OPT_NAME_CIS_BAUD "baud" #define SANE_STD_OPT_NAME_CIS_DELAY "act-after" #define SANE_STD_OPT_NAME_CIS_FRAME_H "frame-h" @@ -187,6 +187,7 @@ #define SANE_STD_OPT_NAME_CIS_OFFSET_BACK "off-b" #define SANE_STD_OPT_NAME_CIS_STRETCH_H "stretch-h" #define SANE_STD_OPT_NAME_CIS_STRETCH_V "stretch-v" +#define SANE_STD_OPT_NAME_CIS_PAPER_TIME "paper-timer" #define SANE_STD_OPT_NAME_MOTOR_SPEED "motor-speed" #define SANE_STD_OPT_NAME_COLOR_CORRECT "clr-correct" #define SANE_STD_OPT_NAME_LUT_FILE "lut-file" diff --git a/sdk/sane_opt_json/base_opt.h b/sdk/sane_opt_json/base_opt.h index b1d0c86..869d1cb 100644 --- a/sdk/sane_opt_json/base_opt.h +++ b/sdk/sane_opt_json/base_opt.h @@ -48,3 +48,37 @@ public: virtual void enable(const char* name, bool able); }; + +#define ADD_THIS_JSON() \ + { \ + std::string t(""); \ + for(auto& v: device_opt_json) \ + t += v; \ + set_opt_json_text(&t[0]); \ + } + +// change given options 'cur' value and add my JSON +// vals: std::map. void* is bool*, int*, double* or char* +#define ADD_THIS_JSON_WITH_VALUES(vals) \ + { \ + std::string t(""); \ + for(auto& v: device_opt_json) \ + t += v; \ + gb_json *jsn = new gb_json(); \ + if(jsn->attatch(&t[0])) \ + { \ + for(auto& v: vals) \ + { \ + gb_json *child = nullptr; \ + jsn->get_value(v.first.c_str(), child); \ + if(child) \ + { \ + sane_opt_provider::set_opt_value(child, v.second); \ + child->release(); \ + } \ + } \ + t = jsn->to_string(); \ + } \ + jsn->release(); \ + set_opt_json_text(&t[0]); \ + } diff --git a/sdk/sane_opt_json/device_opt.cpp b/sdk/sane_opt_json/device_opt.cpp index 02180d2..79baaf0 100644 --- a/sdk/sane_opt_json/device_opt.cpp +++ b/sdk/sane_opt_json/device_opt.cpp @@ -154,6 +154,9 @@ static struct , {"bright", "\xE4\xBA\xAE\xE5\xBA\xA6"} , {"imgp", "\xE5\x9B\xBE\xE5\x83\x8F\xE5\xA4\x84\xE7\x90\x86"} , {"feeder", "\xE9\x80\x81\xE7\xBA\xB8\xE6\x96\xB9\xE5\xBC\x8F\xE8\xAE\xBE\xE7\xBD\xAE"} // ���ã�\xE8\xAE\xBE\xE7\xBD\xAE + , {"advance", "\xE9\xAB\x98\xE7\xBA\xA7\xE8\xAE\xBE\xE7\xBD\xAE"} // ���ã�\xE8\xAE\xBE\xE7\xBD\xAE + , {"user", "\xE7\x94\xA8\xE6\x88\xB7"} // ���ã�\xE8\xAE\xBE\xE7\xBD\xAE + , {"about", "\xE5\x85\xB3\xE4\xBA\x8E"} // ���ã�\xE8\xAE\xBE\xE7\xBD\xAE }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -931,11 +934,11 @@ gb_json* device_option::group_opt(const char* title) return jsn; } -int device_option::next_group(int start) +int device_option::next_group(gb_json* root, int start) { - for (; start < origin_->children(); ++start) + for (; start < root->children(); ++start) { - gb_json* child = origin_->child(start); + gb_json* child = root->child(start); std::string str(""); child->get_value("type", str); @@ -947,23 +950,41 @@ int device_option::next_group(int start) return start; } -int device_option::insert_group(const char* name, const char* title) +int device_option::insert_group(const char* title) { gb_json* group = nullptr; - int ind = origin_->children(); + int ind = origin_->children(), grpind = next_group(origin_, 0); + std::string name("grp-" + std::to_string(++grp_ind_)), t(""); + + while(grpind < origin_->children()) + { + group = origin_->child(grpind); + group->get_value("title", t); + if(t == title || group->key() == title) + break; + group->release(); + group = nullptr; + + grpind = next_group(origin_, grpind + 1); + } - origin_->get_value(name, group); if (group) { - ind = origin_->index(group); + ind = grpind; group->release(); } else { for (auto& v : g_known_group_with_sn) { - if (v.name == name) + if (v.title == title) { + name = v.name; + break; + } + else if (v.name == title) + { + name = v.name; title = v.title.c_str(); break; } @@ -985,9 +1006,9 @@ int device_option::insert_group(const char* name, const char* title) } else ind = 0; - ind = next_group(ind); + ind = next_group(origin_, ind); group = group_opt(title); - origin_->insert(ind, name, group); + origin_->insert(ind, name.c_str(), group); group->release(); } @@ -1098,6 +1119,13 @@ void device_option::insert_option(gb_json* opt, sane_opt_provider* from, const c } else if (vo > vn) { + // re-init existing ... + std::string text(opt->to_string()), fo(src_[existing->key()]->from()); + existing->attach_text(&text[0]); + existing->key() = opt->key(); + write_log("Re-Initialize option '%s' for new provider(%s - %d) is ahead of existing(%s - %d) ...\n", opt->key().c_str() + , from->from(), vn, fo.c_str(), vo); + from->set_following_provider(opt->key().c_str(), src_[existing->key()]); src_[existing->key()]->release(); src_[opt->key()] = from; @@ -1164,12 +1192,12 @@ void device_option::insert_option(gb_json* opt, sane_opt_provider* from, const c int index = -1, pos = -1; if (group) - index = insert_group(group, group); + index = insert_group(group); // insert poisition according to 'ui-pos' if (!opt->get_value("ui-pos", pos) || pos == -1) { - index = next_group(index + 1); + index = next_group(origin_, index + 1); } else { @@ -1214,7 +1242,7 @@ void device_option::insert_option(gb_json* opt, sane_opt_provider* from, const c // opt->get_value("type", type); // val.resize(size); // type = sane_opt_provider::sane_value_2_text(type.c_str(), &val[0]); - // utils::to_log(LOG_LEVEL_ALL, "Set option '%s' to default value: '%s'\n", opt->key().c_str(), type.c_str()); + // write_log("Set option '%s' to default value: '%s'\n", opt->key().c_str(), type.c_str()); // from->set_value(opt->key().c_str(), &val[0]); // sane_opt_provider::set_opt_value(opt, &val[0]); // } @@ -1546,19 +1574,7 @@ bool device_option::to_now(bool init, bool* changed) if (init) init_depends(from); - int pub = visibility(from); - if (pub == OPT_VISIBLE_HIDE || pub == OPT_VISIBLE_NOT_SUPPORT) - { - int auth = 0; - from->get_value("auth", auth); - if (pub == OPT_VISIBLE_NOT_SUPPORT || !user_ || !user_(auth)) - { - from->release(); - from = origin_->next_child(); - continue; - } - } - + // check hidden option is moved to do when get all options json, here should add into, or else the option maybe in wrong status !!! to = copy_opt(from, &cur_chged); from->release(); if (to) @@ -1722,6 +1738,84 @@ void device_option::remove_provider(gb_json* root, sane_opt_provider* sop) } } } +void device_option::remove_empty_group(gb_json* root) +{ + int prev = -2, index = next_group(root, 0); + std::vector grp0; + + while(index < root->children()) + { + if(index - prev == 1) + grp0.push_back(prev); + else if(prev >= 0) + { + // contains only-accessible option + int cnt = 0; + for (int i = prev + 1; i < index; ++i) + { + gb_json* child = root->child(i); + int visible = 0; + child->get_value("visible", visible); + child->release(); + if (visible != OPT_VISIBLE_ACCESS) + { + cnt++; + break; + } + } + if(cnt == 0) + grp0.push_back(prev); + } + prev = index; + index = next_group(root, index + 1); + } + if (prev >= 0) + { + // contains only-accessible option + int cnt = 0; + for (int i = prev + 1; i < index; ++i) + { + gb_json* child = root->child(i); + int visible = 0; + child->get_value("visible", visible); + child->release(); + if (visible != OPT_VISIBLE_ACCESS) + { + cnt++; + break; + } + } + if (cnt == 0) + grp0.push_back(prev); + } + for(int i = grp0.size() - 1; i >= 0; --i) + { + std::string title(""); + gb_json *grp = root->child(grp0[i]); + grp->get_value("title", title); + grp->release(); + utils::to_log(LOG_LEVEL_ALL, "remove empty group '%s'.\n", title.c_str()); + + root->remove(grp0[i]); + } +} +bool device_option::is_hidden_option(gb_json* opt) +{ + int pub = visibility(opt); + bool hidden = false; + + if (pub != OPT_VISIBLE_ALL) + { + int auth = 0; + opt->get_value("auth", auth); + if (pub == OPT_VISIBLE_HIDE || pub == OPT_VISIBLE_NOT_SUPPORT || !user_ || !user_(auth)) + { + hidden = true; + } + } + + return hidden; +} std::string device_option::option_value(gb_json* jsn, bool def_val) { @@ -1847,6 +1941,7 @@ void device_option::clear(void) for (auto& v : src_) v.second->release(); src_.clear(); + grp_ind_ = 0; } bool device_option::add(sane_opt_provider* sop, bool apply_default_val) { @@ -1908,7 +2003,7 @@ bool device_option::refine_data(const char* name, void* value) if(refined) { result = sane_opt_provider::sane_value_2_text(type.c_str(), value); - utils::to_log(LOG_LEVEL_DEBUG, "Refine value of '%s' from '%s' to '%s'.\n", name, org.c_str(), result.c_str()); + write_log("Refine value of '%s' from '%s' to '%s'.\n", name, org.c_str(), result.c_str()); } child->release(); @@ -1952,7 +2047,7 @@ int device_option::update_data(const char* name, void* value, bool reorder_if_ne err = update_provider_value(name, value); child->get_value("type", type); - utils::to_log(LOG_LEVEL_DEBUG, "set option '%s' value to '%s' = %d.\n", name, sane_opt_provider::sane_value_2_text(type.c_str(), value).c_str(), err); + write_log("set option '%s' value to '%s' = %d.\n", name, sane_opt_provider::sane_value_2_text(type.c_str(), value).c_str(), err); if (err == SCANNER_ERR_OK || err == SCANNER_ERR_NOT_EXACT || err == SCANNER_ERR_RELOAD_IMAGE_PARAM || err == SCANNER_ERR_RELOAD_OPT_PARAM @@ -2146,10 +2241,25 @@ std::string device_option::get_option_value(const char* name, int type, int* siz { if (!name) { - if (no_grp_ && origin_) - value = origin_->to_string(); - else - value = jsn->to_string(); + gb_json *filter = new gb_json(), + *child = jsn->first_child(); + + while(child) + { + if(!is_hidden_option(child)) + filter->set_value(child->key().c_str(), child); + child->release(); + child = jsn->next_child(); + } + if(!no_grp_) + remove_empty_group(filter); + value = filter->to_string(); + filter->release(); + + // if (no_grp_ && origin_) + // value = origin_->to_string(); + // else + // value = jsn->to_string(); } else { diff --git a/sdk/sane_opt_json/device_opt.h b/sdk/sane_opt_json/device_opt.h index 47168a4..52f064f 100644 --- a/sdk/sane_opt_json/device_opt.h +++ b/sdk/sane_opt_json/device_opt.h @@ -34,6 +34,8 @@ class device_option : public refer gb_json* origin_; gb_json* now_; bool no_grp_ = false; // i am a lower option manager, need not group + int grp_ind_ = 0; + std::map src_; std::vector master_opts_; // options that value changed will affect others std::map slaver_; @@ -185,8 +187,8 @@ class device_option : public refer void clear_for_reconstruct(void); gb_json* group_opt(const char* title); - int next_group(int start); // return index of the next group - int insert_group(const char* name, const char* title); // return index of the group + int next_group(gb_json* root, int start); // return index of the next group + int insert_group(const char* title); // return index of the group void insert_option(gb_json* opt, sane_opt_provider* from, const char* group = nullptr); bool arrange_raw_json(sane_opt_provider* sop); // create origin_ and re-arrange groups void init_depends(gb_json* opt); @@ -195,6 +197,8 @@ class device_option : public refer bool to_now(bool init, bool* changed); int update_provider_value(const char* name, void* value, bool skip_first = false/*readonly value should skip first*/); void remove_provider(gb_json* root, sane_opt_provider* sop); + void remove_empty_group(gb_json* root); + bool is_hidden_option(gb_json* opt); protected: static std::string option_value(gb_json* jsn, bool def_val); diff --git a/sdk/sane_opt_json/user.cpp b/sdk/sane_opt_json/user.cpp index 9d59849..abb3917 100644 --- a/sdk/sane_opt_json/user.cpp +++ b/sdk/sane_opt_json/user.cpp @@ -11,17 +11,34 @@ // json ... static std::string device_opt_json[] = { - "{\"user-name\":{\"cat\":\"none\",\"group\":\"\\u7528\\u6237\",\"title\":\"\\u7528\\u6237\\u540d\",\"desc\":\"\\u767b\\u5f55\\u7528\\u6237\\u8d26\\u53f7\",\"type\":\"string\",\"fix-id\":39173,\"ui-pos\":10,\"auth\":0,\"size\":32,\"cur\":\"\",\"default\":\"\"},\"user-pwd\":{\"cat\":\"none\",\"group\":\"\\u7528\\u6237\",\"title\":\"\\u5bc6\\u7801\",\"desc\":\"\\u767b\\u5f55\\u7528\\u6237\\u8d26\\u53f7\\u5bc6\\u7801\",\"type\":\"string\",\"fix-id\":39174,\"ui-pos\":11,\"auth\":0,\"size\":32,\"cur\":\"\",\"default\":\"\"},\"login\":{\"cat\":\"none\",\"group\":\"\\u7528\\u6237\",\"title\":\"\\u767b\\u5f55\",\"desc\":\"\\u7528\\u6237\\u767b\\u5f55\",\"type\":\"button\",\"fix-id\":39168,\"ui-pos\":20,\"auth\":0,\"affect\":6,\"size\":4,\"auto\":false},\"logout\":{\"cat\":\"none\",\"group\":\"\\u7528\\u6237\",\"title\":\"\\u6ce8\\u9500\",\"desc\":\"\\u7528\\u6237\\u767b\\u51fa\",\"type\":\"button\",\"fix-id\":39169,\"ui-pos\":21,\"auth\":0,\"affect\":6,\"size\":4,\"auto\":false},\"dev-sn\":{\"cat\":\"base\",\"group\":\"\\u5173\\u4e8e\",\"title\":\"\\u5e8f\\u5217\\u53f7\",\"desc\":\"\\u8bbe\\u5907\\u5e8f\\u5217\\u53f7\",\"type\":\"string\",\"pos\":100,\"fix-id\":34902,\"ui-pos\":14,\"auth\":0,\"size\":32,\"auto\":false,\"cur\":\"\",\"default\":\"\"}}" + "{\"login-hint\":{\"cat\":\"none\",\"group\":\"user\",\"title\":\"\\u767b\\u5f55\\u63d0\\u793a\",\"desc\":\"\\u767b\\u5f55\\u5e10\\u6237\\u63d0\\u793a\",\"type\":\"string\",\"ui-pos\":10,\"auth\":0,\"readonly\":true,\"size\":32,\"ownread\":true,\"cur\":\"\",\"default\":\"\"},\"user-name\":{\"cat\":\"none\",\"group\":\"user\",\"title\":\"\\u7528\\u6237\\u540d\",\"desc\":\"\\u767b\\u5f55\\u7528\\u6237\\u8d26\\u53f7\",\"type\":\"string\",\"fix-id\":39173,\"ui-pos\":15,\"auth\":0,\"size\":32,\"cur\":\"\",\"default\":\"\"},\"user-pwd\":{\"cat\":\"none\",\"group\":\"user\",\"title\":\"\\u5bc6\\u7801\",\"desc\":\"\\u767b\\u5f55\\u7528\\u6237\\u8d26\\u53f7\\u5bc6\\u7801\",\"type\":\"string\",\"fix-id\":39174,\"ui-pos\":16,\"auth\":0,\"size\":32,\"cur\":\"\",\"default\":\"\"},\"login\":{\"cat\":\"none\",\"group\":\"user\",\"title\":\"\\u767b\\u5f55\",\"desc\":\"\\u7528\\u6237\\u767b\\u5f55\",\"type\":\"button\",\"fix-id\":39168,\"ui-pos\":20,\"auth\":0,\"affect\":6,\"size\":4,\"auto\":false},\"logout\":{\"cat\":\"none\",\"group\":\"user\",\"title\":\"\\u6ce8\\u9500\",\"desc\":\"\\u7528\\u6237\\u767b\\u51fa\",\"type\":\"button\",\"fix-id\":39169,\"ui-pos\":21,\"auth\":0,\"affect\":6,\"size\":4,\"auto\":false},\"dev-sn\":{\"cat\":\"base\",\"group\":\"about\",\"title\":\"\\u5e8f\\u5217\\u53f7\",\"desc\":\"\\u8bbe\\u5907\\u5e8f\\u5217\\u53f7\",\"type\":\"string\",\"pos\":100,\"fix-id\":34902,\"ui-pos\":14,\"auth\":0,\"size\":32,\"auto\":false,\"cur\":\"\",\"default\":\"\"}}" }; +static bool check_user_password(const char* pwd, void* param) +{ + return true; +} +static bool check_admin_password(const char* pwd, void* param) +{ + return STRICMP(pwd, "HuaGoScan") == 0; +} +static bool check_owner_password(const char* pwd, void* param) +{ + return STRICMP(pwd, "HuaGoScan") == 0; +} +static bool check_dev_password(const char* pwd, void* param) +{ + return STRICMP(pwd, "HuaGoScan") == 0; +} struct { std::string name; int priv; -}g_user_priv[] = { {"user", USER_PRIVILEGE_COMMON} - , {"admin", USER_PRIVILEGE_LOCAL_MGR} - , {"owner", USER_PRIVILEGE_TECH_SUPPORTING} - , {"developer", USER_PRIVILEGE_DEVLOPER} + bool(*chkpwd)(const char* pwd, void* param); +}g_user_priv[] = { {"user", USER_PRIVILEGE_COMMON, check_user_password} // no password needed + , {"admin", USER_PRIVILEGE_LOCAL_MGR, check_admin_password} // fixed password - "HuaGoScan" + , {"owner", USER_PRIVILEGE_TECH_SUPPORTING, check_owner_password} // calc - 1, valid in 1 hour + , {"developer", USER_PRIVILEGE_DEVLOPER, check_dev_password} // calc - 2, valid in 5 minutes }; static std::string base64_table = "!@#$_~=;/+"; @@ -34,14 +51,6 @@ user_priv::user_priv() simple_ini ini; std::string text(""); - cfg_file_ = utils::get_local_data_path() + PATH_SEPARATOR + "config"; - utils::create_folder(cfg_file_.c_str()); - cfg_file_ += std::string(PATH_SEPARATOR) + "user.txt"; - - ini.load(cfg_file_.c_str()); - for(auto& v: g_user_priv) - login_times_[v.name] = atoi(ini.get(v.name.c_str(), "login", "0").c_str()); - set_where("user"); for(auto& v : device_opt_json) text += v; @@ -49,15 +58,6 @@ user_priv::user_priv() } user_priv::~user_priv() { - simple_ini ini; - - ini.load(cfg_file_.c_str()); - for(auto& v: login_times_) - { - if(v.second) - ini.set(v.first.c_str(), "login", std::to_string(v.second).c_str()); - } - ini.save(cfg_file_.c_str()); } bool user_priv::login(void) @@ -68,14 +68,7 @@ bool user_priv::login(void) { if(v.name == name_) { - if(name_ == "user") - { - ok = true; - } - else - { - ok = true; - } + ok = v.chkpwd(pwd_.c_str(), &hint_[0]); break; } } @@ -102,7 +95,16 @@ int user_priv::set_value(const char* name, void* val) if(strcmp(name, SANE_OPT_NAME(USER_NAME)) == 0) { - name_ = (char*)val; + ret = SCANNER_ERR_INVALID_USER_NAME; + for(auto& v: g_user_priv) + { + if(v.name == (char*)val) + { + ret = SCANNER_ERR_OK; + name_ = (char*)val; + break; + } + } priv_ = USER_PRIVILEGE_COMMON; } else if(strcmp(name, SANE_OPT_NAME(USER_PASSWORD)) == 0) @@ -119,31 +121,31 @@ int user_priv::set_value(const char* name, void* val) else if(strcmp(name, SANE_OPT_NAME(LOGIN)) == 0) { // login ... - if(login_times_.count(name) == 0) + int prev = priv_; + if(name_.empty()) { ret = SCANNER_ERR_INVALID_USER_NAME; } + else if(login()) + { + reset_privilege(); + } else { - if(login()) - { - simple_ini ini; - - ini.load(cfg_file_.c_str()); - login_times_[name]++; - reset_privilege(); - ini.set(name, "login", std::to_string(login_times_[name]).c_str()); - } - else - { - ret = SCANNER_ERR_INVALID_PASSWORD; - } + ret = SCANNER_ERR_INVALID_PASSWORD; } + if(prev != priv_) + ret = SCANNER_ERR_CONFIGURATION_CHANGED; + *(int*)val = priv_; } else if(strcmp(name, SANE_OPT_NAME(LOGOUT)) == 0) { + int prev = priv_; name_ = pwd_ = ""; reset_privilege(); + *(int*)val = priv_; + if(prev != priv_) + ret = SCANNER_ERR_CONFIGURATION_CHANGED; } else { @@ -152,16 +154,30 @@ int user_priv::set_value(const char* name, void* val) return ret; } +char* user_priv::get_value(const char* name, void* value, size_t* size, int* err) +{ + char *ret = nullptr; + int e = SCANNER_ERR_DEVICE_NOT_FOUND; + + if(strcmp(name, SANE_OPT_NAME(USER_LOGIN_HINT)) == 0) + { + ret = (char*)malloc(hint_.length() + 1); + memcpy(ret, hint_.c_str(), hint_.length()); + ret[hint_.length()] = 0; + e = SCANNER_ERR_OK; + } + + if(err) + *err = e; + + return ret; +} bool user_priv::has_privilege(int priv) { return priv_ >= priv; } -int user_priv::get_current_user_login_times(void) +int user_priv::get_current_privilege(void) { - if(login_times_.count(name_)) - return login_times_[name_]; - else - return 0; + return priv_; } - diff --git a/sdk/sane_opt_json/user.h b/sdk/sane_opt_json/user.h index 22290ac..8917541 100644 --- a/sdk/sane_opt_json/user.h +++ b/sdk/sane_opt_json/user.h @@ -24,11 +24,10 @@ class user_priv : public sane_opt_provider { - std::map login_times_; - std::string cfg_file_; + std::string hint_ = ""; std::string dev_sn_ = "01234567AABBCCDDEE"; - std::string name_; - std::string pwd_; + std::string name_ = ""; + std::string pwd_ = ""; int priv_ = USER_PRIVILEGE_COMMON; @@ -44,9 +43,10 @@ protected: // sane_opt_provider public: virtual int set_value(const char* name, void* val) override; + virtual char* get_value(const char* name, void* value, size_t* size, int* err) override; public: bool has_privilege(int priv); - int get_current_user_login_times(void); + int get_current_privilege(void); }; diff --git a/ui/dev_menu.cpp b/ui/dev_menu.cpp index 700c618..184a036 100644 --- a/ui/dev_menu.cpp +++ b/ui/dev_menu.cpp @@ -582,6 +582,16 @@ ui_mgr::ui_mgr() : disp_data_("lcd-msg") if(!display_status(&msg)) set_ready_status_enabled(true); } + else if(pack->msg == devui::UI_CMD_GET_HISTORY_COUNT) + { + uint32_t cnt = (uint32_t)perm_data_->history_count(); + devui::send_message(pack->msg, (uint8_t*)&cnt, sizeof(cnt)); + } + else if(pack->msg == devui::UI_CMD_GET_ROLLER_COUNT) + { + uint32_t cnt = (uint32_t)perm_data_->roller_count(); + devui::send_message(pack->msg, (uint8_t*)&cnt, sizeof(cnt)); + } }; devui::init_ui(statu, true); } diff --git a/xmake.lua b/xmake.lua index 41c9157..90d6512 100644 --- a/xmake.lua +++ b/xmake.lua @@ -60,8 +60,8 @@ add_packagedirs("sdk") add_defines("BUILD_AS_DEVICE") add_defines("VER_MAIN=2") add_defines("VER_FAMILY=200") -add_defines("VER_DATE=20240309") -add_defines("VER_BUILD=12") +add_defines("VER_DATE=20240312") +add_defines("VER_BUILD=7") target("conf") set_kind("phony")