mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
elanspi: Move debug print so that it contains all information
Two of the printed variables were only calculated after the message was printed, making the logged information less useful than it could be.
This commit is contained in:
@@ -1219,8 +1219,6 @@ elanspi_guess_image (FpiDeviceElanSpi *self, guint16 *raw_image)
|
||||
|
||||
sq_stddev /= (frame_width * frame_height);
|
||||
|
||||
fp_dbg ("<guess> stddev=%" G_GUINT64_FORMAT "d, ip=%d, is_fp=%d, is_empty=%d", sq_stddev, invalid_percent, is_fp, is_empty);
|
||||
|
||||
if (invalid_percent < ELANSPI_MAX_REAL_INVALID_PERCENT)
|
||||
is_fp += 1;
|
||||
if (invalid_percent > ELANSPI_MIN_EMPTY_INVALID_PERCENT)
|
||||
@@ -1231,6 +1229,8 @@ elanspi_guess_image (FpiDeviceElanSpi *self, guint16 *raw_image)
|
||||
if (sq_stddev < ELANSPI_MAX_EMPTY_STDDEV)
|
||||
is_empty += 1;
|
||||
|
||||
fp_dbg ("<guess> stddev=%" G_GUINT64_FORMAT "d, ip=%d, is_fp=%d, is_empty=%d", sq_stddev, invalid_percent, is_fp, is_empty);
|
||||
|
||||
if (is_fp > is_empty)
|
||||
return ELANSPI_GUESS_FINGERPRINT;
|
||||
else if (is_empty > is_fp)
|
||||
|
||||
Reference in New Issue
Block a user