mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
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:
committed by
Daniel Drake
parent
e6624fe508
commit
50e2de0730
@@ -60,6 +60,13 @@ struct fp_print_data *enroll(struct fp_dev *dev) {
|
||||
case FP_ENROLL_RETRY:
|
||||
printf("Didn't quite catch that. Please try again.\n");
|
||||
break;
|
||||
case FP_ENROLL_RETRY_TOO_SHORT:
|
||||
printf("Your swipe was too short, please try again.\n");
|
||||
break;
|
||||
case FP_ENROLL_RETRY_CENTER_FINGER:
|
||||
printf("Didn't catch that, please center your finger on the "
|
||||
"sensor and try again.\n");
|
||||
break;
|
||||
}
|
||||
} while (status != FP_ENROLL_COMPLETE);
|
||||
|
||||
@@ -103,6 +110,7 @@ int main(void)
|
||||
fp_dscv_devs_free(discovered_devs);
|
||||
if (!dev) {
|
||||
fprintf(stderr, "Could not open device.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
printf("Opened device. It's now time to enroll your finger.\n\n");
|
||||
|
||||
Reference in New Issue
Block a user