传输实时数据bug修复(补) 497/1 497/head 498/target/1 499/target/1 500/target/1
authorhcj <1224667075@qq.com>
Wed, 10 Jul 2024 11:09:22 +0000 (19:09 +0800)
committerhcj <1224667075@qq.com>
Wed, 10 Jul 2024 11:09:22 +0000 (19:09 +0800)
code/sdk/drivers/peripheral/cywee/src/main_dml.c

index 97a2d85..11efc91 100644 (file)
@@ -112,7 +112,7 @@ void cywee_save_data(void)
     CWM_OS_saveData(&(new_calories),sizeof(int),CYWEE_SAVE_DATA_CALORIES);
     new_distance+=history_distances;
     CWM_OS_saveData(&(new_distance),sizeof(int),CYWEE_SAVE_DATA_DISTANCE);
-    //new_fat+=history_fat;
+    new_fat+=history_fat;
     CWM_OS_saveData(&new_fat,sizeof(int),CYWEE_SAVE_DATA_FAT);
 
 }
@@ -220,10 +220,10 @@ int32_t get_now_hour_data(uint8_t type)
             return get_calories_data()-history_calories_;
             break;
         case CYWEE_SAVE_DATA_DISTANCE:
-            return get_distance_data()-history_calories_;
+            return get_distance_data()-history_distances_;
             break;
         case CYWEE_SAVE_DATA_FAT:
-            return get_fat_time_data()-history_calories_;
+            return get_fat_time_data()-history_fat_;
         break;
     default:
         break;