Minor cleanup

This commit is contained in:
mikee512 2025-05-26 12:44:46 -04:00 committed by Xelef2000
parent 03cfc742fe
commit 2258cb88fe
2 changed files with 14 additions and 14 deletions

View file

@ -60,7 +60,7 @@ struct crfpmoc_enroll_data
int stage; /* stage of enrollment */
};
/* Data for the verify state machine
/* Data for the verify state machine (not yet used)
*/
struct crfpmoc_verify_data
{
@ -473,7 +473,6 @@ static gboolean
crfpmoc_read_bytes (gint fd, GIOCondition condition,
gpointer user_data)
{
// FpiDeviceCrfpMoc *self = FPI_DEVICE_CRFPMOC (user_data);
FpiSsm *ssm = (FpiSsm *) user_data;
struct crfpmoc_ssm_data *data = fpi_ssm_get_data (ssm);
int rv;
@ -482,8 +481,6 @@ crfpmoc_read_bytes (gint fd, GIOCondition condition,
struct crfpmoc_ec_response_get_next_event_v1 buffer = {0};
fp_dbg ("crfpmoc_read_bytes: called");
// if (fd != self->fd)
// goto one_shot_out;
/* If there is an active timeout on this state machine remove it */
if (data->timeout)
@ -934,7 +931,7 @@ crfmoc_cmd_fp_ensure_seed (FpiDeviceCrfpMoc *self,
}
static void
crfpmoc_show_proto_info (struct crfpmoc_ec_response_protocol_get_info *protocol_info)
crfpmoc_show_proto_info (struct crfpmoc_ec_response_get_protocol_info *protocol_info)
{
gsize len = 0;
gsize buflen = 256;
@ -956,7 +953,7 @@ static gboolean
crfpmoc_ec_max_insize (FpiDeviceCrfpMoc *self,
guint16 *max_insize, GError **error)
{
struct crfpmoc_ec_response_protocol_get_info protocol_info;
struct crfpmoc_ec_response_get_protocol_info protocol_info;
gboolean rv;
rv = crfpmoc_ec_command (self, CRFPMOC_EC_CMD_GET_PROTOCOL_INFO, 0, NULL, 0,
@ -975,7 +972,7 @@ static gboolean
crfpmoc_ec_max_outsize (FpiDeviceCrfpMoc *self,
guint16 *max_outsize, GError **error)
{
struct crfpmoc_ec_response_protocol_get_info protocol_info;
struct crfpmoc_ec_response_get_protocol_info protocol_info;
gboolean rv;
rv = crfpmoc_ec_command (self, CRFPMOC_EC_CMD_GET_PROTOCOL_INFO, 0, NULL, 0,
@ -1178,7 +1175,7 @@ crfpmoc_task_ssm_done (FpiSsm *ssm, FpDevice *device,
fp_dbg ("Task SSM done");
FpiDeviceCrfpMoc *self = FPI_DEVICE_CRFPMOC (device);
// g_assert (!self->task_ssm || self->task_ssm == ssm);
g_assert (!self->task_ssm || self->task_ssm == ssm);
self->task_ssm = NULL;
if (error)
@ -1347,7 +1344,7 @@ crfpmoc_ssm_timeout (gpointer user_data)
data->poll = 0;
}
/* Can't call the state machine from here, make sure we exit first */
/* Is it ok to call the state machine from here ? If not make sure we exit first */
fpi_ssm_jump_to_state_delayed (data->ssm, data->timeout_state, 1);
return FALSE;
}
@ -1519,7 +1516,7 @@ crfpmoc_enroll_run_state (FpiSsm *ssm, FpDevice *device)
handle_enroll_wait_enroll_complete (device, self);
break;
#if 0
#ifdef WAIT_ON_ENROLL
/* During self test recording following an enroll with a verify
* without lifting the finger seems to randomly fail. This
* solves the issue but leaves the default enroll screen waiting
@ -1744,7 +1741,7 @@ handle_verify_sensor_check (FpiSsm *ssm, FpDevice *device,
* error must be NULL
* print must be NULL
* FPI_MATCH_ERROR (retry)
* error must be valid
* error must be valid retry domain
* print must be NULL
* complete
* FPI_MATCH_SUCCESS
@ -1768,6 +1765,7 @@ handle_verify_sensor_check (FpiSsm *ssm, FpDevice *device,
* Error
* match must be NULL
* print must be NULL (we have no ability to return a print without enroll)
* error must be valid retry domain
* complete
* Successful match
* No match
@ -2045,7 +2043,7 @@ crfpmoc_verify_ssm_done (FpiSsm *ssm, FpDevice *device,
fp_dbg ("crfpmoc_verify_ssm_done");
FpiDeviceCrfpMoc *self = FPI_DEVICE_CRFPMOC (device);
// g_assert (!self->task_ssm || self->task_ssm == ssm);
g_assert (!self->task_ssm || self->task_ssm == ssm);
self->task_ssm = NULL;
/* If the state machine failed the report and completion was not

View file

@ -126,7 +126,7 @@ struct crfpmoc_ec_params_fp_template
} __attribute__((packed));
#define CRFPMOC_EC_CMD_GET_PROTOCOL_INFO 0x000B
struct crfpmoc_ec_response_protocol_get_info
struct crfpmoc_ec_response_get_protocol_info
{
/* Fields which exist if at least protocol version 3 supported */
guint32 protocol_versions;
@ -454,7 +454,9 @@ enum {
ENROLL_SENSOR_ENROLL, /* Enter enroll mode */
ENROLL_WAIT_ENROLL_COMPLETE, /* Wait for command completion event */
ENROLL_SENSOR_CHECK, /* Verify mode has indicated completion */
// ENROLL_WAIT_FINGER_UP, /* Wait for finger to be removed */
#ifdef WAIT_ON_ENROLL
ENROLL_WAIT_FINGER_UP, /* Wait for finger to be removed */
#endif
ENROLL_COMMIT, /* Download template and return print */
ENROLL_STATES,
};