upektc_img: handle 0x28 message better

This commit is contained in:
Vasily Khoruzhick 2013-09-06 16:31:15 +03:00
parent dc537ef2c9
commit a3c90f2b24

View file

@ -267,8 +267,23 @@ static void capture_read_data_cb(struct libusb_transfer *transfer)
switch (data[7]) { switch (data[7]) {
/* No finger */ /* No finger */
case 0x28: case 0x28:
fp_dbg("18th byte is %.2x\n", data[18]);
switch (data[18]) {
case 0x0c:
/* no finger */
fpi_ssm_jump_to_state(ssm, CAPTURE_ACK_00_28); fpi_ssm_jump_to_state(ssm, CAPTURE_ACK_00_28);
break; break;
case 0x00:
/* finger is present! */
fpi_ssm_jump_to_state(ssm, CAPTURE_ACK_00_28);
break;
default:
/* some error happened, cancel scan */
fp_err("something bad happened, aborting scan :(\n");
fpi_ssm_mark_aborted(ssm, FP_VERIFY_RETRY_REMOVE_FINGER);
break;
}
break;
/* Image frame with additional info */ /* Image frame with additional info */
case 0x2c: case 0x2c:
fpi_imgdev_report_finger_status(dev, TRUE); fpi_imgdev_report_finger_status(dev, TRUE);