图片信息增加当前纸张出图数量及传输索引域

This commit is contained in:
gb 2024-03-08 15:34:39 +08:00
parent 3a1abe5ad6
commit 91951609a8
5 changed files with 16 additions and 2 deletions

View File

@ -387,8 +387,11 @@ void scanner_hw::thread_image_capture(bool paper_ready)
utils::to_log(LOG_LEVEL_DEBUG, "set capture thread to CPU %d = %d\n", CPU_MAJOR_0, utils::set_cpu_affinity(&cpu[0], cpu.size()));
#endif
img.pos.paper_all = 1;
img.pos.ind_in_paper = 0;
avail_mem.enable_wait_log(false);
motor_->clear_error();
if(paper_ready)
motor_->start();
scanstream.mode = count_mode_ ? devui::SCAN_COUNT_MODE : devui::SCAN_NORMAL;

View File

@ -84,8 +84,11 @@ void rebuild::do_rebuild(LPPACKIMAGE info, uint8_t* stream, std::vector<PROCIMGI
o.info.prc_stage = get_position();
o.info.pos.paper_side = PAPER_SIDE_FRONT;
o.info.pos.paper_all = 2;
o.info.pos.ind_in_paper = 0;
out.push_back(o);
o.info.pos.paper_side = PAPER_SIDE_BACK;
o.info.pos.ind_in_paper = 1;
out.push_back(o);
if(info->width == linel) // gray

View File

@ -468,8 +468,14 @@ void imgproc_mgr::send_image(LPPAGEDPARAM obj, std::vector<PROCIMGINFO>& imgs, b
// }
// }
int total = imgs.size(),
ind = 0;
for(auto& v: imgs)
{
v.info.pos.paper_all = total;
v.info.pos.ind_in_paper = ind++;
imgproc_mgr::send_image(obj, &v.info, v.img, v.ext_info.empty() ? nullptr : &v.ext_info[0], v.ext_info.length(), last);
}
// if(last)
// sent_ind_++;

View File

@ -402,7 +402,7 @@ public:
#define FUNCTION_PROTO_PARAMETERS dyn_mem_ptr, uint32_t*, packet_data_base_ptr*
#define FUNCTION_PROTO_COMMAND_HANDLE dyn_mem_ptr(FUNCTION_PROTO_PARAMETERS)
#define USE_THREAD_PAGED_DATA
// #define USE_THREAD_PAGED_DATA
#define REBUILD_IN_CIS_THREAD
// #define BIND_CPU

View File

@ -293,7 +293,9 @@ typedef struct _config_val
typedef struct _img_pos
{
uint64_t paper_ind : 32; // paper index in this turn/start, based ZERO. (image-collector set)
uint64_t paper_ind : 22; // paper index in this turn/start, based ONE. (image-collector set)
uint64_t paper_all : 5; // total images of this paper
uint64_t ind_in_paper: 5; // image index of this paper, based ZERO
uint64_t new_img : 1; // 0 - partial data; 1 - new image data. (image-collector set)
uint64_t img_over : 1; // 0 - has data yet; 1 - END for the image. (image-collector set)
uint64_t paper_side : 3; // enum paper_side. front of paper(When scanning multiple sheets, the paper feeding side is the front side). (image-collector set)