From: hcj <1224667075@qq.com> Date: Tue, 23 Jul 2024 03:15:17 +0000 (+0800) Subject: 增加活动数据过滤0不存 X-Git-Tag: release_V1.2.70_20241020_135402~759^2~3 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F573%2F1;p=mirrors%2FFD230.git 增加活动数据过滤0不存 --- diff --git a/code/sdk/drivers/peripheral/cywee/src/board_yh601s.c b/code/sdk/drivers/peripheral/cywee/src/board_yh601s.c index 9a3e6da62..a4f36c2c1 100644 --- a/code/sdk/drivers/peripheral/cywee/src/board_yh601s.c +++ b/code/sdk/drivers/peripheral/cywee/src/board_yh601s.c @@ -428,6 +428,11 @@ void CWM_OS_saveData_history(int* new_data,int *history ,uint32_t len,uint8_t ty { data=0; *history=0; + + } + if(data==0) + { + return; } FILE * fp = fopen(path_,"ab+"); @@ -540,7 +545,7 @@ uint8_t get_stand_count(void) fseek(fp, 0, SEEK_END); uint8_t size = ftell(fp); fseek(fp, 0, SEEK_SET); - + fclose(fp); return size/4;