From: Caisking <3449750381@qq.com> Date: Wed, 3 Jul 2024 10:58:41 +0000 (+0800) Subject: 修改部分消息优先级 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=dec9d9abe3c4002feb8b213ad6a0862a401e77f8;p=mirrors%2FFD230.git 修改部分消息优先级 --- 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 625779c52..85db8aac1 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 @@ -609,50 +601,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) @@ -1232,10 +1181,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