From 985e8c4577cf6e79c6f99cf0c694f4e732daab27 Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Sun, 15 Mar 2015 21:21:37 +0300 Subject: [PATCH] aes1660: set partial flag on an image Sensor width seems to be only 128 pixels and that's not enough for scanning whole finger surface. Lower bz3_threshold to 25, since for wrong finger score never goes above 10, but sometimes for right finger score is below 40. --- libfprint/drivers/aes1660.c | 3 ++- libfprint/drivers/aesx660.c | 1 + libfprint/drivers/aesx660.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libfprint/drivers/aes1660.c b/libfprint/drivers/aes1660.c index f931ba3..b221561 100644 --- a/libfprint/drivers/aes1660.c +++ b/libfprint/drivers/aes1660.c @@ -56,6 +56,7 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data) aesdev->start_imaging_cmd = (unsigned char *)aes1660_start_imaging_cmd; aesdev->start_imaging_cmd_len = sizeof(aes1660_start_imaging_cmd); aesdev->frame_width = FRAME_WIDTH; + aesdev->extra_img_flags = FP_IMG_PARTIAL; fpi_imgdev_open_complete(dev, 0); return 0; @@ -102,7 +103,7 @@ struct fp_img_driver aes1660_driver = { .flags = 0, .img_height = -1, .img_width = FRAME_WIDTH + FRAME_WIDTH / 2, - .bz3_threshold = 70, + .bz3_threshold = 20, .open = dev_init, .close = dev_deinit, diff --git a/libfprint/drivers/aesx660.c b/libfprint/drivers/aesx660.c index ec28a5b..433ba33 100644 --- a/libfprint/drivers/aesx660.c +++ b/libfprint/drivers/aesx660.c @@ -313,6 +313,7 @@ static void capture_set_idle_cmd_cb(struct libusb_transfer *transfer) aesdev->strips = g_slist_reverse(aesdev->strips); img = aes_assemble(aesdev->strips, aesdev->strips_len, aesdev->frame_width, FRAME_HEIGHT, aesdev->frame_width + aesdev->frame_width / 2); + img->flags |= aesdev->extra_img_flags; g_slist_foreach(aesdev->strips, (GFunc) g_free, NULL); g_slist_free(aesdev->strips); aesdev->strips = NULL; diff --git a/libfprint/drivers/aesx660.h b/libfprint/drivers/aesx660.h index 0510a43..044d809 100644 --- a/libfprint/drivers/aesx660.h +++ b/libfprint/drivers/aesx660.h @@ -61,6 +61,7 @@ struct aesX660_dev { unsigned char *start_imaging_cmd; size_t start_imaging_cmd_len; unsigned int frame_width; + uint16_t extra_img_flags; }; struct aesX660_cmd {