diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c index 3f7e3ad..9702f8a 100644 --- a/libfprint/drivers/synaptics/synaptics.c +++ b/libfprint/drivers/synaptics/synaptics.c @@ -82,10 +82,17 @@ cmd_receive_cb (FpiUsbTransfer *transfer, if (msg_resp.payload[0] == 0x01) { self->finger_on_sensor = TRUE; + fpi_device_report_finger_status_changes (device, + FP_FINGER_STATUS_PRESENT, + FP_FINGER_STATUS_NONE); } else { self->finger_on_sensor = FALSE; + fpi_device_report_finger_status_changes (device, + FP_FINGER_STATUS_NONE, + FP_FINGER_STATUS_PRESENT); + if (self->cmd_complete_on_removal) { fpi_ssm_mark_completed (transfer->ssm); @@ -596,6 +603,9 @@ verify_msg_cb (FpiDeviceSynaptics *self, switch (resp->response_id) { case BMKT_RSP_VERIFY_READY: + fpi_device_report_finger_status_changes (device, + FP_FINGER_STATUS_NEEDED, + FP_FINGER_STATUS_NONE); fp_info ("Place Finger on the Sensor!"); break; @@ -839,6 +849,9 @@ enroll_msg_cb (FpiDeviceSynaptics *self, case BMKT_RSP_ENROLL_READY: { self->enroll_stage = 0; + fpi_device_report_finger_status_changes (device, + FP_FINGER_STATUS_NEEDED, + FP_FINGER_STATUS_NONE); fp_info ("Place Finger on the Sensor!"); break; } diff --git a/tests/synaptics/custom.py b/tests/synaptics/custom.py index b0f1c54..a1d0352 100755 --- a/tests/synaptics/custom.py +++ b/tests/synaptics/custom.py @@ -20,11 +20,14 @@ d.open_sync() template = FPrint.Print.new(d) def enroll_progress(*args): + assert d.get_finger_status() == FPrint.FingerStatusFlags.NEEDED print('enroll progress: ' + str(args)) # List, enroll, list, verify, delete, list print("enrolling") +assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE p = d.enroll_sync(template, None, enroll_progress, None) +assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE print("enroll done") print("listing") @@ -33,7 +36,9 @@ print("listing done") assert len(stored) == 1 assert stored[0].equal(p) print("verifying") +assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE verify_res, verify_print = d.verify_sync(p) +assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE print("verify done") assert verify_res == True