python-validity/validitysensor/winbio_constants.py
2020-08-06 00:20:03 -04:00

36 lines
1.4 KiB
Python

finger_ids = {
# https://github.com/tpn/winsdk-10/blob/9b69fd26ac0c7d0b83d378dba01080e93349c2ed/Include/10.0.16299.0/shared/winbio_types.h#L864-L878
"WINBIO_ANSI_381_POS_UNKNOWN": 0,
"WINBIO_ANSI_381_POS_RH_THUMB": 1,
"WINBIO_ANSI_381_POS_RH_INDEX_FINGER": 2,
"WINBIO_ANSI_381_POS_RH_MIDDLE_FINGER": 3,
"WINBIO_ANSI_381_POS_RH_RING_FINGER": 4,
"WINBIO_ANSI_381_POS_RH_LITTLE_FINGER": 5,
"WINBIO_ANSI_381_POS_LH_THUMB": 6,
"WINBIO_ANSI_381_POS_LH_INDEX_FINGER": 7,
"WINBIO_ANSI_381_POS_LH_MIDDLE_FINGER": 8,
"WINBIO_ANSI_381_POS_LH_RING_FINGER": 9,
"WINBIO_ANSI_381_POS_LH_LITTLE_FINGER": 10,
"WINBIO_ANSI_381_POS_RH_FOUR_FINGERS": 13,
"WINBIO_ANSI_381_POS_LH_FOUR_FINGERS": 14,
"WINBIO_ANSI_381_POS_TWO_THUMBS": 15,
# https://github.com/tpn/winsdk-10/blob/9b69fd26ac0c7d0b83d378dba01080e93349c2ed/Include/10.0.16299.0/shared/winbio_types.h#L920-L929
"WINBIO_FINGER_UNSPECIFIED_POS_01": 0xf5,
"WINBIO_FINGER_UNSPECIFIED_POS_02": 0xf6,
"WINBIO_FINGER_UNSPECIFIED_POS_03": 0xf7,
"WINBIO_FINGER_UNSPECIFIED_POS_04": 0xf8,
"WINBIO_FINGER_UNSPECIFIED_POS_05": 0xf9,
"WINBIO_FINGER_UNSPECIFIED_POS_06": 0xfa,
"WINBIO_FINGER_UNSPECIFIED_POS_07": 0xfb,
"WINBIO_FINGER_UNSPECIFIED_POS_08": 0xfc,
"WINBIO_FINGER_UNSPECIFIED_POS_09": 0xfd,
"WINBIO_FINGER_UNSPECIFIED_POS_10": 0xfe
}
# Store the keys in the reverse order for faster lookups
finger_names = {}
for name, index in finger_ids.items():
finger_names[index] = name