From 731ff09a4035848e6e705cf844fcfe6df3fea715 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Tue, 23 Jul 2024 11:15:17 +0800 Subject: [PATCH] =?utf8?q?=E5=A2=9E=E5=8A=A0=E6=B4=BB=E5=8A=A8=E6=95=B0?= =?utf8?q?=E6=8D=AE=E8=BF=87=E6=BB=A40=E4=B8=8D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/drivers/peripheral/cywee/src/board_yh601s.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; -- 2.17.1