mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
elan: Simplify elan driver internal state machine
The elan driver always "deactivates" the device after a cpature run. We can simplify the while internal state into a single "active" state and rely on the image device driving this state machine correctly. i.e.: * We start a callibrate/capture/deactivate when we go into the AWAIT_FINGER_ON state * We only store the fact that we are active and want to deactivate * We rely on the image device never going into the AWAIT_FINGER_ON state without first waiting for the finger to be off (which implies deactivation).
This commit is contained in:
@@ -70,6 +70,9 @@
|
||||
#define ELAN_CMD_TIMEOUT 10000
|
||||
#define ELAN_FINGER_TIMEOUT 200
|
||||
|
||||
G_DECLARE_FINAL_TYPE (FpiDeviceElan, fpi_device_elan, FPI, DEVICE_ELAN,
|
||||
FpImageDevice);
|
||||
|
||||
struct elan_cmd
|
||||
{
|
||||
unsigned char cmd[ELAN_CMD_LEN];
|
||||
@@ -218,8 +221,8 @@ static void elan_cmd_done (FpiSsm *ssm);
|
||||
static void elan_cmd_read (FpiSsm *ssm,
|
||||
FpDevice *dev);
|
||||
|
||||
static void elan_calibrate (FpDevice *dev);
|
||||
static void elan_capture (FpDevice *dev);
|
||||
static void elan_calibrate (FpiDeviceElan *self);
|
||||
static void elan_capture (FpiDeviceElan *self);
|
||||
|
||||
static void dev_change_state (FpImageDevice *dev,
|
||||
FpiImageDeviceState state);
|
||||
|
||||
Reference in New Issue
Block a user