From 656bf3d17519f53cdcfc00fb78c4e9265da7cbc4 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Wed, 18 Nov 2020 15:17:13 +0100 Subject: [PATCH] elan: Add a few comments that stopping/callibrating helps Apparently stopping/callibrating helps with the reliability of these sensors. Add a few comments so that this information is known. See https://gitlab.freedesktop.org/libfprint/libfprint/-/issues/216#note_619467 --- libfprint/drivers/elan.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libfprint/drivers/elan.c b/libfprint/drivers/elan.c index a4d624d..cb7e88f 100644 --- a/libfprint/drivers/elan.c +++ b/libfprint/drivers/elan.c @@ -607,6 +607,10 @@ capture_complete (FpiSsm *ssm, FpDevice *_dev, GError *error) fpi_image_device_session_error (dev, error); } + /* Note: We always stop capturing even if that may not be needed always. + * Doing this between captures appears to make it at least less likely for + * devices to end up in a bad state. + */ elan_stop_capture (self); } @@ -955,6 +959,10 @@ dev_change_state (FpImageDevice *dev, FpiImageDeviceState state) G_DEBUG_HERE (); + /* Note: We always calibrate even if that may not be needed always. + * Doing this for each capture appears to make it at least less likely for + * devices to end up in a bad state. + */ if (state == FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON) elan_calibrate (self); }