修复app设置运动目标失效bug 3278/1
authorluozheng <1732036298@qq.com>
Tue, 17 Mar 2026 01:42:10 +0000 (09:42 +0800)
committerluozheng <1732036298@qq.com>
Tue, 17 Mar 2026 01:42:10 +0000 (09:42 +0800)
code/sdk/application/wearable/n9/service/msg_center/include/notify/goal_notification.h
code/sdk/application/wearable/n9/service/msg_center/include/notify/goal_notificationC.h [new file with mode: 0644]
code/sdk/application/wearable/n9/service/msg_center/src/notify/goal_notification.cpp
code/sdk/zhihui/services/ble_service/blemoder/ble_congfig_adapt.cpp

index 84518a1..b526d2c 100644 (file)
@@ -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 (file)
index 0000000..a5b81f4
--- /dev/null
@@ -0,0 +1,17 @@
+
+#ifndef GOAL_NOTIFICATION_C_H
+#define GOAL_NOTIFICATION_C_H
+#include <cstdint>
+#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
index 487ec4c..00436da 100644 (file)
@@ -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 <cstdint>
+#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
index 44951cd..a08a485 100644 (file)
@@ -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;
 }