Go to file
luocai 2661f0729a
All checks were successful
Build Applications / PullDocker (push) Successful in 7s
Build Applications / Build (push) Successful in 2m26s
Windows CI / build (push) Successful in 3m41s
optimize communicate stop.
2024-10-25 17:18:09 +08:00
.gitea/workflows fix ci. 2024-10-16 01:38:35 +08:00
Analyser optimize communicate stop. 2024-10-25 17:18:09 +08:00
Database add linux. 2024-09-03 23:30:45 +08:00
OtaUpdate optimize communicate stop. 2024-10-25 17:18:09 +08:00
Peripheral update for linux. 2024-10-02 03:13:15 +08:00
resources optimize communicate stop. 2024-10-25 17:18:09 +08:00
UnitTest update for linux. 2024-10-02 03:13:15 +08:00
.clang-format first commit 2024-05-17 10:36:23 +08:00
.gitignore first commit 2024-05-17 10:36:23 +08:00
CMakeLists.txt fix ci. 2024-10-16 00:46:15 +08:00
Readme.md optimize communicate stop. 2024-10-25 17:18:09 +08:00

枚举视频捕获设备:https://learn.microsoft.com/zh-cn/windows/win32/medfound/enumerating-video-capture-devices

媒体基础中的音频/视频捕获:https://learn.microsoft.com/zh-cn/windows/win32/medfound/audio-video-capture-in-media-foundation里面有枚举打印示例代码

如何设置视频捕获格式:https://learn.microsoft.com/zh-cn/windows/win32/medfound/how-to-set-the-video-capture-format

palmDetectionProcess
facePalmDetectionProcess # 处理每帧在MPP的回调函数里面
uart_msg_proc() -> cmd_exec()执行串口协议命令

sock_cmd_exec() 内部线程逻辑之间通信

线程函数frame_proc_task()
algo_cb()->onFacePalmDetectionPassed()->app_server_alive()->sock_cmd_exec:SOCK_CMD__ALIVE_PALM

ST__PlamRegister()->__PalmRegister() -> PalmFeatureExtract() -> spv2_get_feature()

frame_proc_task()
frame_sync_task() // L015 V200 __DUAL_SNS_FAKE__ 双sensor活体

门锁开发环境搭建

smart_doorbell 文件夹、cv181xc_qfn。 CONSOLE_UART_IDX 业务串口2

安装如下 python 环境:

sudo apt-get install lz4 unzip python3-pip
pip3 install yoctools # 安装在 ~/.local 目录下

# Ubuntu下product实际为product64
cd ~/.local/bin
ln -s product64 product

# 以下两条命令打印版本验证是否安装成功如无版本信息输出最好重启一下机器。可能安装yoctools后可能yoc、product还找不到
yoc -V	
product version

# 将 python 软链接定向为 python3
cd /usr/bin
ln -s python3 python

原门锁构建环境应该是采用 CenterOS 搭建的,所以很多脚本使用的是 sh,在 Ubuntu 环境下,需要注意构建输出,一旦出现疑似脚本错误的问题,可以将脚本开头的 #/bin/sh 改为 #/bin/bash 再重试。例如脚本文件 Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1/bin/riscv64-unknown-elf-g++

修改编译器位置,我习惯于将编译器独立于项目工程之外:

HOST_TOOLS := /opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1/bin

上述步骤执行完毕之后,即可编译打包:

./boot-rebuild.sh # 编译boot
./rebuild-app.sh y L015 V200 R002	# 编译烧录固件

# 编译OTA固件11为OTA版本号,这个版本号只做固件文件名显示。
# 实际的版本设置在 cv181x_alios/solutions/smart_doorbell/package.yaml.L015_V200R002 
600X800

docker run -it --rm --user 1000:1000 -v /opt:/opt -v $(pwd)/..:$(pwd)/.. -w $(pwd) registry.cn-shenzhen.aliyuncs.com/amass_toolset/yoctools:22.04 ./rebuild-app.sh y L015 V200 R002

docker run -it --rm --user 1000:1000 -v /opt:/opt -v $(pwd)/..:$(pwd)/.. -w $(pwd) registry.cn-shenzhen.aliyuncs.com/amass_toolset/yoctools:22.04 ./rebuild-app-ota.sh y L015 V200 R002 06

Flash设置

__FLASH_16MB__
cv181x_alios/boards/cv181xc_qfn/configs/config.yaml
cv181x_alios/boards/cv181xc_qfn/configs/partition_alios_spinor.xml
cv181x_alios/solutions/smart_doorbell/face_lock_app/flash-part.h

修改cv181x_alios/pack-ota.sh,以支持将boot打进ota升级文件中。有升级变砖风险

# $ota_pack_tool $OTA_PKG imtb yoc.bin algo.bin.1 boot $@