* @Author: penglei 1624952103@qq.com
* @Date: 2024-04-08 14:53:31
* @LastEditors: penglei 1624952103@qq.com
- * @LastEditTime: 2025-07-10 14:31:06
+ * @LastEditTime: 2025-09-30 18:03:35
* @FilePath: /FD230/code/sdk/drivers/peripheral/cywee/service/cywee_dml.c
* @Description:
*
}
uapi_dev_runtime_set_goal_storage_status(1);
- int step = cywee_get_sport_data(STEP) + cywee_get_sport_data(HISTORY_STEP);
- int calories = cywee_get_sport_data(CALORIES) + cywee_get_sport_data(HISTORY_CALORIES);
- int distances = cywee_get_sport_data(DISTANCE) + cywee_get_sport_data(HISTORY_DISTANCE);
- int fat = cywee_get_sport_data(FAT) + cywee_get_sport_data(HISTORY_FAT);
+ int step = cywee_get_sport_data(STEP);
+ int calories = cywee_get_sport_data(NEW_CALORIES) + cywee_get_sport_data(HISTORY_CALORIES);
+ int distances = cywee_get_sport_data(NEW_DISTANCE) + cywee_get_sport_data(HISTORY_DISTANCE);
+ int fat = cywee_get_sport_data(NEW_FAT) + cywee_get_sport_data(HISTORY_FAT);
int history_step_ = cywee_get_sport_data(HISTORY_STEP_);
int history_calories_ = cywee_get_sport_data(HISTORY_CALORIES_);
CWM_OS_OneHourAgo_restoreData(&history_step_,sizeof(int),STEP);
cywee_set_sport_data(history_step,HISTORY_STEP);
cywee_set_sport_data(history_step_,HISTORY_STEP_);
+ cywee_set_sport_data(history_step,STEP);
CWM_OS_restoreData(&history_calories,sizeof(int),CALORIES);
CWM_OS_OneHourAgo_restoreData(&history_calories_,sizeof(float),CALORIES);
{
switch (type)
{
+ case STEP:
+ stepcount = data;
+ break;
case HISTORY_STEP:
history_step = data;
break;
CustomEventPublish(TOPIC_EVENT_AR_ALERT_TYPE_UPDATE,&ar_alert_type,sizeof(int));
}else{
- stepcount = (int)sensorEVT->fData[1];
+ stepcount += (int)sensorEVT->fData[1];
memset(&c_act_result_t,0,sizeof(act_result_t));
c_act_result_t.activity_mode = (int)sensorEVT->fData[0];
c_act_result_t.steps = stepcount;