synaptics: Report finger status to libfprint
The inactivation in case would be set back by libfprint
This commit is contained in:
parent
893ff9c033
commit
0c56e0de6d
2 changed files with 18 additions and 0 deletions
|
@ -82,10 +82,17 @@ cmd_receive_cb (FpiUsbTransfer *transfer,
|
||||||
if (msg_resp.payload[0] == 0x01)
|
if (msg_resp.payload[0] == 0x01)
|
||||||
{
|
{
|
||||||
self->finger_on_sensor = TRUE;
|
self->finger_on_sensor = TRUE;
|
||||||
|
fpi_device_report_finger_status_changes (device,
|
||||||
|
FP_FINGER_STATUS_PRESENT,
|
||||||
|
FP_FINGER_STATUS_NONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
self->finger_on_sensor = FALSE;
|
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)
|
if (self->cmd_complete_on_removal)
|
||||||
{
|
{
|
||||||
fpi_ssm_mark_completed (transfer->ssm);
|
fpi_ssm_mark_completed (transfer->ssm);
|
||||||
|
@ -596,6 +603,9 @@ verify_msg_cb (FpiDeviceSynaptics *self,
|
||||||
switch (resp->response_id)
|
switch (resp->response_id)
|
||||||
{
|
{
|
||||||
case BMKT_RSP_VERIFY_READY:
|
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!");
|
fp_info ("Place Finger on the Sensor!");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -839,6 +849,9 @@ enroll_msg_cb (FpiDeviceSynaptics *self,
|
||||||
case BMKT_RSP_ENROLL_READY:
|
case BMKT_RSP_ENROLL_READY:
|
||||||
{
|
{
|
||||||
self->enroll_stage = 0;
|
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!");
|
fp_info ("Place Finger on the Sensor!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,11 +20,14 @@ d.open_sync()
|
||||||
template = FPrint.Print.new(d)
|
template = FPrint.Print.new(d)
|
||||||
|
|
||||||
def enroll_progress(*args):
|
def enroll_progress(*args):
|
||||||
|
assert d.get_finger_status() == FPrint.FingerStatusFlags.NEEDED
|
||||||
print('enroll progress: ' + str(args))
|
print('enroll progress: ' + str(args))
|
||||||
|
|
||||||
# List, enroll, list, verify, delete, list
|
# List, enroll, list, verify, delete, list
|
||||||
print("enrolling")
|
print("enrolling")
|
||||||
|
assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE
|
||||||
p = d.enroll_sync(template, None, enroll_progress, None)
|
p = d.enroll_sync(template, None, enroll_progress, None)
|
||||||
|
assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE
|
||||||
print("enroll done")
|
print("enroll done")
|
||||||
|
|
||||||
print("listing")
|
print("listing")
|
||||||
|
@ -33,7 +36,9 @@ print("listing done")
|
||||||
assert len(stored) == 1
|
assert len(stored) == 1
|
||||||
assert stored[0].equal(p)
|
assert stored[0].equal(p)
|
||||||
print("verifying")
|
print("verifying")
|
||||||
|
assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE
|
||||||
verify_res, verify_print = d.verify_sync(p)
|
verify_res, verify_print = d.verify_sync(p)
|
||||||
|
assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE
|
||||||
print("verify done")
|
print("verify done")
|
||||||
assert verify_res == True
|
assert verify_res == True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue