diff options
author | haoweilo <haowei.lo@fingerprints.com> | 2024-03-20 16:29:36 +0800 |
---|---|---|
committer | Marco Trevisan <mail@3v1n0.net> | 2024-04-17 08:33:24 +0000 |
commit | 420fd7416dcbe242a507fd93c89a3bd44f6d8a1f (patch) | |
tree | da3f9e664ed3bc71d58ad701ffd918071ac47807 | |
parent | f505158c04119152c26f92bdf328e949eb0a5c2c (diff) |
fpcmoc: fix incorrect immobile handling during enrollment
For the custom enrollment,
if the number of immobile touches have reached the maximum,
we should treat this touch as normal (valid) and increase
the enrollment progress.
-rw-r--r-- | libfprint/drivers/fpcmoc/fpc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libfprint/drivers/fpcmoc/fpc.c b/libfprint/drivers/fpcmoc/fpc.c index 87ab154..0a7bc14 100644 --- a/libfprint/drivers/fpcmoc/fpc.c +++ b/libfprint/drivers/fpcmoc/fpc.c @@ -741,15 +741,19 @@ fpc_enroll_update_cb (FpiDeviceFpcMoc *self, /* here should tips remove finger and try again */ if (self->max_immobile_stage) { - if (self->immobile_stage >= self->max_immobile_stage) + self->immobile_stage++; + if (self->immobile_stage > self->max_immobile_stage) { fp_dbg ("Skip similar handle due to customer enrollment %d(%d)", self->immobile_stage, self->max_immobile_stage); /* Skip too similar handle, treat as normal enroll progress. */ - fpi_ssm_jump_to_state (self->task_ssm, FPC_ENROL_STATUS_PROGRESS); + self->enroll_stage++; + fpi_device_enroll_progress (FP_DEVICE (self), self->enroll_stage, NULL, NULL); + /* Used for customer enrollment scheme */ + if (self->enroll_stage >= (self->max_enroll_stage - self->max_immobile_stage)) + fpi_ssm_jump_to_state (self->task_ssm, FP_ENROLL_COMPLETE); break; } - self->immobile_stage++; } fpi_device_enroll_progress (FP_DEVICE (self), self->enroll_stage, |