Enrollment tweaks

upekts will need to know when the first enrollment stage is attempted for
the first time, so add an __enroll_stage counter which actually indicates
the next stage to enroll. -1 is a special value and it means 0 is next *and*
it is the initial attemt.

Added more debug output to the enroll handler.
Added new fp_enroll_status codes for too short or uncentered scans.

Changed the print_data allocator to consider the device rather than the
driver, this feels more natural. Added missing return value.

Make fp_enroll_status codes start at 1. 0 can now be used as a
special/temporary value by the drivers. Also check that we aren't exceeding
the number of enroll stages.

Also add a missing exit() call to the verify example and update for the
above.
This commit is contained in:
Daniel Drake
2007-10-12 15:27:23 +01:00
committed by Daniel Drake
parent e6624fe508
commit 50e2de0730
5 changed files with 69 additions and 8 deletions

View File

@@ -43,10 +43,12 @@ const char *fp_driver_get_full_name(const struct fp_driver *drv);
/* Enrolment */
enum fp_enroll_status {
FP_ENROLL_COMPLETE,
FP_ENROLL_COMPLETE = 1,
FP_ENROLL_FAIL,
FP_ENROLL_PASS,
FP_ENROLL_RETRY,
FP_ENROLL_RETRY_TOO_SHORT,
FP_ENROLL_RETRY_CENTER_FINGER,
};
enum fp_enroll_status fp_enroll_finger(struct fp_dev *dev,