增加ini 人脸超时限制

This commit is contained in:
冯佳
2025-09-12 11:32:19 +08:00
parent 0557ba7f1c
commit a3bb7f0701
12 changed files with 248 additions and 167 deletions

View File

@ -87,6 +87,8 @@ CMD_NAMES = {
CMD_GET_VERSION: "获取版本信息",
CMD_INIT_ENCRYPTION: "初始化加密",
CMD_ENROLL_WITH_PHOTO: "照片录入注册",
CMD_FACE_VIEW: "人脸框显示切换",
CMD_UVC_VIEW: "视频模式切换",
}
# 结果码名称映射(结果码 -> 中文名称)
@ -218,7 +220,7 @@ def build_led_control(state: int) -> bytes:
#pd_rightaway: int验证成功后是否立即断电0=不立即断电1=立即断电仅保留低8位有效通过&0xFF确保
#timeout: int验证超时时间单位范围通常为1-255秒仅保留低8位有效通过&0xFF确保
def build_verify(pd_rightaway: int = 0, timeout: int = 10) -> bytes:
def build_verify(pd_rightaway, timeout: int = 10) -> bytes:
data = struct.pack("BB", pd_rightaway & 0xFF, timeout & 0xFF)
return pack_frame(CMD_VERIFY, data)