From 86b87b142f247b9ff58f6207595184dee084cdb9 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Tue, 17 Mar 2026 09:42:10 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8Dapp=E8=AE=BE=E7=BD=AE=E8=BF=90?= =?utf8?q?=E5=8A=A8=E7=9B=AE=E6=A0=87=E5=A4=B1=E6=95=88bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../include/notify/goal_notification.h | 12 ++++------ .../include/notify/goal_notificationC.h | 17 +++++++++++++ .../src/notify/goal_notification.cpp | 19 +++++++++++++++ .../blemoder/ble_congfig_adapt.cpp | 24 +++++++++++-------- 4 files changed, 55 insertions(+), 17 deletions(-) create mode 100644 code/sdk/application/wearable/n9/service/msg_center/include/notify/goal_notificationC.h diff --git a/code/sdk/application/wearable/n9/service/msg_center/include/notify/goal_notification.h b/code/sdk/application/wearable/n9/service/msg_center/include/notify/goal_notification.h index 84518a114..b526d2c09 100644 --- a/code/sdk/application/wearable/n9/service/msg_center/include/notify/goal_notification.h +++ b/code/sdk/application/wearable/n9/service/msg_center/include/notify/goal_notification.h @@ -7,13 +7,11 @@ namespace OHOS typedef enum GOAL_type { GOAL_STEP = 1, - - GOAL_CALOREIE, - GOAL_STAND, - GOAL_FAT, - GOAL_DISTANCE, - - GOAL_free, + GOAL_CALOREIE = 2, + GOAL_STAND = 3, + GOAL_FAT = 4, + GOAL_DISTANCE = 5, + GOAL_free = 6, } transmitting_type; UIViewGroup *GoalviewShow(void); diff --git a/code/sdk/application/wearable/n9/service/msg_center/include/notify/goal_notificationC.h b/code/sdk/application/wearable/n9/service/msg_center/include/notify/goal_notificationC.h new file mode 100644 index 000000000..a5b81f4d1 --- /dev/null +++ b/code/sdk/application/wearable/n9/service/msg_center/include/notify/goal_notificationC.h @@ -0,0 +1,17 @@ + +#ifndef GOAL_NOTIFICATION_C_H +#define GOAL_NOTIFICATION_C_H +#include +#ifdef __cplusplus +#if __cplusplus +extern "C" +{ +#endif +#endif + uint8_t set_Is_show_flagC(uint8_t flag, uint8_t type); +#ifdef __cplusplus +#if __cplusplus +} +#endif +#endif +#endif \ No newline at end of file diff --git a/code/sdk/application/wearable/n9/service/msg_center/src/notify/goal_notification.cpp b/code/sdk/application/wearable/n9/service/msg_center/src/notify/goal_notification.cpp index 487ec4cc1..00436dab8 100644 --- a/code/sdk/application/wearable/n9/service/msg_center/src/notify/goal_notification.cpp +++ b/code/sdk/application/wearable/n9/service/msg_center/src/notify/goal_notification.cpp @@ -29,6 +29,7 @@ #ifdef SUPPORT_BLE_SERVICE #include "bleEvent.h" #endif +#include "goal_notificationC.h" namespace OHOS { @@ -462,3 +463,21 @@ namespace OHOS } } + + +#include +#ifdef __cplusplus +#if __cplusplus +extern "C" +{ +#endif +#endif + uint8_t set_Is_show_flagC(uint8_t flag, uint8_t type) + { + return OHOS::set_Is_show_flag(flag, type); + } +#ifdef __cplusplus +#if __cplusplus +} +#endif +#endif \ No newline at end of file diff --git a/code/sdk/zhihui/services/ble_service/blemoder/ble_congfig_adapt.cpp b/code/sdk/zhihui/services/ble_service/blemoder/ble_congfig_adapt.cpp index 44951cde3..a08a485fc 100644 --- a/code/sdk/zhihui/services/ble_service/blemoder/ble_congfig_adapt.cpp +++ b/code/sdk/zhihui/services/ble_service/blemoder/ble_congfig_adapt.cpp @@ -17,6 +17,7 @@ #include "alarmclocktimerconfig/include/AlarmClockTimerConfig.h" #include "sleep/include/SleepModel.h" +#include "goal_notificationC.h" void set_ota_upgrade_(void) { @@ -374,15 +375,18 @@ void set_goal_other_notification_(uint8_t data) p_ConfigModel->set_condigData_Int(OHOS::ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_OTHER,data); if(data==1) { - // OHOS::set_Is_show_flag(1,OHOS::GOAL_CALOREIE); - // OHOS::set_Is_show_flag(1,OHOS::GOAL_STAND); - // OHOS::set_Is_show_flag(1,OHOS::GOAL_FAT); - // OHOS::set_Is_show_flag(1,OHOS::GOAL_DISTANCE); + // set_Is_show_flagC(1,GOAL_CALOREIE); + // set_Is_show_flagC(1,GOAL_STAND); + // set_Is_show_flagC(1,GOAL_FAT); + // set_Is_show_flagC(1,GOAL_DISTANCE); - } - - // SendMsgToUIService(UI_UPDATE_GOAL, 0, nullptr, 0); + set_Is_show_flagC(1,2); + set_Is_show_flagC(1,3); + set_Is_show_flagC(1,4); + set_Is_show_flagC(1,5); + } + SendMsgToUIService(UI_UPDATE_GOAL, 0, nullptr, 0); return; } @@ -392,10 +396,10 @@ void set_goal_step_notification_(uint8_t data) p_ConfigModel->set_condigData_Int(OHOS::ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_STEP,data); if(data==1) { - // OHOS::set_Is_show_flag(1,OHOS::GOAL_STEP); + // set_Is_show_flagC(1,GOAL_STEP); + set_Is_show_flagC(1,1); } - - // SendMsgToUIService(UI_UPDATE_GOAL, 0, nullptr, 0); + SendMsgToUIService(UI_UPDATE_GOAL, 0, nullptr, 0); return; } -- 2.17.1