Skip to content

Commit

Permalink
add:添加usb摄像头端口选择
Browse files Browse the repository at this point in the history
  • Loading branch information
doudouladou committed Mar 4, 2025
1 parent e4d0bfb commit 7d792b2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/camera/luat_lib_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ static int l_camera_init(lua_State *L){
conf.id = luaL_checkinteger(L, -1);
}
lua_pop(L, 1);

lua_pushliteral(L, "usb_port");
lua_gettable(L, 1);
if (lua_isinteger(L, -1)) {
conf.usb_port = luaL_checkinteger(L, -1);
}
lua_pop(L, 1);

lua_pushliteral(L, "init_cmd");
lua_gettable(L, 1);
if (lua_istable(L, -1)) {
Expand Down

0 comments on commit 7d792b2

Please sign in to comment.