From: penglei <1624952103@qq.com> Date: Wed, 6 Nov 2024 09:36:05 +0000 (+0800) Subject: 睡眠时间戳同步算法库更新优化(补) X-Git-Tag: fd230_release_V1.3.102~112^2~3 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=1588f99c4aa56f8651bdaf355a6ac9cbd001ccc0;p=mirrors%2FFD230.git 睡眠时间戳同步算法库更新优化(补) --- diff --git a/code/sdk/drivers/peripheral/cywee/src/main_dml.c b/code/sdk/drivers/peripheral/cywee/src/main_dml.c index c37b88d72..edb5b81cb 100644 --- a/code/sdk/drivers/peripheral/cywee/src/main_dml.c +++ b/code/sdk/drivers/peripheral/cywee/src/main_dml.c @@ -366,8 +366,11 @@ void cywee_set_sleep_stat_data(cywee_inactivity_result_t c_inactivity_result_t) else if(sleep_stat[stat_num].stat == 4) { //目前cywee出睡时间戳有bug 暂时先用系统时间戳 - // uapi_get_timestampe_ss(×tamp); - // sleep_stat[stat_num].timestamp = timestamp; + if(sleep_stat[stat_num].timestamp < fall_asleep_timestamp) //如果出睡时间戳小于入睡时间戳 获取系统时间戳作为出睡时间戳 + { + uapi_get_timestampe_ss(×tamp); + sleep_stat[stat_num].timestamp = timestamp; + } wake_up_timestamp = sleep_stat[stat_num].timestamp; sleep_update_timestamp = wake_up_timestamp; }