Skip to content

Commit 72d37cf

Browse files
committed
Use an old chunk type for finger detect.
1 parent 9d27a25 commit 72d37cf

1 file changed

Lines changed: 21 additions & 12 deletions

File tree

validitysensor/sensor.py

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -458,24 +458,33 @@ def line_update_type_1(self, mode: CaptureMode,
458458
chunks += [[0x17, b'']]
459459

460460
if mode == CaptureMode.IDENTIFY:
461-
# This type of fragment is not present in the debugging dump routine.
462-
# It seems to be only used for identification and it looks almost identical to Finger Detect (0x26)
463-
# Seems to be the same all the time for a given sensor and mostly hardcoded
464-
# TODO: analyse construct_wtf_4e @0000000180090BF0
465-
chunks += [[
466-
0x4e,
467-
unhexlify(
468-
'fbb20f0000000f00300000008700020067000a00018000000a0200000b1900008813b80b01091000'
469-
)
470-
]]
461+
# Finger Detect
462+
# TODO This is not fully hardcoded - analyse how it is constructed
463+
if self.device_info.type == 0x1825:
464+
chunks += [[
465+
0x26,
466+
unhexlify(
467+
'fbb20f0000000f00300000005400020034000a00018000000a0200000b19000050c360ea01091000'
468+
)
469+
]]
470+
else:
471+
# This type of fragment is not present in the debugging dump routine.
472+
# It seems to be only used for identification and it looks almost identical to Finger Detect (0x26)
473+
# Seems to be the same all the time for a given sensor and mostly hardcoded
474+
# TODO: analyse construct_wtf_4e @0000000180090BF0
475+
chunks += [[
476+
0x4e,
477+
unhexlify(
478+
'fbb20f0000000f00300000008700020067000a00018000000a0200000b1900008813b80b01091000'
479+
)
480+
]]
481+
471482
# Image Reconstruction.
472483
# TODO: analyse add_image_reconstruction_cmd_02_buff_list_item @000000018008EA70
473484
chunks += [[
474485
0x2e, unhexlify('0200180002000000700070004d010000a0008c003c32321e3c0a0202')
475486
]]
476487
elif mode == CaptureMode.ENROLL:
477-
# Finger Detect
478-
# TODO This is not fully hardcoded - analyse how it is constructed
479488
if self.device_info.type == 0x1825:
480489
chunks += [[
481490
0x26,

0 commit comments

Comments
 (0)