goodixmoc: Ensure power button shield is always turned off
Use the new cleanup feature of the SSM to ensure that the power button shield is turned off again even if the operation is cancelled.
This commit is contained in:
parent
9416f91c75
commit
11e379050f
1 changed files with 8 additions and 4 deletions
|
@ -1443,8 +1443,10 @@ gx_fp_verify_identify (FpDevice *device)
|
||||||
{
|
{
|
||||||
FpiDeviceGoodixMoc *self = FPI_DEVICE_GOODIXMOC (device);
|
FpiDeviceGoodixMoc *self = FPI_DEVICE_GOODIXMOC (device);
|
||||||
|
|
||||||
self->task_ssm = fpi_ssm_new (device, fp_verify_sm_run_state,
|
self->task_ssm = fpi_ssm_new_full (device, fp_verify_sm_run_state,
|
||||||
FP_VERIFY_NUM_STATES);
|
FP_VERIFY_NUM_STATES,
|
||||||
|
FP_VERIFY_PWR_BTN_SHIELD_OFF,
|
||||||
|
"verify");
|
||||||
|
|
||||||
fpi_ssm_start (self->task_ssm, fp_verify_ssm_done);
|
fpi_ssm_start (self->task_ssm, fp_verify_ssm_done);
|
||||||
|
|
||||||
|
@ -1459,8 +1461,10 @@ gx_fp_enroll (FpDevice *device)
|
||||||
self->enroll_stage = 0;
|
self->enroll_stage = 0;
|
||||||
self->is_enroll_identify = true;
|
self->is_enroll_identify = true;
|
||||||
|
|
||||||
self->task_ssm = fpi_ssm_new (device, fp_enroll_sm_run_state,
|
self->task_ssm = fpi_ssm_new_full (device, fp_enroll_sm_run_state,
|
||||||
FP_ENROLL_NUM_STATES);
|
FP_ENROLL_NUM_STATES,
|
||||||
|
FP_ENROLL_PWR_BTN_SHIELD_OFF,
|
||||||
|
"enroll");
|
||||||
|
|
||||||
fpi_ssm_start (self->task_ssm, fp_enroll_ssm_done);
|
fpi_ssm_start (self->task_ssm, fp_enroll_ssm_done);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue