imgdev: Add fpi_imgdev_abort_scan() to abort scan gracefully from within the driver.
Smart sensors like Upek TouchChip Coprocessor can provide scan status instead of image, as result we need to report such status as "short scan" or "finger not centered" from within the driver, since it's not a session error.
This commit is contained in:
parent
391373fb0c
commit
2944a35e74
2 changed files with 8 additions and 0 deletions
|
@ -483,6 +483,7 @@ void fpi_imgdev_deactivate_complete(struct fp_img_dev *imgdev);
|
|||
void fpi_imgdev_report_finger_status(struct fp_img_dev *imgdev,
|
||||
gboolean present);
|
||||
void fpi_imgdev_image_captured(struct fp_img_dev *imgdev, struct fp_img *img);
|
||||
void fpi_imgdev_abort_scan(struct fp_img_dev *imgdev, int result);
|
||||
void fpi_imgdev_session_error(struct fp_img_dev *imgdev, int error);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -217,6 +217,13 @@ static void identify_process_img(struct fp_img_dev *imgdev)
|
|||
imgdev->identify_match_offset = match_offset;
|
||||
}
|
||||
|
||||
void fpi_imgdev_abort_scan(struct fp_img_dev *imgdev, int result)
|
||||
{
|
||||
imgdev->action_result = result;
|
||||
imgdev->action_state = IMG_ACQUIRE_STATE_AWAIT_FINGER_OFF;
|
||||
dev_change_state(imgdev, IMGDEV_STATE_AWAIT_FINGER_OFF);
|
||||
}
|
||||
|
||||
void fpi_imgdev_image_captured(struct fp_img_dev *imgdev, struct fp_img *img)
|
||||
{
|
||||
struct fp_print_data *print;
|
||||
|
|
Loading…
Reference in a new issue