添加待纸扫描属性

This commit is contained in:
gb 2023-12-19 17:11:41 +08:00
parent d878284efb
commit 7c7e271a6c
4 changed files with 81 additions and 28 deletions

View File

@ -132,11 +132,7 @@ enum
}; };
enum enum
{ {
CIS_GAIN_IND_COUNT = 6, CIS_SECTOR_COUNT = 6, // how many sectors of ONE CIS
};
enum
{
CIS_OFFSET_IND_COUNT = 6,
}; };
class FpgaComm : public IRegsAccess class FpgaComm : public IRegsAccess

File diff suppressed because one or more lines are too long

View File

@ -27,6 +27,7 @@ class scanner_hw : public sane_opt_provider
std::function<IMAGE_HANDLER_PROTO> img_handler_; std::function<IMAGE_HANDLER_PROTO> img_handler_;
bool scanning_ = false; bool scanning_ = false;
bool auto_scan_ = false; bool auto_scan_ = false;
int time_to_exit_auto_scan_ = 60; // seconds
std::unique_ptr<FpgaComm> img_controller_; std::unique_ptr<FpgaComm> img_controller_;
enum enum
@ -103,13 +104,41 @@ public:
// "default": 300, // "default": 300,
// "range": [200, 300] // "range": [200, 300]
// }, // },
// "is-wait-scan": {
// "cat": "base",
// "group": "feeder",
// "title": "待纸扫描",
// "desc": "启用后,文稿放入扫描仪时将自动启动扫描",
// "type": "bool",
// "fix-id": 34873,
// "ui-pos": 12,
// "auth": 0,
// "size": 4,
// "cur": false,
// "default": false
// },
// "wait-scan-exit": {
// "cat": "base",
// "group": "feeder",
// "title": "待纸扫描退出时间",
// "desc": "设置结束待纸扫描的时间",
// "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"
// },
// "baud": { // "baud": {
// "cat": "none", // "cat": "none",
// "group": "CIS", // "group": "CIS",
// "title": "波特率", // "title": "波特率",
// "desc": "CIS控制通信速率", // "desc": "CIS控制通信速率",
// "type": "int", // "type": "int",
// "ui-pos": 12, // "ui-pos": 20,
// "auth": 0, // "auth": 0,
// "size": 4, // "size": 4,
// "cur": 921600, // "cur": 921600,
@ -122,7 +151,7 @@ public:
// "title": "延迟响应", // "title": "延迟响应",
// "desc": "采集头接受命令后的动作延迟时间", // "desc": "采集头接受命令后的动作延迟时间",
// "type": "int", // "type": "int",
// "ui-pos": 12, // "ui-pos": 21,
// "auth": 0, // "auth": 0,
// "unit": "microsec", // "unit": "microsec",
// "size": 4, // "size": 4,
@ -135,7 +164,7 @@ public:
// "title": "帧高度", // "title": "帧高度",
// "desc": "采集头每一帧的采集高度", // "desc": "采集头每一帧的采集高度",
// "type": "int", // "type": "int",
// "ui-pos": 13, // "ui-pos": 22,
// "auth": 0, // "auth": 0,
// "size": 4, // "size": 4,
// "cur": 12, // "cur": 12,
@ -147,7 +176,7 @@ public:
// "title": "采样频率", // "title": "采样频率",
// "desc": "采样频率", // "desc": "采样频率",
// "type": "int", // "type": "int",
// "ui-pos": 14, // "ui-pos": 23,
// "auth": 0, // "auth": 0,
// "size": 4, // "size": 4,
// "cur": 256, // "cur": 256,
@ -159,7 +188,7 @@ public:
// "title": "曝光度(正面蓝色通道)", // "title": "曝光度(正面蓝色通道)",
// "desc": "正面蓝色通道的曝光强度", // "desc": "正面蓝色通道的曝光强度",
// "type": "int", // "type": "int",
// "ui-pos": 15, // "ui-pos": 30,
// "auth": 0, // "auth": 0,
// "size": 4, // "size": 4,
// "cur": 0, // "cur": 0,
@ -176,7 +205,7 @@ public:
// "title": "曝光度(正面绿色通道)", // "title": "曝光度(正面绿色通道)",
// "desc": "正面绿色通道的曝光强度", // "desc": "正面绿色通道的曝光强度",
// "type": "int", // "type": "int",
// "ui-pos": 16, // "ui-pos": 31,
// "auth": 0, // "auth": 0,
// "size": 4, // "size": 4,
// "cur": 0, // "cur": 0,
@ -193,7 +222,7 @@ public:
// "title": "曝光度(正面红色通道)", // "title": "曝光度(正面红色通道)",
// "desc": "正面红色通道的曝光强度", // "desc": "正面红色通道的曝光强度",
// "type": "int", // "type": "int",
// "ui-pos": 17, // "ui-pos": 32,
// "auth": 0, // "auth": 0,
// "size": 4, // "size": 4,
// "cur": 0, // "cur": 0,
@ -210,7 +239,7 @@ public:
// "title": "曝光度(背面蓝色通道)", // "title": "曝光度(背面蓝色通道)",
// "desc": "背面蓝色通道的曝光强度", // "desc": "背面蓝色通道的曝光强度",
// "type": "int", // "type": "int",
// "ui-pos": 18, // "ui-pos": 33,
// "auth": 0, // "auth": 0,
// "size": 4, // "size": 4,
// "cur": 0, // "cur": 0,
@ -227,7 +256,7 @@ public:
// "title": "曝光度(背面绿色通道)", // "title": "曝光度(背面绿色通道)",
// "desc": "背面绿色通道的曝光强度", // "desc": "背面绿色通道的曝光强度",
// "type": "int", // "type": "int",
// "ui-pos": 19, // "ui-pos": 34,
// "auth": 0, // "auth": 0,
// "size": 4, // "size": 4,
// "cur": 0, // "cur": 0,
@ -244,7 +273,7 @@ public:
// "title": "曝光度(背面红色通道)", // "title": "曝光度(背面红色通道)",
// "desc": "背面红色通道的曝光强度", // "desc": "背面红色通道的曝光强度",
// "type": "int", // "type": "int",
// "ui-pos": 20, // "ui-pos": 35,
// "auth": 0, // "auth": 0,
// "size": 4, // "size": 4,
// "cur": 0, // "cur": 0,
@ -261,7 +290,7 @@ public:
// "title": "增益(正面)", // "title": "增益(正面)",
// "desc": "正面的增益量", // "desc": "正面的增益量",
// "type": "int", // "type": "int",
// "ui-pos": 21, // "ui-pos": 40,
// "auth": 0, // "auth": 0,
// "size": 4, // "size": 4,
// "cur": 0, // "cur": 0,
@ -278,7 +307,7 @@ public:
// "title": "增益(背面)", // "title": "增益(背面)",
// "desc": "背面的增益量", // "desc": "背面的增益量",
// "type": "int", // "type": "int",
// "ui-pos": 24, // "ui-pos": 41,
// "auth": 0, // "auth": 0,
// "size": 4, // "size": 4,
// "cur": 0, // "cur": 0,
@ -295,7 +324,7 @@ public:
// "title": "偏移(正面)", // "title": "偏移(正面)",
// "desc": "正面的偏移量", // "desc": "正面的偏移量",
// "type": "int", // "type": "int",
// "ui-pos": 27, // "ui-pos": 45,
// "auth": 0, // "auth": 0,
// "size": 4, // "size": 4,
// "cur": 0, // "cur": 0,
@ -312,7 +341,7 @@ public:
// "title": "偏移(背面)", // "title": "偏移(背面)",
// "desc": "背面的偏移量", // "desc": "背面的偏移量",
// "type": "int", // "type": "int",
// "ui-pos": 30, // "ui-pos": 46,
// "auth": 0, // "auth": 0,
// "size": 4, // "size": 4,
// "cur": 0, // "cur": 0,

View File

@ -16,6 +16,7 @@
#define ALIGN_TO(v, align) (((v) + (align) - 1) / (align) * (align)) #define ALIGN_TO(v, align) (((v) + (align) - 1) / (align) * (align))
#define ALIGN_INT(v) ALIGN_TO(v, sizeof(int)) #define ALIGN_INT(v) ALIGN_TO(v, sizeof(int))
#define CLEAN_ARRAY(a) memset(a, 0, sizeof(a))
#define RETURN_ENUM_STR(v, e) \ #define RETURN_ENUM_STR(v, e) \
if(v == e) \ if(v == e) \