From a16fef654034e4851bb68d9d23900e4a5fabb13a Mon Sep 17 00:00:00 2001 From: Caisking <3449750381@qq.com> Date: Wed, 3 Jul 2024 18:58:41 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E6=B6=88?= =?utf8?q?=E6=81=AF=E4=BC=98=E5=85=88=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../msg_center/src/msg_center_customer.cpp | 67 ++----------------- 1 file changed, 6 insertions(+), 61 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 78450fc67..79922bb2a 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 @@ -97,10 +97,6 @@ const PriorityMapper PRI_MAPPER[] = { #ifdef SUPPORT_SPO2_NOTIFICATION {TOPIC_EVENT_SPO2_UPDATE, PRIORITY_TWO}, {TOPIC_EVENT_HEARTRATE_UPDATA, PRIORITY_TWO}, - {TOPIC_EVENT_START_HRS_MONITORING, PRIORITY_TWO}, - {TOPIC_EVENT_STOP_HRS_MONITORING, PRIORITY_TWO}, - {TOPIC_EVENT_START_SPO2_MONITORING, PRIORITY_TWO}, - {TOPIC_EVENT_STOP_SPO2_MONITORING, PRIORITY_TWO}, {TOPIC_EVENT_GRAYCARD_UPDATA, PRIORITY_TWO}, {TOPIC_EVENT_LEAKLIGHT_UPDATA, PRIORITY_TWO}, #endif @@ -109,11 +105,11 @@ const PriorityMapper PRI_MAPPER[] = { // {TOPIC_EVENT_DEVICE_UNBIND, PRIORITY_TWO}, // {TOPIC_EVENT_DEVICE_UNBINDING_REQUEST, PRIORITY_TWO}, #endif - {TOPIC_EVENT_FIND_WATCH,PRIORITY_TWO}, - {TOPIC_EVENT_CANCEL_FIND_WATCH,PRIORITY_TWO}, - {TOPIC_EVENT_DRINKREMINDER,PRIORITY_TWO}, - {TOPIC_EVENT_MESSAGENOTE,PRIORITY_TWO}, - {TOPIC_EVENT_SLEEPNOTE,PRIORITY_TWO}, + {TOPIC_EVENT_FIND_WATCH,PRIORITY_TWO},// 找手表 [2] + {TOPIC_EVENT_CANCEL_FIND_WATCH,PRIORITY_TWO},// 取消找手表 [2] + {TOPIC_EVENT_DRINKREMINDER,PRIORITY_THREE},//喝水提醒 [3] + {TOPIC_EVENT_MESSAGENOTE,PRIORITY_THREE},//消息提醒 [3] + {TOPIC_EVENT_SLEEPNOTE,PRIORITY_THREE},//睡眠弹窗 [3] }; static bool CheckPriority(const Topic topic) @@ -164,10 +160,6 @@ void MsgCenterSubscribe() MsgCenterSubscribeTopic(TOPIC_EVENT_SPO2_UPDATE); MsgCenterSubscribeTopic(TOPIC_EVENT_HEARTRATE_UPDATA); MsgCenterSubscribeTopic(TOPIC_EVENT_WEARSTATE_UPDATE); - MsgCenterSubscribeTopic(TOPIC_EVENT_START_HRS_MONITORING); - MsgCenterSubscribeTopic(TOPIC_EVENT_STOP_HRS_MONITORING); - MsgCenterSubscribeTopic(TOPIC_EVENT_START_SPO2_MONITORING); - MsgCenterSubscribeTopic(TOPIC_EVENT_STOP_SPO2_MONITORING); MsgCenterSubscribeTopic(TOPIC_EVENT_GRAYCARD_UPDATA); MsgCenterSubscribeTopic(TOPIC_EVENT_LEAKLIGHT_UPDATA); #endif @@ -611,50 +603,7 @@ void MsgCenterNotifyHeartRateProc(const Topic topic, Request* req) #endif } } -//开始检测心率 -void MsgCenterNotifyStartHRMonitoringProc(const Topic topic, Request* req) -{ - unused(topic); - unused(req); - if (topic == TOPIC_EVENT_START_HRS_MONITORING) - { - md = PPG_SERVICE_CMD_TYPE_DO_PPG_TEST; - send_ppg_cmd_msg(md); - } -} -//结束检测心率 -void MsgCenterNotifyStopHRMonitoringProc(const Topic topic, Request* req) -{ - unused(topic); - unused(req); - if (topic == TOPIC_EVENT_STOP_HRS_MONITORING) - { - md = PPG_SERVICE_CMD_TYPE_STOP_PPG_TEST; - send_ppg_cmd_msg(md); - } -} -//开始检测血氧 -void MsgCenterNotifyStartSPO2MonitoringProc(const Topic topic, Request* req) -{ - unused(topic); - unused(req); - if (topic == TOPIC_EVENT_START_SPO2_MONITORING) - { - md = PPG_SERVICE_CMD_TYPE_DO_SPO2_TEST; - send_ppg_cmd_msg(md); - } -} -//结束检测血氧 -void MsgCenterNotifyStopSPO2MonitoringProc(const Topic topic, Request* req) -{ - unused(topic); - unused(req); - if (topic == TOPIC_EVENT_STOP_SPO2_MONITORING && req != nullptr && req->data != nullptr) - { - md = PPG_SERVICE_CMD_TYPE_STOP_SPO2_TEST; - send_ppg_cmd_msg(md); - } -} + //消息通知 void MsgCenterNotifyMessageProc(const Topic topic, Request* req) @@ -1243,10 +1192,6 @@ static MsgCenterNotifyTable g_msgCenterNotifyTable[] = { {TOPIC_EVENT_SPO2_UPDATE, MsgCenterNotifySPO2hProc}, {TOPIC_EVENT_WEARSTATE_UPDATE, MsgCenterNotifyWearStateProc}, {TOPIC_EVENT_HEARTRATE_UPDATA, MsgCenterNotifyHeartRateProc}, - {TOPIC_EVENT_START_HRS_MONITORING, MsgCenterNotifyStartHRMonitoringProc}, - {TOPIC_EVENT_STOP_HRS_MONITORING, MsgCenterNotifyStopHRMonitoringProc}, - {TOPIC_EVENT_START_SPO2_MONITORING, MsgCenterNotifyStartSPO2MonitoringProc}, - {TOPIC_EVENT_STOP_SPO2_MONITORING, MsgCenterNotifyStopSPO2MonitoringProc}, {TOPIC_EVENT_GRAYCARD_UPDATA, MsgCenterNotifyCardProc}, {TOPIC_EVENT_LEAKLIGHT_UPDATA, MsgCenterNotifyleaklightProc}, #endif -- 2.17.1