mirror of
https://github.com/morgan9e/libfprint-fpc1020
synced 2026-04-14 16:34:24 +09:00
fpcmoc: add error handling to evt_finger_dwn
Redo the current task state if we got failed status from evt_finger_dwn
This commit is contained in:
@@ -445,10 +445,16 @@ fpc_evt_cb (FpiDeviceFpcMoc *self,
|
||||
break;
|
||||
|
||||
case FPC_EVT_FINGER_DWN:
|
||||
fp_dbg ("%s Got finger down event", G_STRFUNC);
|
||||
fp_dbg ("%s Got finger down event (%d)", G_STRFUNC, presp->evt_hdr.status);
|
||||
fpi_device_report_finger_status_changes (FP_DEVICE (self),
|
||||
FP_FINGER_STATUS_PRESENT,
|
||||
FP_FINGER_STATUS_NONE);
|
||||
if (presp->evt_hdr.status != 0)
|
||||
{
|
||||
/* Redo the current task state if capture failed */
|
||||
fpi_ssm_jump_to_state (self->task_ssm, fpi_ssm_get_cur_state (self->task_ssm));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case FPC_EVT_IMG:
|
||||
|
||||
Reference in New Issue
Block a user