From: Caisking Date: Sat, 7 Feb 2026 03:41:36 +0000 (+0800) Subject: 修复运动卡路里不出值的问题 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=eb06061ca0ca384ac674dfe9de25f9c450819e95;p=mirrors%2FFD230.git 修复运动卡路里不出值的问题 --- diff --git a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c index bbc12d907..a1cdf2a85 100644 --- a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c +++ b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c @@ -545,36 +545,49 @@ bool hx3695_check_wear(ppg_sensor_data_t *ppg_sensor_dat,uint8_t count) if(wear_status_pre != wear_status) { - if(uapi_dev_runtime_get_train_status() && !wear_status) - avg_hrs = 0; wear_status_pre = wear_status; - if(uapi_dev_runtime_get_sleep_monitoring_status()) + + if(uapi_dev_runtime_get_train_status()) { + #ifdef SUPPORT_CYWEE_SERVICE + cywee_wear_status_update(&wear_status); + #endif if(!wear_status) { - #ifdef SUPPORT_CYWEE_SERVICE - cywee_wear_status_update(&wear_status); - #endif + avg_hrs = 0; } - else if(living_status == 1 && wear_status) + } + else { + + if(uapi_dev_runtime_get_sleep_monitoring_status()) { - #ifdef SUPPORT_CYWEE_SERVICE - cywee_wear_status_update(&wear_status); - #endif + if(!wear_status) + { + #ifdef SUPPORT_CYWEE_SERVICE + cywee_wear_status_update(&wear_status); + #endif + } + else if(living_status == 1 && wear_status) + { + #ifdef SUPPORT_CYWEE_SERVICE + cywee_wear_status_update(&wear_status); + #endif + } } - } - else - { - if(living_status != 2) + else { + if(living_status != 2) + { - #ifdef SUPPORT_CYWEE_SERVICE - cywee_wear_status_update(&wear_status); - #endif + #ifdef SUPPORT_CYWEE_SERVICE + cywee_wear_status_update(&wear_status); + #endif + } } } + // printf("wear_status:%d\n",wear_status);