Revert experimental params to factory defaults
Remove threshold, enrollment stages, frame count, and timing experiments — none produced reliable security on the 04f3:0c6e power-button sensor due to bz3's inability to distinguish adjacent fingers on small dark images from this form factor. Retained fixes: - ELAN_CALIBRATION_MAX_DELTA=65535: skip unreliable recalibration loop - Polling fallback in CAPTURE_READ_DATA: prevent sensor overheating - Dark frame → fpi_ssm_mark_completed: graceful end-of-swipe All other values restored to upstream v1.94.10 defaults.
This commit is contained in:
parent
baefc0d879
commit
2934ca2b6e
@ -564,18 +564,12 @@ capture_run_state (FpiSsm *ssm, FpDevice *dev)
|
|||||||
r = elan_save_img_frame (self);
|
r = elan_save_img_frame (self);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
{
|
{
|
||||||
/* Frame was indistinguishable from background (dark frame / finger lifted
|
/* Frame was indistinguishable from background — treat as end-of-swipe */
|
||||||
* mid-capture). Treat as end-of-swipe rather than hard failure — the
|
|
||||||
* frames already accumulated may still be usable. */
|
|
||||||
fpi_ssm_mark_completed (ssm);
|
fpi_ssm_mark_completed (ssm);
|
||||||
}
|
}
|
||||||
else if (self->num_frames < ELAN_MAX_FRAMES)
|
else if (self->num_frames < ELAN_MAX_FRAMES)
|
||||||
{
|
{
|
||||||
/* Loop back via WAIT_FINGER so the device can re-arm its finger
|
/* quickly stop if finger is removed */
|
||||||
* detection. ELAN_FINGER_TIMEOUT controls how long to wait — if
|
|
||||||
* the finger is still pressed the device returns 0x55 again and
|
|
||||||
* we capture another frame; if the finger is lifted it times out
|
|
||||||
* and capture ends. A longer timeout allows tap/hold behaviour. */
|
|
||||||
self->cmd_timeout = ELAN_FINGER_TIMEOUT;
|
self->cmd_timeout = ELAN_FINGER_TIMEOUT;
|
||||||
fpi_ssm_jump_to_state (ssm, CAPTURE_WAIT_FINGER);
|
fpi_ssm_jump_to_state (ssm, CAPTURE_WAIT_FINGER);
|
||||||
}
|
}
|
||||||
@ -770,7 +764,7 @@ calibrate_run_state (FpiSsm *ssm, FpDevice *dev)
|
|||||||
if (self->calib_status == 0x00 &&
|
if (self->calib_status == 0x00 &&
|
||||||
self->last_read[0] == 0x01)
|
self->last_read[0] == 0x01)
|
||||||
self->calib_status = 0x01;
|
self->calib_status = 0x01;
|
||||||
fpi_ssm_next_state_delayed (ssm, 100);
|
fpi_ssm_next_state_delayed (ssm, 50);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1016,7 +1010,5 @@ fpi_device_elan_class_init (FpiDeviceElanClass *klass)
|
|||||||
img_class->deactivate = dev_deactivate;
|
img_class->deactivate = dev_deactivate;
|
||||||
img_class->change_state = dev_change_state;
|
img_class->change_state = dev_change_state;
|
||||||
|
|
||||||
img_class->bz3_threshold = 2;
|
img_class->bz3_threshold = 24;
|
||||||
|
|
||||||
dev_class->nr_enroll_stages = 10;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,10 +47,10 @@
|
|||||||
|
|
||||||
/* times to retry reading calibration status during one session
|
/* times to retry reading calibration status during one session
|
||||||
* generally prevents calibration from looping indefinitely */
|
* generally prevents calibration from looping indefinitely */
|
||||||
#define ELAN_CALIBRATION_ATTEMPTS 100
|
#define ELAN_CALIBRATION_ATTEMPTS 10
|
||||||
|
|
||||||
/* min and max frames in a capture */
|
/* min and max frames in a capture */
|
||||||
#define ELAN_MIN_FRAMES 1
|
#define ELAN_MIN_FRAMES 7
|
||||||
#define ELAN_MAX_FRAMES 30
|
#define ELAN_MAX_FRAMES 30
|
||||||
|
|
||||||
/* crop frames to this height to improve stitching */
|
/* crop frames to this height to improve stitching */
|
||||||
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
/* number of frames to drop at the end of capture because frames captured
|
/* number of frames to drop at the end of capture because frames captured
|
||||||
* while the finger is being lifted can be bad */
|
* while the finger is being lifted can be bad */
|
||||||
#define ELAN_SKIP_LAST_FRAMES 0
|
#define ELAN_SKIP_LAST_FRAMES 2
|
||||||
|
|
||||||
#define ELAN_CMD_LEN 0x2
|
#define ELAN_CMD_LEN 0x2
|
||||||
#define ELAN_EP_CMD_OUT (0x1 | FPI_USB_ENDPOINT_OUT)
|
#define ELAN_EP_CMD_OUT (0x1 | FPI_USB_ENDPOINT_OUT)
|
||||||
@ -71,7 +71,7 @@
|
|||||||
/* usual command timeout and timeout for when we need to check if the finger is
|
/* usual command timeout and timeout for when we need to check if the finger is
|
||||||
* still on the device */
|
* still on the device */
|
||||||
#define ELAN_CMD_TIMEOUT 10000
|
#define ELAN_CMD_TIMEOUT 10000
|
||||||
#define ELAN_FINGER_TIMEOUT 350
|
#define ELAN_FINGER_TIMEOUT 200
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (FpiDeviceElan, fpi_device_elan, FPI, DEVICE_ELAN,
|
G_DECLARE_FINAL_TYPE (FpiDeviceElan, fpi_device_elan, FPI, DEVICE_ELAN,
|
||||||
FpImageDevice);
|
FpImageDevice);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user