From: Caisking Date: Fri, 26 Sep 2025 06:56:02 +0000 (+0800) Subject: Merge branch 'sdk650pathc0423' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0... X-Git-Tag: V1.0.9_20251128_194606_LN~250^2~45^2~7 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=afd64a247ee3636d322ddf4a413f312cd7b2ea20;p=mirrors%2FFD230.git Merge branch 'sdk650pathc0423' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk650pathc0423 --- afd64a247ee3636d322ddf4a413f312cd7b2ea20 diff --cc code/sdk/zhihui/leiniao/imsl_ln/leiniao_api_at.c index 3ec78cbfc,d3448af49..88ffcd446 --- a/code/sdk/zhihui/leiniao/imsl_ln/leiniao_api_at.c +++ b/code/sdk/zhihui/leiniao/imsl_ln/leiniao_api_at.c @@@ -1352,48 -1419,8 +1424,50 @@@ static uint32_t ln_get_device_version_a printf("deviceVersion: %s\n", deviceVersion); return ERRCODE_SUCC; } + +/* AT^LN_SET_FPS - 设置帧率 */ +static uint32_t ln_set_fps_at(uint8_t *para, uint32_t paraLen, char *strCommonCmd) +{ + VAD_UNUSED(strCommonCmd); + + if (para == NULL || paraLen == 0) { + printf("[LN][SET_FPS] Error: No parameter provided\n"); + printf("Usage: AT^LN_SET_FPS=\n"); + printf("Example: AT^LN_SET_FPS=60\n"); + return ERRCODE_FAIL; + } + + // 解析参数 + char fps_str[16] = {0}; + if (paraLen >= sizeof(fps_str)) { + printf("[LN][SET_FPS] Error: Parameter too long\n"); + return ERRCODE_FAIL; + } + + memcpy(fps_str, para, paraLen); + fps_str[paraLen] = '\0'; + + // 转换为整数 + int fps_value = atoi(fps_str); + + // 验证帧率范围 (1-120 FPS) + if (fps_value < 1 || fps_value > 120) { + printf("[LN][SET_FPS] Error: FPS value must be between 1 and 120, got: %d\n", fps_value); + return ERRCODE_FAIL; + } + + printf("[LN][SET_FPS] Setting FPS to: %d\n", fps_value); + + // 调用统一的C接口设置帧率 + do_set_fps((uint32_t)fps_value); + printf("[LN][SET_FPS] Successfully set FPS to: %d\n", fps_value); + return ERRCODE_SUCC; +} + +/* AT^LN_GET_FPS - 获取当前帧率 */ +static uint32_t ln_get_fps_at(uint8_t *para, uint32_t paraLen, char *strCommonCmd) + /* AT^LN_DOWNLOAD_EMOJI */ + static uint32_t ln_download_emoji_at(uint8_t *para, uint32_t paraLen, char *strCommonCmd) { VAD_UNUSED(para); VAD_UNUSED(paraLen);