From d2a0eda56c88a484390694d6158d7557b3f55fce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 28 Sep 2022 01:21:31 +0200 Subject: [PATCH] synaptics, goodix: Properly check for finger status during enroll progress It may contain other values, but for sure we finger must be neeeded --- tests/goodixmoc/custom.py | 2 +- tests/synaptics/custom.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 tests/goodixmoc/custom.py diff --git a/tests/goodixmoc/custom.py b/tests/goodixmoc/custom.py old mode 100755 new mode 100644 index 38fdd26c..73f90a53 --- a/tests/goodixmoc/custom.py +++ b/tests/goodixmoc/custom.py @@ -31,7 +31,7 @@ d.clear_storage_sync() template = FPrint.Print.new(d) def enroll_progress(*args): - assert d.get_finger_status() == FPrint.FingerStatusFlags.NEEDED + assert d.get_finger_status() & FPrint.FingerStatusFlags.NEEDED print('enroll progress: ' + str(args)) def identify_done(dev, res): diff --git a/tests/synaptics/custom.py b/tests/synaptics/custom.py index 0a88ef80..5b4b1481 100755 --- a/tests/synaptics/custom.py +++ b/tests/synaptics/custom.py @@ -51,7 +51,7 @@ d.clear_storage_sync() template = FPrint.Print.new(d) def enroll_progress(*args): - #assert d.get_finger_status() == FPrint.FingerStatusFlags.NEEDED + assert d.get_finger_status() & FPrint.FingerStatusFlags.NEEDED print('enroll progress: ' + str(args)) # List, enroll, list, verify, delete, list