修改部分文件编译选项 1598/target/2 1599/1 1599/head 1601/target/1
authorhcj <1224667075@qq.com>
Sat, 4 Jan 2025 08:04:53 +0000 (16:04 +0800)
committerhcj <1224667075@qq.com>
Sat, 4 Jan 2025 08:04:53 +0000 (16:04 +0800)
48 files changed:
code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothModel.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/findphone/src/FindPhoneModel.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/findphone/src/FindPhoneView.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/CallingView.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/MainCallingPresenter.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/WaitingHintsView.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/message/include/MessageModel.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingModel.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_card/include/TraingCardPresenter.h
code/sdk/application/wearable/fd230/service/msg_center/include/notify/goal_notification.h
code/sdk/application/wearable/fd230/service/msg_center/include/notify/transmitting.h
code/sdk/application/wearable/fd230/service/msg_center/src/msg_center_customer.cpp
code/sdk/application/wearable/fd230/service/msg_center/src/notify/makephone_notification.cpp
code/sdk/build/config/target_config/brandy/config.py
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/src/ble_hid_take_photo_server.c
code/sdk/zhihui/UI/producttest/CMakeLists.txt
code/sdk/zhihui/UI/producttest/include/testPresenter.h
code/sdk/zhihui/UI/producttest/include/testView.h
code/sdk/zhihui/UI/producttest/include/testgsenson.h
code/sdk/zhihui/UI/producttest/include/testhrsenson.h
code/sdk/zhihui/UI/producttest/include/testmagnetic.h
code/sdk/zhihui/UI/producttest/include/testold.h
code/sdk/zhihui/UI/producttest/src/testPresenter.cpp
code/sdk/zhihui/UI/producttest/src/testView.cpp
code/sdk/zhihui/UI/producttest/src/testbt.cpp
code/sdk/zhihui/UI/producttest/src/testhrsenson.cpp
code/sdk/zhihui/UI/producttest/src/testmagnetic.cpp
code/sdk/zhihui/UI/producttest/src/testmicrophone.cpp
code/sdk/zhihui/UI/producttest/src/testold.cpp
code/sdk/zhihui/drivers/slip/cat1Service/cat1_tcpServer.cpp
code/sdk/zhihui/services/ble_service/blemoder/CMakeLists.txt
code/sdk/zhihui/services/ble_service/blemoder/bleInstruct.cpp [moved from code/sdk/zhihui/services/ble_service/blemoder/bletest.cpp with 93% similarity]
code/sdk/zhihui/services/ble_service/blemoder/bleInstruct.h [moved from code/sdk/zhihui/services/ble_service/blemoder/bletest.h with 93% similarity]
code/sdk/zhihui/services/ble_service/bleservice/CMakeLists.txt
code/sdk/zhihui/services/ble_service/bleservice/bleANCS.c
code/sdk/zhihui/services/ble_service/bleservice/bleANCS.h
code/sdk/zhihui/services/ble_service/bleservice/bleEvent.c
code/sdk/zhihui/services/ble_service/bleservice/bleEvent.h
code/sdk/zhihui/services/ble_service/bleservice/bleService.c
code/sdk/zhihui/services/factorytest_service/factorytest_protocol.c
code/sdk/zhihui/services/factorytest_service/factorytest_protocol.h
code/sdk/zhihui/utils/CMakeLists.txt
code/sdk/zhihui/utils/custom_cmd_service.c
code/sdk/zhihui/utils/custom_fileoperate_service.c
code/sdk/zhihui/utils/custom_save_runtime.c
code/sdk/zhihui/utils/custom_utils.c
code/sdk/zhihui/utils/custom_utils_at_cmd.c
code/sdk/zhihui/utils/pdu.c

index 2d76de6..3e86d8f 100644 (file)
 #include "BluetoothWrapper.h"\r
 #endif\r
 #include "Bluetooyhpabpserver.h"\r
-#include "bletest.h"\r
+\r
+\r
+#ifdef BLE_INSTRUCT\r
+#include "bleInstruct.h"\r
+#endif\r
+\r
+\r
 #include "ConfigModelC.h"\r
 #include "uiservice/include/ui_service.h"\r
 #include "vibrator_service.h"\r
index f8a424e..0befef3 100644 (file)
@@ -7,7 +7,9 @@
  */
 
 #include "findphone/include/FindPhoneModel.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
 #include <custom_runtime.h>
 #include "wearable_log.h"
 #include "bleEvent.h"
index 013a42f..b48318c 100644 (file)
 #include "wearable_log.h"
 #include "findphone/include/FindPhoneModel.h"
 #include "UiConfig.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
 #include "bleEvent.h"
 #include "ui_resource_string.h"
 #include "uicomponents/UIComponents.h"
index 75c75b7..9fae51f 100644 (file)
@@ -15,7 +15,9 @@
 #endif
 #include "custom_utils.h"
 #include "phoneaddressmodel.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
 #include "ui_resource_string.h"
 
 #include "PhoneAGService.h"
index fb3680e..b4b2392 100644 (file)
@@ -22,7 +22,9 @@
 #endif 
 #include "custom_utils.h"
 #include "phoneaddressmodel.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
 #include "NativeAbility.h"
 #include "dial_sos_c.h"
 #include "soundandvibration/include/SoundAndVibrationVolumeSettingC.h"
index 1f6f667..de1ea3b 100644 (file)
@@ -9,7 +9,11 @@
 #include "CallerLogModel.h"
 #include "MainCallingPresenter.h"
 #include "ui_resource_string.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+#endif
 #include "custom_utils.h"
 
 #include "wearable_log.h"
index 7d4ea37..5ed5559 100644 (file)
@@ -2,12 +2,17 @@
 #ifndef MESSAGE_MODEL_H
 #define MESSAGE_MODEL_H
 
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
 #include "message/include/MessagePresenter.h"
 #include <cstdint>
 #include <map>
 #include <vector>
 
+#include "bleANCS.h"
+
 namespace OHOS {
 // 消息数据结构体
 struct MessageData {
index f2472c3..6ae47a2 100644 (file)
 
 #include "ConfigModel.h"
 #include "bleEvent.h"
-#include "bletest.h"
+
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
 #include "broadcast_feature.h"
 #include "broadcast_service.h"
 #include "custom_runtime.h"
index 586bf7e..f307627 100644 (file)
@@ -9,7 +9,11 @@
 #include "traing/training_card/include/TrainingDataView.h"\r
 #include "traing/training_card/include/TrainingDetailView.h"\r
 \r
-#include "bletest.h"\r
+\r
+#ifdef BLE_INSTRUCT\r
+#include "bleInstruct.h"\r
+#endif\r
+\r
 #include "components/root_view.h"\r
 #include "components/ui_swipe_view.h"\r
 #include "components/ui_view.h"\r
index 336a850..04e7ca3 100644 (file)
@@ -1,7 +1,11 @@
 #ifndef GOAL_NOTIFICATION_H
 #define GOAL_NOTIFICATION_H
 // #include "components/ui_image_animator.h" 
-#include "bletest.h"
+
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
 #include "components/ui_view_group.h"
 
 namespace OHOS
index d5371ae..7a6e872 100644 (file)
@@ -1,7 +1,11 @@
 #ifndef TRANSMITTING_H
 #define TRANSMITTING_H
 #include "components/ui_image_animator.h" 
-#include "bletest.h"
+
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
 #include "components/ui_view_group.h"
 
 namespace OHOS
index abc6a06..7265709 100644 (file)
 #include "testhrsenson.h" 
 #include "ConfigModel.h"
 #include "power_display_service.h"
-#include "bletest.h"
+
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
 //#include "TraingCardPresenter.h"
 #include "custom_runtime.h"
 #include "custom_utils.h"
index 895b881..1ce4cb7 100644 (file)
 #include "custom_utils.h"
 #include "phoneaddressmodel.h"
 #include "components/ui_label_button.h"
-#include "bletest.h"
+
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
 #include "NativeAbility.h"
 #include "dial_sos_c.h"
 #include <string>
index 70c8b9e..4bbfb15 100644 (file)
@@ -362,7 +362,9 @@ target = {
             'CONFIG_DFX_SUPPORT_DIAG_UP_MACHINE=1',
             'TPTYPE_FT6X46',
             'ROTARYENCODER_HX3507',
-            'NANDFLASH_DS35X'
+            'NANDFLASH_DS35X',
+            'BLE_INSTRUCT',
+            'FACTORYTEST_SERVICE',
         ],
         #添加自定义应用
        'ram_component': [
@@ -472,7 +474,9 @@ target = {
                     #'ROTARYENCODER_HX3507',
                     'ROTARYENCODER_U8',
                     'FUNC_KEY2',
-                    'NANDFLASH_DS35X'
+                    'NANDFLASH_DS35X',
+                    'BLE_INSTRUCT',
+                    'FACTORYTEST_SERVICE',
                     ],
                'ram_component': [
                           'audio_at_service', 
@@ -676,7 +680,7 @@ target = {
                     'SUPPORT_HID_SERVICE',
                     'SUPPORT_BAIDU_MAP',
                     'CFG_FLASH_SIZE=8',
-                    # 'SUPPORT_BLE_SERVICE',
+                    'SUPPORT_BLE_SERVICE',
                     # 'FD230',
                     #"MEM_CHECK",
                     #'ENABLE_WEBSOCKET',
@@ -690,7 +694,10 @@ target = {
                     'TEST_4G_UI',
                     'NANDFLASH_F35UQA',
                     'PPG_VC921X',
-                    'ROTARYENCODER_HX3509'
+                    'ROTARYENCODER_HX3509',
+                    'FACTORYTEST_SERVICE',
+                    # 'BLE_INSTRUCT'
+                    
                     ],
                'ram_component': [
                         #'baidumapsdk',
@@ -715,12 +722,12 @@ target = {
                         "gnss",
                         "gnss_sample",
                         #    "acc_sensor",
-                           "batterry_service",
-                        #  "bleservice",
-                        #  "ppgBleService",
+                        "batterry_service",
+                         "bleservice",
+                         "ppgBleService",
                         #  "blemoder",
-                        #  "factorytest_service",
-                        #  "hid_service",
+                         "factorytest_service",
+                         "hid_service",
                         "producttest",
                         "cywee",
                         "charge_ic",
index c8d40a0..3e12ce0 100644 (file)
@@ -9,7 +9,7 @@
 #include "ble_gatts_callbacks.h"
 #include "bts_uuid.h"
 #include "ble_hid_take_photo_server.h"
-
+#ifndef SUPPORT_HID_SERVICE
 /* HID information flag remote wakeup */
 #define BLE_HID_INFO_FLAG_REMOTE_WAKE_UP_MSK 0x01
 /* HID information flag normally connectable */
@@ -318,4 +318,6 @@ void ble_hid_add_characters_input_report_cbk(uint16_t srvc_handle)
         return;
     }
     g_hid_input_report_att_hdl = srvc_handle + BLE_HID_CHARACTER_INPUT_REPORT_VALUE_HANDLE_OFFSET;
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
index 629e0b8..6d6e502 100644 (file)
@@ -52,10 +52,13 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/middleware/services/gui/uikit/ui/frameworks
    
     ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/utils/innerkits
+    ${ROOT_DIR}/zhihui/services/factorytest_service
     # /home/hcj/615/FD230/code/sdk/application/wearable/nativeapp/nativeui/player/include/PlayersPresenter.h
     # /home/hcj/615/FD230/code/sdk/middleware/services/gui/uikit/ui/frameworks/font/glyphs_manager.h
     # /home/hcj/615/FD230/code/sdk//UiServersMsg.h
 )
+# /home/hcj/615/FD230/code/sdk/
+
 if("FD230" IN_LIST DEFINES)
 set(PRIVATE_HEADER
     ${PRIVATE_HEADER}
@@ -71,6 +74,7 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarmclockmanage/include
     ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/include
     ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/player/include
+    ${ROOT_DIR}/zhihui/services/factorytest_service
 )
 else()
 set(PRIVATE_HEADER
@@ -85,6 +89,7 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarmclockmanage/include
     ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarmclocktimerconfig/include
     ${ROOT_DIR}/application/wearable/nativeapp/nativeui/player/include
+    ${ROOT_DIR}/zhihui/services/factorytest_service
     
 )
 endif()
index e7715dc..f651e28 100644 (file)
@@ -34,7 +34,7 @@ namespace OHOS
         TP,\r
         MAGETIC,\r
         LUMINANCE,\r
-        CHAR,\r
+        CHARG,\r
         SPEAK,\r
         MOTOR,\r
 #ifdef SUPPORT_CAT1_MODEM\r
index 42fdae1..a24c08b 100644 (file)
@@ -126,9 +126,9 @@ namespace OHOS
         testCHANINGView *test_charging_view{nullptr};\r
         testSPEAKView *test_speak_view{nullptr};\r
         testMOTORView *test_motor_view{nullptr};\r
-        #ifdef SUPPORT_CAT1_MODEM\r
-            testcat1View *test_cat1_view{nullptr};\r
-        #endif\r
+        // #ifdef SUPPORT_CAT1_MODEM\r
+        testcat1View *test_cat1_view{nullptr};\r
+        // #endif\r
         testbuttonView *test_KEY_view{nullptr};\r
         testMagicView *test_MG_view{nullptr};\r
         testhrsenson1View *test_hr_view{nullptr};\r
index c0017ae..d4bc8f5 100644 (file)
@@ -8,7 +8,7 @@
 #include "components/ui_label_ext.h"
 #include "components/ui_image_view.h"
 #include "producttest/include/testmagnetic.h"
-#include "CompassModel.h"
+// #include "CompassModel.h"
 #include "components/ui_label_button_ext.h"
 //#include "cmsis_os.h"
 #include <iostream>
index 7acd8d1..4ba83b9 100644 (file)
@@ -81,7 +81,7 @@ namespace OHOS
     private:
         UILabelButtonExt *SetTheButton_ext(ButtonConfig_ext_t &buttonconfig);//, UIView::OnTouchListener *clickListener);
         UILabel *InitLabel(LabelConfig &labelConfig);
-        bool tesScat1ScrollViewcrollViewinit(uint8_t);
+        bool testhrsensonScrollViewcrollViewinit(uint8_t);
         UIScrollView *testhrsensonScrollView{nullptr};
         UILabel *label_1_cat1msg_1=NULL;
         // UILabel *label_1_cat1msg_oper{nullptr};
index 2b726a8..d0ef55b 100644 (file)
@@ -8,7 +8,9 @@
 #include "components/ui_label_ext.h"
 #include "components/ui_image_view.h"
 #include "producttest/include/testmagnetic.h"
+#ifdef FD230
 #include "CompassModel.h"
+#endif
 #include "components/ui_label_button_ext.h"
 //#include "cmsis_os.h"
 #include <iostream>
index 2da87be..c0dfed1 100644 (file)
@@ -19,6 +19,8 @@
 #include "components/ui_label_button_ext.h"
 
 //#include "cmsis_os.h"
+
+
 #include <iostream>
 namespace OHOS
 {
index 9acd86b..1794140 100644 (file)
@@ -1,20 +1,31 @@
 #include "AppViewIDs.h"\r
 #include "components/ui_label_ext.h"\r
-#include"ui_resource_string.h"\r
+#ifdef FD230\r
+    #include"ui_resource_string.h"\r
+#endif\r
+\r
 #include "NativeAbility.h"\r
 #include "graphic_math.h"\r
 #include "string.h"\r
 #include "producttest/include/testPresenter.h"\r
 #include "font/font_global_manager.h"\r
 #include "font/ui_font.h"\r
-#include "languagecode/LanguageInit.h"\r
+#ifdef FD230\r
+    #include "languagecode/LanguageInit.h"\r
+#endif\r
 #include "../../../../../../zhihui/utils/custom_utils.h"\r
 #include "power_display_service.h"\r
 #include "components/ui_slider.h"\r
 \r
 #include "audio_capture_wrapper.h"\r
 #include "cywee_service.h"\r
-#include "factorytest_protocol.h"\r
+\r
+#ifdef FD230\r
+    #include "factorytest_protocol.h"\r
+#endif\r
+\r
+\r
+\r
 #include "custom_runtime.h"\r
 #include "gnss_ctl.h"\r
 \r
@@ -274,15 +285,27 @@ namespace OHOS
         { \r
             if(uapi_dev_runtime_get_cat1_powerstat())\r
                 uapi_set4GCapability(false);\r
-            factorytest_start_aging_test();\r
+            #ifdef FD230\r
+                factorytest_start_aging_test();\r
+            #endif\r
         }\r
         if(strcmp(view.GetViewId(),"stop") == 0)\r
         { \r
-            factorytest_stop_aging_test();\r
+            #ifdef FD230\r
+                factorytest_stop_aging_test();\r
+            #endif\r
         }\r
         if(strcmp(view.GetViewId(),"exit") == 0)\r
         { \r
-            NativeAbility::GetInstance().ChangeSlice(VIEW_TEST);\r
+            for (int i = 1; i < MAX_TESTVIEWID; i++)\r
+            {\r
+                if (p_SystemView->GetSystemScrollView(i))\r
+                {\r
+                    p_SystemView->ChangeView(i, TESTVIEW);\r
+                    break;\r
+                }\r
+            }\r
+            return true;\r
         }\r
         if(strcmp(view.GetViewId(),"deep") == 0)\r
         { \r
index 6386552..2001efd 100644 (file)
 \r
 #include "custom_utils.h"\r
 #include "custom_runtime.h"\r
+\r
+\r
+#ifdef FD230\r
+    #include "factorytest_protocol.h"\r
+#endif\r
+\r
 namespace OHOS\r
 {\r
 \r
@@ -23,7 +29,7 @@ namespace OHOS
         {TP,"TPButton","TP","TPButton_next", &testView::ChangeTPTESTView,true},\r
         {MAGETIC,"MAGETICButton","Magetic","MAGETICButton_next", &testView::ChangeMGTESTView,true},\r
         {LUMINANCE,"luminanceButton","luminance","luminanceButton_next", &testView::ChangLUMTESTView,true},\r
-        {CHAR,"chargingButton","bat&charger","chargingButton_next",&testView::ChangchargingTESTView,true},\r
+        {CHARG,"chargingButton","bat&charger","chargingButton_next",&testView::ChangchargingTESTView,true},\r
         {SPEAK,"speakButton","speak","speakButton_next" ,&testView::ChangspeakTESTView,true},\r
 \r
         {MOTOR,"motorButton","motor","motorButton_next" ,&testView::ChangmotorTESTView,true},\r
@@ -39,8 +45,9 @@ namespace OHOS
         {PingTest,"PingTestbutton","PingTest","PingTestbutton_next" ,&testView::ChangePingTESTView,true},\r
 \r
         {GPSTEST,"GPSTestbutton","GPSTest","GPSTestbutton_next" ,&testView::ChangeGPSTESTView,true},\r
-\r
+    #ifdef AGINGTEST\r
         {OLDTEST,"oldtestbutton","aging" ,"oldtestexit",&testView::ChangeoldTESTView,true},\r
+    #endif\r
         {DEEPSLEEP,"deepsleep","DeepSleepCurrent","xxxxxxxxx" ,&testView::ChangeoldTESTView,true},\r
         {shutdown,"shutdown","shutdown", "xxxxxxxxx",&testView::ChangeoldTESTView,true},\r
         {RESET,"reset","reset", "xxxxxxxxx",&testView::ChangeoldTESTView,true},\r
@@ -543,9 +550,11 @@ SystemScrollView[TESTVIEW]->SetStyle(STYLE_BORDER_RADIUS, 0);
         }\r
         return true;\r
     }\r
+  \r
 \r
      bool testView::ChangeoldTESTView(int16_t thisView)\r
     {\r
+          #ifdef AGINGTEST\r
         if (SystemScrollView[thisView] == nullptr)\r
         {\r
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeoldTESTView");\r
@@ -558,8 +567,11 @@ SystemScrollView[TESTVIEW]->SetStyle(STYLE_BORDER_RADIUS, 0);
             SystemScrollView[thisView] = test_old_view->testoldInitIView(thisView);\r
             RootView::GetInstance()->Add(SystemScrollView[thisView]);\r
         }\r
+          #endif\r
         return true;\r
+       \r
     }\r
+   \r
 \r
     bool testView::ChangeBTTESTView(int16_t thisView)\r
     {\r
@@ -728,7 +740,7 @@ SystemScrollView[TESTVIEW]->SetStyle(STYLE_BORDER_RADIUS, 0);
                 test_lum_view = nullptr;\r
                  SystemScrollView[hideView]=nullptr;\r
             break;\r
-            case CHAR:\r
+            case CHARG:\r
                 RootView::GetInstance()->Remove(SystemScrollView[hideView]);\r
                 delete test_charging_view;  \r
                 test_charging_view = nullptr;\r
index d158e35..61fa663 100644 (file)
@@ -12,7 +12,9 @@
 #include "custom_runtime.h"
 #include "bts_br_gap.h"
 #include "bts_le_gap.h"
+
 #include "bleService.h"
+
 #include "BluetoothModel.h"
 #include "producttest/include/testView.h"
 #ifdef __cplusplus
@@ -96,8 +98,9 @@ namespace OHOS
             }
 
             bool ret = gap_br_cancel_discovery();
-
-            BluetoothModel::GetInstance()->set_test_bt_falg(false);
+            #ifdef FD230
+                BluetoothModel::GetInstance()->set_test_bt_falg(false);
+            #endif 
 
             uint8_t cnt = pm_veto_get_id_cnt(PM_ID_P_TEST);
             if (cnt == 1) {
@@ -168,7 +171,10 @@ namespace OHOS
 
             bool ret = gap_br_start_discovery();
             BluetoothModel::GetInstance()->SortScansCaseRssi();
-             BluetoothModel::GetInstance()->set_test_bt_falg(true);
+            #ifdef FD230
+            BluetoothModel::GetInstance()->set_test_bt_falg(true);
+            #endif
+
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"gap_br_start_discovery bool %d!\n",ret);
             #endif
             button->SetText("scaning");
index ec16196..ac738ad 100644 (file)
@@ -204,7 +204,7 @@ namespace OHOS
 
 
     
-    bool testhrsenson1View::tesScat1ScrollViewcrollViewinit(uint8_t id)
+    bool testhrsenson1View::testhrsensonScrollViewcrollViewinit(uint8_t id)
     {
 
         testhrsensonScrollView = new UIScrollView();
@@ -317,7 +317,7 @@ namespace OHOS
 
     UIScrollView *testhrsenson1View::testhrsensonInitIView(uint8_t id)
     {
-        if (!tesScat1ScrollViewcrollViewinit(id))
+        if (!testhrsensonScrollViewcrollViewinit(id))
         {
             return nullptr;
         }
index 64bb1ea..6ab8291 100644 (file)
@@ -54,8 +54,10 @@ namespace OHOS
         if(testmagicScrollView)
         {
             testmagicScrollView->RemoveAll();
+#ifdef FD230
 #ifndef TEST_BATTERY
            CompassModel::GetInstance()->CloseCompassSensor();
+#endif
 #endif
             if (magneyic_TEST_timer != NULL) {
                 osTimerStop(magneyic_TEST_timer);
@@ -151,8 +153,10 @@ namespace OHOS
     {
         uint32_t tick;
         osStatus_t retTimer;
+#ifdef FD230
 #ifndef TEST_BATTERY
         CompassModel::GetInstance()->OpenCompassSensor();
+#endif
 #endif
         testmagicScrollView = new UIScrollView();
         if (testmagicScrollView == nullptr)
index f084d39..bc0861f 100644 (file)
@@ -6,7 +6,9 @@
 #include "cmsis_os2.h"
 #include "audio_capture_wrapper.h"
 #include "producttest/include/testView.h"
-#include "findwatch_notification.h"
+#ifdef FD230
+    #include "findwatch_notification.h"
+#endif
 #ifdef __cplusplus
 #if __cplusplus
 extern "C"
@@ -170,6 +172,7 @@ namespace OHOS
             else if(makphone_falg==1)
             {
 #ifndef AUDIO_ECHO_TEST
+#ifdef FD230
                 int32_t argc = 1;
                 uint8_t *argv = (uint8_t*)"stop";
                 AudioCaptureSample(argc, (const char **)&argv);
@@ -182,6 +185,7 @@ namespace OHOS
                     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ffffffffffffffffsssssss");
                 }
                 fclose(file);
+#endif
 #else
                 uapi_stop_audio_test();
                 button[0]->SetText("start");
@@ -189,6 +193,7 @@ namespace OHOS
 #endif
             }
 #ifndef AUDIO_ECHO_TEST
+#ifdef FD230
             else if(makphone_falg==2)
             {
                 button->SetText("stop play");
@@ -202,6 +207,7 @@ namespace OHOS
                 FindWatchViewEventListener::GetInstance().PopInterCancelMusic();
                 makphone_falg = 0;
             }
+#endif
 #endif    
         }
         
@@ -371,9 +377,11 @@ extern "C"
 
     void check_mic(bool isopen)
     {
+        #ifdef FD230
         if(isopen)
         {
             // AlarmClockModel::GetInstance()->testPlayerStart("/user/userdata/microphone.mp3");
+           
             FindWatchViewEventListener::GetInstance().setVolumeVal(100);
             FindWatchViewEventListener::GetInstance().PopInterPlayMusic_product("/user/userdata/microphone.mp3");
             // AlarmClockModel::GetInstance()->AlarmPlayerStart();
@@ -384,6 +392,7 @@ extern "C"
             FindWatchViewEventListener::GetInstance().PopInterCancelMusic_product();
             // AlarmClockModel::GetInstance()->AlarmPlayerStop();
         }
+        #endif
 
     }
 
index de28daa..cef97cf 100644 (file)
@@ -5,13 +5,25 @@
 #include "AlarmClockModel.h"
 #include "cmsis_os2.h"
 #include "producttest/include/testView.h"
-#include "factorytest_protocol.h"
+
+#ifdef FD230
+    #include "factorytest_protocol.h"
+#endif
+
+#ifdef AGINGTEST
+
+// #ifdef AGINGTEST
 namespace OHOS
 {
 
     static testoldView *g_pSystemAboutTheWatchView{nullptr};
     static osTimerId_t  g_aging_timer=NULL;
+
+    #ifdef FD230
     static ble_aging_t aging_t;
+    #endif
+
+    
 
     testoldView::testoldView()
     {
@@ -599,4 +611,6 @@ namespace OHOS
     }
 
 
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
index e85bcda..3097183 100644 (file)
 #include <sys/time.h>
 
 #ifdef SUPPORT_BLE_SERVICE
-#include "bletest.h"
+
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
 #include "bleANCS.h"
 #endif
 #include "custom_utils.h"
index e8005d7..a6baf87 100644 (file)
@@ -6,61 +6,60 @@
 set(COMPONENT_NAME "blemoder")
 
 set(PUBLIC_HEADER
-${CMAKE_CURRENT_SOURCE_DIR}
-)
+    ${CMAKE_CURRENT_SOURCE_DIR}
+   )
 set(PRIVATE_HEADER
-${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/innerkits
-${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits
-${ROOT_DIR}/application/wearable/nativeapp/nativeui/heartrate/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/weather/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/heart_blood/health_service
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/sleep/include/
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/phone/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/languagecode/
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/language
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/traing/training_card/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/config/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/traing/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/uiservice/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/codedlock/include
+    ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/innerkits
+    ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/heartrate/include
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/weather/include
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/heart_blood/health_service
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/sleep/include/
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/phone/include
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/languagecode/
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/language
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/traing/training_card/include
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/config/include
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/traing/include
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/uiservice/include
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/codedlock/include
 #${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarm/include 
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarmclockmanage/include 
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/include 
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarmclockmanage/include 
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/include 
 #code/sdk/middleware/services/gui/uikit/proprietary/src/utils/innerkits/hals/gralloc_engines.h
 #/home/hcj/FD230/code/sdk/open_source/openharmony/drivers/peripheral/display/interfaces/include/display_gralloc.h
-${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
-${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src
-${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/utils/innerkits
-${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include
-${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include/common
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/set_dial/include 
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/aivoice/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarm/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/musicplayer/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/schedule/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/bluetooth/include
-${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/innerkits
-${ROOT_DIR}/application/wearable/nativeapp/nativeui/alipay/include
+    ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
+    ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src
+    ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/utils/innerkits
+    ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include
+    ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include/common
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/set_dial/include 
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/aivoice/include
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarm/include
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/musicplayer/include
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/schedule/include
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/bluetooth/include
+    ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/innerkits
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alipay/include
 # /home/hcj/FD230/code/sdk/middleware/services/gui/uikit/ui/interfaces/innerkits/engines/gfx/gfx_engine_manager.h
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alipay/include
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alipay/include
 # /home/hcj/FD230/code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayModel.h
 #/home/hcj/FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarm/include/AlarmClockModel.h
 #/home/hcj/FD230/code/sdk/middleware/services/media/foundation/player/interfaces/kits/player.h
 #/home/hcj/FD230/code/sdk/middleware/services/gui/uikit/surface/interfaces/kits/surface.h
 # ${ROOT_DIR}/middleware/services/media/foundation/player/interfaces/kits
 # ${ROOT_DIR}/middleware/services/gui/uikit/surface/interfaces/kits
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/player/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativelauncher/include
-${ROOT_DIR}/middleware/services/gui/uikit/ui/frameworks
-# ${ROOT_DIR}/middleware/services/gui/uikit/surface/interfaces/kits
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/player/include
+    ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativelauncher/include
+    ${ROOT_DIR}/middleware/services/gui/uikit/ui/frameworks
+    # ${ROOT_DIR}/middleware/services/gui/uikit/surface/interfaces/kits
 # /home/hcj/FD230/code/sdk/middleware/services/gui/uikit/surface/interfaces/kits/ibuffer_consumer_listener.h
 # /home/hcj/FD230/code/sdk/middleware/services/gui/uikit/ui/frameworks/common/typed_text.h
 )
 
 set(SOURCES
-#${CMAKE_CURRENT_SOURCE_DIR}/bletest.cpp
-${CMAKE_CURRENT_SOURCE_DIR}/bletest.cpp
+${CMAKE_CURRENT_SOURCE_DIR}/bleInstruct.cpp
 )
 
 set(COMPONENT_PUBLIC_CCFLAGS
@@ -18,9 +18,9 @@
 #include "samgr_lite.h"
 #include "thread_adapter.h"
 #include "graphic_service.h"
-#include "health_service.h"
-#include "phoneaddressmodel.h"
-#include "LanguageInit.h"
+
+
+
 #include "ConfigModel.h"
 #ifdef SUPPORT_CAT1_SERVICE
 #include "cat1_server.h"
@@ -31,7 +31,6 @@
 #include "../../../../../../zhihui/utils/custom_runtime.h"
 
 #ifdef FD230
-
 #include "uiservice/include/ui_service.h" 
 #include "TraingModel.h"
 #include "WeatherModel.h"
 #include "font/ui_font.h"
 #include "font/base_font.h"
 #include "common/typed_text.h"
-
+#include "health_service.h"
 #include "AlipayC.h"
 #include "PlayersModelC.h"
-
-
-#endif
+#include "LanguageInit.h"
+#include "phoneaddressmodel.h"
 #include "AlmmgrAlarmClockManage.h"
 #include "AlarmClockTimerConfig.h"
 #include "AlarmClockManage.h"
-
 #include "SetDialModel.h"
-//#include "AlarmClockModel.h"
 #include "AiVoiceModel.h"
 #include "SleepModel.h"
 #include "BluetoothModel.h"
 #include "MusicPlayerModel.h"
 #include "UiConfig.h"
-// #include "AlarmClockModel.h"
 
-//#include "AlarmClockModel.h"
+#endif
+
+
+
+
+
 #ifdef __cplusplus
 #if __cplusplus
 extern "C" {
@@ -93,7 +93,10 @@ extern "C" {
 #include "custom_utils.h"
 #include "string.h"
 #include "bleService.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
 #include <cywee_hal.h>
 
 #include <dirent.h>
@@ -2405,94 +2408,6 @@ void  ble_UpdateMainWeatherData(void)
 {
     SendMsgToUIService(UI_UPDATE_WEATHER_DATA,0,nullptr,0);
 }
-message_infor_t message_infor_s;
-void read_message_data(void)
-{
-    if(!creatMessageDir())//创建失败
-    {
-        return;
-    }
-    uint32_t data_len = 0;
-    FILE *jsfile = fopen(ANCS_DATA_CJSON_PATH, "r");
-    cJSON *data_root;
-    if (jsfile != NULL) {
-          WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"succes opening file\n");
-        fseek(jsfile, 0, SEEK_END);
-        long fileSize = ftell(jsfile);
-        fseek(jsfile, 0, SEEK_SET);
-
-        char *jsonData = (char *)malloc(fileSize + 1);
-        fread(jsonData, 1, fileSize, jsfile);
-        jsonData[fileSize] = '\0';
-        fclose(jsfile);
-
-        // 解析JSON数据
-        //   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"jsonData %s",jsonData);
-        data_len = strlen(jsonData);
-        data_root= cJSON_Parse(jsonData);
-        free(jsonData);
-        if(data_len > 0)//只有读出来的内容不为空就认为文件里面有数据
-        {
-            cJSON *dataList = cJSON_GetObjectItem(data_root, "infor");
-            if (dataList != NULL && cJSON_IsArray(dataList))//判断是否为NULL并且是否为数组类型的内容
-            {
-               int count = cJSON_GetArraySize(dataList);//获取数组的大小 10//9 8 7 6 5 4 3 2 1 0
-               memset(&message_infor_s,0,sizeof(message_infor_t)); 
-               message_infor_s.num = count;
-               for (uint8_t i = 0; i < count; i++)//反序存储是反序 所以读出来显示也需要反序度
-               {
-                    cJSON *object = NULL;
-                    cJSON *uid_t = NULL;
-                    cJSON *appid_t = NULL;
-                    cJSON *title_buf = NULL;
-                    cJSON *msg_buf = NULL;
-                    cJSON *time = NULL;
-                    cJSON *hasCode = NULL;
-                    cJSON *read_t = NULL;
-                    object = cJSON_GetArrayItem(dataList,i);//1 0 
-                    uid_t = cJSON_GetObjectItem(object, "uid");
-                    appid_t = cJSON_GetObjectItem(object, "appid_t");
-                    title_buf = cJSON_GetObjectItem(object, "title");
-                    msg_buf = cJSON_GetObjectItem(object, "msg");
-                    time = cJSON_GetObjectItem(object, "time");
-                    hasCode = cJSON_GetObjectItem(object, "hasCode");
-                    read_t = cJSON_GetObjectItem(object, "read");
-                    message_infor_s.message_t[i].uid = uid_t->valueint;//
-                    message_infor_s.message_t[i].appid = appid_t->valueint;
-                    if(strlen(title_buf->valuestring) != 0)//10 
-                    {
-                        memcpy(message_infor_s.message_t[i].title,title_buf->valuestring,strlen(title_buf->valuestring));
-                    }else{
-                        memset(message_infor_s.message_t[i].title,0,TITLE_BUF_LEN);
-
-                    }
-                    //   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s.message_t[i].title:%s",message_infor_s.message_t[i].title);
-
-                    if(strlen(msg_buf->valuestring) != 0)
-                    {
-                        memcpy(message_infor_s.message_t[i].msg,msg_buf->valuestring,strlen(msg_buf->valuestring));
-                    }else{
-                        memset(message_infor_s.message_t[i].msg,0,MSG_BUF_LEN);
-                    }
-                    //   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s.message_t[count - 1- i].msg:%s",message_infor_s.message_t[i].msg);
-                    message_infor_s.message_t[i].time = time->valueint;
-                    message_infor_s.message_t[i].hasCode = hasCode->valueint;
-                    message_infor_s.message_t[i].read = read_t->valueint;
-               }
-            }
-        }
-        cJSON_Delete(data_root);
-    }
-    //   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s.num%d\r\n",message_infor_s.num); //2 1 0
-    // for(uint8_t i = message_infor_s.num-1;i > 0 ;i--)
-    // {
-    //     //   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s:title %s msg :%s\r\n",message_infor_s.message_t[i].title,message_infor_s.message_t[i].msg);
-    // }
-}
-message_infor_t *get_message_info(void)
-{
-    return &message_infor_s;
-}
 
 void ble_add_message_index(uint32_t old_index)
 {
@@ -3404,7 +3319,9 @@ void ble_set_sleep_remind(msg_get_sleep_param_info_t data)
         p_ConfigModel->set_condigData_Int(OHOS::ConfigModel::CONFIGMODEL_ITEM_SLEEP_REMIND,data.bedtime_alarm);
 
         //更新睡眠配置
-        OHOS::SleepModel::GetInstance().set_sleep_goal();
+        #ifdef FD230
+            OHOS::SleepModel::GetInstance().set_sleep_goal();
+        #endif
 
     }  
     return;
@@ -3708,7 +3625,10 @@ void set_languaage(uint32_t id)
 
 char *addressbook(void)//获取通讯录保存文件地址路径
 {
+    #ifdef FD230
     return ADDRESS_BOOK_PATH;
+    #endif
+    return NULL;
 }
 
 void addressbookToRead(char *buf)//转化用于·c文件
@@ -4105,94 +4025,7 @@ void  ble_UpdateMainWeatherData(void)
 {
 
 }
-message_infor_t message_infor_s;
-void read_message_data(void)
-{
-    if(!creatMessageDir())//创建失败
-    {
-        return;
-    }
-    uint32_t data_len = 0;
-    FILE *jsfile = fopen(ANCS_DATA_CJSON_PATH, "r");
-    cJSON *data_root;
-    if (jsfile != NULL) {
-          WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"succes opening file\n");
-        fseek(jsfile, 0, SEEK_END);
-        long fileSize = ftell(jsfile);
-        fseek(jsfile, 0, SEEK_SET);
-
-        char *jsonData = (char *)malloc(fileSize + 1);
-        fread(jsonData, 1, fileSize, jsfile);
-        jsonData[fileSize] = '\0';
-        fclose(jsfile);
-
-        // 解析JSON数据
-        //   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"jsonData %s",jsonData);
-        data_len = strlen(jsonData);
-        data_root= cJSON_Parse(jsonData);
-        free(jsonData);
-        if(data_len > 0)//只有读出来的内容不为空就认为文件里面有数据
-        {
-            cJSON *dataList = cJSON_GetObjectItem(data_root, "infor");
-            if (dataList != NULL && cJSON_IsArray(dataList))//判断是否为NULL并且是否为数组类型的内容
-            {
-               int count = cJSON_GetArraySize(dataList);//获取数组的大小 10//9 8 7 6 5 4 3 2 1 0
-               memset(&message_infor_s,0,sizeof(message_infor_t)); 
-               message_infor_s.num = count;
-               for (uint8_t i = 0; i < count; i++)//反序存储是反序 所以读出来显示也需要反序度
-               {
-                    cJSON *object = NULL;
-                    cJSON *uid_t = NULL;
-                    cJSON *appid_t = NULL;
-                    cJSON *title_buf = NULL;
-                    cJSON *msg_buf = NULL;
-                    cJSON *time = NULL;
-                    cJSON *hasCode = NULL;
-                    cJSON *read_t = NULL;
-                    object = cJSON_GetArrayItem(dataList,i);//1 0 
-                    uid_t = cJSON_GetObjectItem(object, "uid");
-                    appid_t = cJSON_GetObjectItem(object, "appid_t");
-                    title_buf = cJSON_GetObjectItem(object, "title");
-                    msg_buf = cJSON_GetObjectItem(object, "msg");
-                    time = cJSON_GetObjectItem(object, "time");
-                    hasCode = cJSON_GetObjectItem(object, "hasCode");
-                    read_t = cJSON_GetObjectItem(object, "read");
-                    message_infor_s.message_t[i].uid = uid_t->valueint;//
-                    message_infor_s.message_t[i].appid = appid_t->valueint;
-                    if(strlen(title_buf->valuestring) != 0)//10 
-                    {
-                        memcpy(message_infor_s.message_t[i].title,title_buf->valuestring,strlen(title_buf->valuestring));
-                    }else{
-                        memset(message_infor_s.message_t[i].title,0,TITLE_BUF_LEN);
-
-                    }
-                    //   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s.message_t[i].title:%s",message_infor_s.message_t[i].title);
 
-                    if(strlen(msg_buf->valuestring) != 0)
-                    {
-                        memcpy(message_infor_s.message_t[i].msg,msg_buf->valuestring,strlen(msg_buf->valuestring));
-                    }else{
-                        memset(message_infor_s.message_t[i].msg,0,MSG_BUF_LEN);
-                    }
-                    //   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s.message_t[count - 1- i].msg:%s",message_infor_s.message_t[i].msg);
-                    message_infor_s.message_t[i].time = time->valueint;
-                    message_infor_s.message_t[i].hasCode = hasCode->valueint;
-                    message_infor_s.message_t[i].read = read_t->valueint;
-               }
-            }
-        }
-        cJSON_Delete(data_root);
-    }
-    //   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s.num%d\r\n",message_infor_s.num); //2 1 0
-    // for(uint8_t i = message_infor_s.num-1;i > 0 ;i--)
-    // {
-    //     //   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s:title %s msg :%s\r\n",message_infor_s.message_t[i].title,message_infor_s.message_t[i].msg);
-    // }
-}
-message_infor_t *get_message_info(void)
-{
-    return &message_infor_s;
-}
 
 void ble_add_message_index(uint32_t old_index)
 {
@@ -2,7 +2,6 @@
  * @Date: 2024-04-18 17:25:04
  * @LastEditors: Caisking 3449750381@qq.com
  * @LastEditTime: 2024-04-18 17:44:00
- * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/service/ble_service/blemoder/bletest.h
  */
 /**
  * Copyright (c) @CompanyNameMagicTag 2022-2022. All rights reserved. \n
@@ -25,7 +24,9 @@ extern "C"
 
 #include "stdint.h"
 #include "errcode.h"
+
 #include "bleEvent.h"
+
 #include "cJSON.h"
 
 
@@ -57,7 +58,7 @@ extern "C"
     } transmitting_type;
 
 
-    enum PAIRING
+enum PAIRING
     {
         DEVICEBIND = 0,
         DEVICEUNBIND,           // 设备解绑通知
@@ -90,27 +91,6 @@ extern "C"
         uint8_t controlmd;    // 训练控制md
     } training_ble;
     
-#define MAX_MESSAGE_NUM 10
-#define TITLE_BUF_LEN 256
-#define MSG_BUF_LEN 1024
-typedef struct ancs_data_info
-{
-    uint32_t time;//时间戳 
-    int uid;//uid 消息唯一编号
-    int appid;//消息类型:1:微信 2:QQ 3:短信 4:其他
-    char *title;//消息发送者
-    char *msg;//消息内容
-    int hasCode;//消息hash code
-    int read;   //是否已读 0 未读 1 已读
-    int titlelen;
-    int msglen;
-}ancs_data_info_t;
-
-struct message_infor_t
-{
-    uint8_t num;
-    ancs_data_info_t message_t[MAX_MESSAGE_NUM];
-};
 
 typedef struct
 {
@@ -126,7 +106,6 @@ typedef struct
 
 
 void read_message_data(void);//读内存信息数据开机读一次
-struct message_infor_t *get_message_info(void);
 void set_weather_now_data(int humidity, char* windScale, char* textNight,int uvIndex,int temp,int iconNight);
 
 void set_weather_address_data(int lat, char* atm, char* city,char* subLocality,int lon);
index 38d9554..29e6890 100644 (file)
@@ -39,13 +39,23 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/application/wearable/nativeapp/nativeui/screennotify/include
 )
 endif()
+if("FD230" IN_LIST DEFINES)
 set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/bleService.c
     ${CMAKE_CURRENT_SOURCE_DIR}/bleEvent.c
     ${CMAKE_CURRENT_SOURCE_DIR}/bleANCS.c
-    
+  
+)
+else()
+set(SOURCES
+    ${CMAKE_CURRENT_SOURCE_DIR}/bleService.c
+    # ${CMAKE_CURRENT_SOURCE_DIR}/bleEvent.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/bleANCS.c
+  
 )
 
+endif()
+
 set(COMPONENT_PUBLIC_CCFLAGS
 )
 
index 6c5646b..876873f 100644 (file)
@@ -36,7 +36,9 @@
 #include "build_version.h"
 #include "custom_runtime.h"
 #include "custom_utils.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
 #ifdef SUPPORT_AT_OHOSFWK
 #include "BluetoothWrapper.h"
 #endif
index 15f3e2a..dd0cafa 100644 (file)
@@ -26,6 +26,22 @@ typedef struct filtration_data_t
     char name[filtration_data_max_len];
 }filtration_data;
 
+#define MAX_MESSAGE_NUM 10
+#define TITLE_BUF_LEN 256
+#define MSG_BUF_LEN 1024
+typedef struct ancs_data_info
+{
+    uint32_t time;//时间戳 
+    int uid;//uid 消息唯一编号
+    int appid;//消息类型:1:微信 2:QQ 3:短信 4:其他
+    char *title;//消息发送者
+    char *msg;//消息内容
+    int hasCode;//消息hash code
+    int read;   //是否已读 0 未读 1 已读
+    int titlelen;
+    int msglen;
+}ancs_data_info_t;
+
 
 void gattc_reg_id(void);
 uint8_t ble_ancs_client_cmd_setup_and_subscribe(uint16_t conn_id);
index 92e1839..aa12365 100644 (file)
@@ -39,7 +39,10 @@ extern "C" {
 #include "errcode.h"\r
 #include "sys/statfs.h"\r
 \r
-#include "bletest.h"\r
+#ifdef BLE_INSTRUCT\r
+#include "bleInstruct.h"\r
+#endif\r
+\r
 #include "custom_utils.h"\r
 #include "custom_runtime.h"\r
 #include "bleANCS.h"\r
index 63ec747..bd095c6 100644 (file)
@@ -9,7 +9,11 @@ extern "C" {
 #include "stdbool.h"
 #include "errcode.h"
 #include "bts_def.h"
-// #include "bletest.h"
+
+// #ifdef BLE_INSTRUCT
+// // #include "bleInstruct.h"
+// #endif
+
 
 #define PHONE_WATCH_CONFIG_PATH "/user/userdata/phone_watch.json"
 #define ALARM_DATA_CONFIG_PATH "/user/userdata/alarm_test.json"
@@ -689,7 +693,6 @@ typedef struct {
     uint8_t frequenc;//提醒频率
 }msg_sedent_set_param_info_t;
 
-
 #pragma pack()
 /******************************************
  * 
@@ -765,7 +768,6 @@ typedef struct
 } file_recv_stat_t;
 
 
-
         
 uint8_t get_OTA_recv_value(void);
 
index 13eb931..1052df4 100644 (file)
@@ -40,7 +40,12 @@ extern "C" {
 #include "build_version.h"\r
 #include "custom_runtime.h"\r
 #include "custom_utils.h"\r
-#include "bletest.h"\r
+#ifdef BLE_INSTRUCT\r
+#ifdef BLE_INSTRUCT\r
+#include "bleInstruct.h"\r
+#endif\r
+#endif\r
+\r
 #include "ConfigModelC.h"\r
 #ifdef SUPPORT_AT_CYWEE\r
 #include "cywee_ble_Service.h"\r
@@ -2125,7 +2130,9 @@ static void blesrv_service_check_task(void const *arg)
 \r
         // }\r
         else{\r
+            #ifdef BLE_INSTRUCT\r
             revBleOldData(p_msgbuf,msg_len,server_handle);\r
+            #endif\r
         }\r
         #endif\r
         if(mail.msg_data)\r
index 37554b3..bef190a 100644 (file)
 #include "nandflash_config.h"\r
 #include "string.h"\r
 #include "custom_runtime.h"\r
-#include "bletest.h"\r
+\r
+#ifdef BLE_INSTRUCT\r
+#include "bleInstruct.h"\r
+#endif\r
+\r
 #include "battery_service.h"\r
 #include "cywee_service.h"\r
 #include "broadcast_feature.h"\r
@@ -47,8 +51,9 @@
 #include "lwip/api_shell.h"\r
 #endif\r
 #include "input_app.h"\r
+#ifdef FD230\r
 #include "PhoneServiceC.h"\r
-\r
+#endif\r
 #pragma pack(1)\r
 typedef struct factorytest_cmd_header_t\r
 {\r
@@ -514,9 +519,12 @@ void factorytest_protocol_common_decode(uint8_t submode,uint8_t testitem,uint8_t
                 0x01,\r
                 &send_data,\r
                 1);\r
+                #ifdef FD230\r
                 uapi_hfp_connect_();\r
                 LOS_Msleep(500);\r
                 uapi_a2dp_snk_connect_();\r
+                #endif\r
+\r
             } else if (testitem == 0x02)\r
             {\r
     \r
@@ -1891,8 +1899,9 @@ void factorytest_protocol_soft_test_decode(uint8_t submode,uint8_t testitem,uint
             {\r
                 //通讯录\r
                 uint8_t send_data = 0x00;\r
-\r
+            #ifdef BLE_INSTRUCT\r
                 add_addressbookToRead((char *)data);\r
+            #endif\r
                 \r
                 factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST,\r
                         BLE_TEST_CMD_SOFT_TEST_SUB_MODE_CONTACTS,\r
@@ -1975,15 +1984,20 @@ void factorytest_protocol_soft_test_decode(uint8_t submode,uint8_t testitem,uint
 \r
             if (testitem == 0x06)\r
             {\r
-                uint8_t send_data = 0x00;\r
+                #ifdef FD230\r
+                \r
                 uapi_hfp_connect_();\r
                 LOS_Msleep(500);\r
                 uapi_a2dp_snk_connect_();\r
+                #endif\r
+\r
+                uint8_t send_data = 0x00;\r
                 factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST,\r
                         BLE_TEST_CMD_SOFT_TEST_SUB_MODE_SPEAKER,\r
                         0x03,\r
                         &send_data,\r
                         1);\r
+               \r
             }\r
 \r
             break;\r
index 4abd635..f4eae3b 100644 (file)
@@ -98,6 +98,7 @@ extern "C" {
 //软件测试 子模式ID  支付宝
 #define BLE_TEST_CMD_SOFT_TEST_SUB_MODE_ALIPAY  0x31
 
+#define AGINGTEST
 
 #pragma pack(1)
 typedef struct
index 75c9543..d17c147 100644 (file)
@@ -19,11 +19,9 @@ set(SOURCES
 
 set(PUBLIC_HEADER
     ${CMAKE_CURRENT_SOURCE_DIR}
-    
 )
 
 set(PRIVATE_HEADER
-
     ${ROOT_DIR}/application/audio/thread/
     ${ROOT_DIR}/application/audio
     ${ROOT_DIR}/drivers/drivers/driver/audio/source/include
@@ -71,6 +69,7 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/application/wearable/nativeapp/nativeui/screennotify/include
 )
 endif()
+
 set(PRIVATE_DEFINES
     TARGET_NAME="${TARGET_COMMAND}"
     BUILD_TIME="${BUILD_TIME}"
index 07b07f7..6db2a03 100644 (file)
@@ -43,7 +43,7 @@
 void HandleUpdatelcdMode(int f){}
 void set_ota_upgrade(void){}
 void custom_timer_callback(void){}
-void Check_ble_adv_status(void){}
+// void Check_ble_adv_status(void){}
 void check_dial_space(void){}
 
 int uapi_hfp_disconnect_(void){return 0;}
@@ -60,7 +60,9 @@ void cat1_start_SCO_audio_(void){}
 #endif
 
 #ifdef SUPPORT_BLE_SERVICE
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
 #endif
 
 typedef struct
@@ -204,9 +206,12 @@ static void custom_cmd_service_check_task(void const *arg)
         case CUSTOM_CMD_MSG_TYPE_RESTORE_FACTORY_SETTING:
             {
 #ifdef SUPPORT_BLE_SERVICE
+#ifdef BLE_INSTRUCT
                 ble_Alipayunbind();
+
                 // UnbindSucessCmd(1);//1确认解绑
                 watch_clean_pairs();
+#endif
 #endif
                 uapi_restore_factory_setting();
             }
@@ -289,6 +294,7 @@ static void custom_cmd_service_check_task(void const *arg)
         case CUSTOM_CMD_MSG_BR_CONNECT:
 
 #ifdef SUPPORT_BLE_SERVICE
+#ifdef FD230
             switch (mail.data[0])
             {
                 //hfp connect 
@@ -318,6 +324,7 @@ static void custom_cmd_service_check_task(void const *arg)
                 default:
                     break;
             }
+#endif
 #endif
             break;
         case CUSTOM_CMD_MSG_CHECK_RES:
index 7e4536d..47e98d6 100644 (file)
@@ -63,11 +63,14 @@ void custom_sleep_model_updata(void){}
 void update_sleep_data(uint32_t sleep_timestamp,uint32_t wake_timestamp,uint32_t totaltime){}
 void update_nap_data(uint32_t sleep_timestamp,uint32_t wake_timestamp,uint32_t totaltime){}
 void custom_read_wear_data(void){}
-void factorytest_save_aging_data(void){}
-void factorytest_read_aging_data(void){}
-// void factorytest_get_aging_data(ble_aging_t *data){}
-void factorytest_start_aging_test(void){}
-void factorytest_stop_aging_test(void){}
+#ifndef FACTORYTEST_SERVICE
+// void factorytest_save_aging_data(void){}
+// void factorytest_read_aging_data(void){}
+// // void factorytest_get_aging_data(ble_aging_t *data){}
+// void factorytest_start_aging_test(void){}
+// void factorytest_stop_aging_test(void){}
+#endif
+
 void stopPlayingMusic(void){}
 void custom_setUpListCase(void){}
 bool  canSyncMusic(uint32_t songSize){return true;}
@@ -79,7 +82,10 @@ void CheckRecordingSpaceOutC(void){}
 #endif
 
 #ifdef SUPPORT_BLE_SERVICE
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
 #include "factorytest_protocol.h"
 #endif
 
index c384cc4..603373e 100644 (file)
@@ -39,7 +39,9 @@
 #include "alarmclocktimerconfig/include/AlarmClockTimerConfig.h"
 #endif
 #ifdef SUPPORT_BLE_SERVICE
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
 #endif
 
 #include <dirent.h>
index 79145d9..9e12fc3 100644 (file)
@@ -289,7 +289,9 @@ void shutdown_reboot_prejobs_task(void)
 {
     // printf();
 #ifdef SUPPORT_BLE_SERVICE
+#ifdef FD230
     C_ScheduleDataWriteToFile(); //同步的时候进行保存
+#endif
 #endif
     // mmi_sleep_mode_switch_write();//不需要保存
 
@@ -425,16 +427,20 @@ bool enable_spp_service(bool _enable)
     uapi_dev_runtime_set_br_connect_stat(stat);
     return true;
 }
+#ifdef SUPPORT_BLE_SERVICE
+    extern void bluetooth_close_all(void);
+    extern void bluetooth_enable_all(void);
+#endif 
 
-extern void bluetooth_close_all(void);
-extern void bluetooth_enable_all(void);
 bool start_custom_ble_service(void)
 {
     //加锁避免bt 初始化失败
     // uint32_t irq_sts = osal_irq_lock();
 #ifdef SUPPORT_BLE_SERVICE
+#ifdef FD230
         PRINT("start custom protocol classic bt ble service !\r\n");
         bluetooth_enable_all();
+#endif
 #endif 
     //if(!uapi_dev_runtime_get_saveele_status())
     {
@@ -448,7 +454,10 @@ bool stop_custom_ble_service(void)
 {
 #ifdef SUPPORT_BLE_SERVICE
     PRINT("stop custom protocol classic bt ble service !\r\n");
+#ifdef FD230
     bluetooth_close_all();
+#endif
+
 #endif 
     //if(!uapi_dev_runtime_get_saveele_status())
     {
@@ -536,7 +545,10 @@ void startup_post_init_task(void)
     }
 
 #ifdef SUPPORT_BLE_SERVICE
+#ifdef BLE_INSTRUCT
     addressbookToRead(NULL);
+#endif
+
 #endif
     ble_SOS_data_init();
 
index 7aa2d63..b4b1865 100644 (file)
@@ -1111,7 +1111,9 @@ static uint32_t PBAP_LS(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
 }
 
 #ifdef SUPPORT_BLE_SERVICE
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
 #endif
 
 #ifdef FD230
index 8670e5f..312d364 100644 (file)
@@ -433,7 +433,9 @@ int pdu_decode_example(const char *inpdustr,  uint32_t ref,uint16_t num, uint16_
        if(pdu_data_t[pdu_flag].total_num==1)
        {
 #ifdef SUPPORT_BLE_SERVICE
+#ifdef FD230
                message_data(0,0,phone_number,text,0);
+#endif
 #endif
                free(pdu_data_t[pdu_flag].phone_number);
                free(pdu_data_t[pdu_flag].text);
@@ -491,7 +493,9 @@ int pdu_decode_example(const char *inpdustr,  uint32_t ref,uint16_t num, uint16_
                                        printf("pdu_data_t[%d].text %s\r\n",find_fist_seq,pdu_data_t[find_fist_seq].text);
 
 #ifdef SUPPORT_BLE_SERVICE
+#ifdef FD230
                                        message_data(0,0,pdu_data_t[find_fist_seq].phone_number,pdu_data_t[find_fist_seq].text,0);
+#endif
 #endif
                                        free(pdu_data_t[find_fist_seq].phone_number);
                                        pdu_data_t[find_fist_seq].phone_number=NULL;