From e4ed9e2c980a5c6c94a0de31abe0aca623ab9301 Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Thu, 29 Aug 2024 11:21:50 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E7=9D=A1=E7=9C=A0=E7=8A=B6?= =?utf8?q?=E6=80=81=E6=97=B6=E9=97=B4=E6=88=B3=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../service/msg_center/src/msg_center_customer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp index 2cd458c82..3ee6db719 100644 --- a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp @@ -1205,9 +1205,9 @@ void MsgCenterNotifyInactivityProc(const Topic topic, Request *req) WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyInactivityProc !"); //unused(topic); #ifdef FD230 + uint32_t timestamp = 0; if(day_timestamp == 0) { - uint32_t timestamp = 0; time_t rawtime; struct tm* timeinfo; time(&rawtime); @@ -1274,7 +1274,11 @@ void MsgCenterNotifyInactivityProc(const Topic topic, Request *req) { sleep_data.sleep_status[state_num].timestamp = day_timestamp + cywee_Inactivity_Info->hour * 60 * 60 + cywee_Inactivity_Info->minute * 60; sleep_data.sleep_status[state_num].stat = cywee_Inactivity_Info->status; - + if(sleep_data.sleep_status[state_num].stat == 6 || sleep_data.sleep_status[state_num].stat == 13) + { + uapi_get_timestampe_ss(×tamp); + sleep_data.sleep_status[state_num].timestamp = timestamp; + } if(sleep_data.sleep_status[state_num].stat == 0) //0进入睡眠 1潜睡 2深睡 3清醒 4结束睡眠 6入睡 7出睡最后一笔输出 8未出睡最后一笔输出 12快速动眼 13取消入睡 { sleep_data.fall_asleep_timestamp = sleep_data.sleep_status[state_num].timestamp; -- 2.17.1