增加活动数据过滤0不存 573/1
authorhcj <1224667075@qq.com>
Tue, 23 Jul 2024 03:15:17 +0000 (11:15 +0800)
committerhcj <1224667075@qq.com>
Tue, 23 Jul 2024 03:15:17 +0000 (11:15 +0800)
code/sdk/drivers/peripheral/cywee/src/board_yh601s.c

index 9a3e6da..a4f36c2 100644 (file)
@@ -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;