diff options
author | Benjamin Berg <bberg@redhat.com> | 2021-12-02 13:28:12 +0100 |
---|---|---|
committer | Benjamin Berg <bberg@redhat.com> | 2021-12-02 13:53:54 +0100 |
commit | 31afd3ba5c24974c6030220154a8f93dd85429c2 (patch) | |
tree | fa537ee959bad465e5f7d1cd67c0a15703191869 | |
parent | 05fd2c58cb9965b60e3b39de93e06abfb4f286da (diff) |
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.
-rw-r--r-- | libfprint/drivers/elanspi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libfprint/drivers/elanspi.c b/libfprint/drivers/elanspi.c index daea67c..6ecd21b 100644 --- a/libfprint/drivers/elanspi.c +++ b/libfprint/drivers/elanspi.c @@ -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) |