examples: Remove sleep call in enroll examples
The call to sleep(1) inside of the enrollment loop caused a crash on at least the etes603 driver. Because in fp_enroll_finger_img the function enters an event handling loop. This loop needs to start before the next libusb event timeout. Which would not happen in the etes603 driver because the timeout there was set to 1 second as well.
This commit is contained in:
parent
6764ec79ae
commit
6ba9439bbb
2 changed files with 1 additions and 3 deletions
|
@ -46,7 +46,6 @@ struct fp_print_data *enroll(struct fp_dev *dev) {
|
||||||
do {
|
do {
|
||||||
struct fp_img *img = NULL;
|
struct fp_img *img = NULL;
|
||||||
|
|
||||||
sleep(1);
|
|
||||||
printf("\nScan your finger now.\n");
|
printf("\nScan your finger now.\n");
|
||||||
|
|
||||||
r = fp_enroll_finger_img(dev, &enrolled_print, &img);
|
r = fp_enroll_finger_img(dev, &enrolled_print, &img);
|
||||||
|
|
|
@ -43,7 +43,6 @@ struct fp_print_data *enroll(struct fp_dev *dev) {
|
||||||
"complete the process.\n", fp_dev_get_nr_enroll_stages(dev));
|
"complete the process.\n", fp_dev_get_nr_enroll_stages(dev));
|
||||||
|
|
||||||
do {
|
do {
|
||||||
sleep(1);
|
|
||||||
printf("\nScan your finger now.\n");
|
printf("\nScan your finger now.\n");
|
||||||
r = fp_enroll_finger(dev, &enrolled_print);
|
r = fp_enroll_finger(dev, &enrolled_print);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
|
|
Loading…
Reference in a new issue