projects
/
mirrors
/
FD230.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a873ab
)
睡眠时间戳同步算法库更新优化(补)
author
penglei
<1624952103@qq.com>
Wed, 6 Nov 2024 09:36:05 +0000
(17:36 +0800)
committer
penglei
<1624952103@qq.com>
Wed, 6 Nov 2024 09:36:05 +0000
(17:36 +0800)
code/sdk/drivers/peripheral/cywee/src/main_dml.c
patch
|
blob
|
history
diff --git
a/code/sdk/drivers/peripheral/cywee/src/main_dml.c
b/code/sdk/drivers/peripheral/cywee/src/main_dml.c
index
c37b88d
..
edb5b81
100644
(file)
--- 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;
}