drivers: aes2550: handle tapping without swiping

When tapping on the sensor rather than swiping through it, super RSR will
drop slices with 0-3 pixels of Y motion. In such case, self->strips_len is
zero and causing protocol error. Handle such cases by calling for a re-scan.

Closes: https://gitlab.freedesktop.org/libfprint/libfprint/-/work_items/786
Assisted-by: DeepSeek:deepseek-v4-pro-preview
Signed-off-by: Shengyu Qu <wiagn@4d2.org>
This commit is contained in:
Shengyu Qu
2026-07-21 21:57:50 +08:00
parent 56edcf7802
commit 20debe2ee4
+11 -5
View File
@@ -245,13 +245,19 @@ capture_set_idle_reqs_cb (FpiUsbTransfer *transfer,
/* marking machine complete will re-trigger finger detection loop */
fpi_ssm_mark_completed (transfer->ssm);
}
else if (!error)
{
/* No image frames were captured (e.g. user tapped without swiping).
* Such case is quite easy to happen, since Super RSR is enabled and
* thus "Slices with 0-3 pixels of Y motion are discarded" according
* to the design specification manual. */
fpi_image_device_retry_scan (dev, FP_DEVICE_RETRY_TOO_SHORT);
fpi_image_device_report_finger_status (dev, FALSE);
fpi_ssm_mark_completed (transfer->ssm);
}
else
{
if (error)
fpi_ssm_mark_failed (transfer->ssm, error);
else
fpi_ssm_mark_failed (transfer->ssm,
fpi_device_error_new (FP_DEVICE_ERROR_PROTO));
fpi_ssm_mark_failed (transfer->ssm, error);
}
}