增加雷鸟编译选项
authorpenglei <1624952103@qq.com>
Fri, 22 Aug 2025 03:50:59 +0000 (11:50 +0800)
committerpenglei <1624952103@qq.com>
Fri, 22 Aug 2025 03:50:59 +0000 (11:50 +0800)
34 files changed:
autobuild.sh
code/sdk/application/wearable/CMakeLists.txt
code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-ln/libuikit_fwk.a [new file with mode: 0644]
code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-ln/libmsg_center.a [new file with mode: 0644]
code/sdk/application/wearable/ln/nativeapp/brandy-native-js-ln/libuikit_fwk.a [new file with mode: 0644]
code/sdk/application/wearable/ln/service/msg_center/brandy-native-js-ln/libmsg_center.a [new file with mode: 0644]
code/sdk/application/wearable/nativeapp/brandy-native-js-ln/libuikit_fwk.a [new file with mode: 0644]
code/sdk/application/wearable/service/msg_center/brandy-native-js-ln/libmsg_center.a [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/config.py
code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_native_js_ln.config [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_native_js_ln_ssb.config [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_ssb_native_js_ln.config [new file with mode: 0644]
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-ln-r/libgfx_rm.a [new file with mode: 0644]
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-ln/libgfx_rm.a [new file with mode: 0644]
code/sdk/middleware/services/gui/hal/display/brandy-native-js-ln/libdisplay_gfx.a [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/brandy-native-js-ln/libuikit_ext.a [new file with mode: 0644]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln-r/libx_vfs_private.a [new file with mode: 0644]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln/libx_vfs_private.a [new file with mode: 0644]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln-r/libfs_yaffs2.a [new file with mode: 0644]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln/libfs_yaffs2.a [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-ln/libams.a [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libace.a [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libace_http.a [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libnetstack_http.a [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libwebsocket.a [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-ln/libbms.a [new file with mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-ln/libjerryscript.a [new file with mode: 0644]
code/sdk/zhihui/UI/producttest/src/testPresenter.cpp
code/sdk/zhihui/UI/producttest/src/testgsenson.cpp
code/sdk/zhihui/UI/producttest/src/testmagnetic.cpp
code/sdk/zhihui/UI/producttest/src/testold.cpp
code/sdk/zhihui/services/ble_service/transspecard/transspecard.c
code/sdk/zhihui/services/gnss/sample/pgnss_sample/pgnss_sample.c
code/sdk/zhihui/utils/custom_utils_at_cmd.c

index f6a5df4..50cfcc0 100644 (file)
@@ -140,6 +140,15 @@ SSB_NAME=$APPLICATION_NAME-ssb
 BUILD_NAME=_N9
 fi
 
+if [ "$1" == "ln" ]
+then
+TARGET_PACK_NAME=pack_brandy_native_js_ln
+APPLICATION_NAME=brandy-native-js-ln
+RECOVERY_NAME=$APPLICATION_NAME-r
+SSB_NAME=$APPLICATION_NAME-ssb
+BUILD_NAME=_LN
+fi
+
 if [ "$1" == "hso" ]
 then
 HSO_BUILD=hso
index 1fcb3cf..897e78d 100644 (file)
@@ -16,6 +16,9 @@ add_subdirectory_if_exist(alipay)
 if("SUPPORT_AUTO_OTA" IN_LIST DEFINES)
     add_subdirectory_if_exist(auto_ota)
 endif()
+if("BOARD_LEINIAO" IN_LIST DEFINES)
+    add_subdirectory_if_exist(ln)
+endif()
 if("BOARD_N9" IN_LIST DEFINES)
     add_subdirectory_if_exist(n9)
 endif()
diff --git a/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-ln/libuikit_fwk.a b/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-ln/libuikit_fwk.a
new file mode 100644 (file)
index 0000000..e3ce469
Binary files /dev/null and b/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-ln/libuikit_fwk.a differ
diff --git a/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-ln/libmsg_center.a b/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-ln/libmsg_center.a
new file mode 100644 (file)
index 0000000..b1e105a
Binary files /dev/null and b/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-ln/libmsg_center.a differ
diff --git a/code/sdk/application/wearable/ln/nativeapp/brandy-native-js-ln/libuikit_fwk.a b/code/sdk/application/wearable/ln/nativeapp/brandy-native-js-ln/libuikit_fwk.a
new file mode 100644 (file)
index 0000000..e3ce469
Binary files /dev/null and b/code/sdk/application/wearable/ln/nativeapp/brandy-native-js-ln/libuikit_fwk.a differ
diff --git a/code/sdk/application/wearable/ln/service/msg_center/brandy-native-js-ln/libmsg_center.a b/code/sdk/application/wearable/ln/service/msg_center/brandy-native-js-ln/libmsg_center.a
new file mode 100644 (file)
index 0000000..b1e105a
Binary files /dev/null and b/code/sdk/application/wearable/ln/service/msg_center/brandy-native-js-ln/libmsg_center.a differ
diff --git a/code/sdk/application/wearable/nativeapp/brandy-native-js-ln/libuikit_fwk.a b/code/sdk/application/wearable/nativeapp/brandy-native-js-ln/libuikit_fwk.a
new file mode 100644 (file)
index 0000000..e3ce469
Binary files /dev/null and b/code/sdk/application/wearable/nativeapp/brandy-native-js-ln/libuikit_fwk.a differ
diff --git a/code/sdk/application/wearable/service/msg_center/brandy-native-js-ln/libmsg_center.a b/code/sdk/application/wearable/service/msg_center/brandy-native-js-ln/libmsg_center.a
new file mode 100644 (file)
index 0000000..b1e105a
Binary files /dev/null and b/code/sdk/application/wearable/service/msg_center/brandy-native-js-ln/libmsg_center.a differ
index f2cbfba..14a4dd4 100644 (file)
@@ -1062,6 +1062,133 @@ target = {
             'GPIO_POWERON_FLASH'
         ]
     },
+
+    ################# leiniao ############################
+    'brandy-native-js-ln': {
+        'base_target_name': 'brandy-native-js',
+        #自定义配置项,选择硬件及功能参数
+        'defines': [
+            'BOARD_FD230',
+            'BOARD_LEINIAO',
+            # cat1 相关配置
+            'FT_SINGLE_UART',
+            'ENABLE_SLIP',
+            'SUPPORT_CAT1_SERVICE',
+            'SUPPORT_TCPIP',           
+            
+            'CONFIG_EFUSE_READ_TO_RAM',
+             'CUSTOM_UTILS',
+            # 'CUSTOM_HID_SERVICE',
+            # 'WEARABLE_LOG_DEBUG',
+            'SUPPORT_RC_CALIBRATION',
+            # 'PPG_HX3695',
+            'VIB_USE_PWM',
+            'CONFIG_PWM_SUPPORT',
+            # 'ACC_LIS2DOC',
+            # 'ENABLE_CUSTOM_I2C',
+            #'ENABLE_VIBRATOR',
+            # 'ENCODER_SUPPORT',
+            # 'SUPPORT_SPO2_NOTIFICATION',
+            # 'SUPPORT_SPO2_NOTIFICATION_TEST',
+            'SUPPORT_DEVICE_PAIRING_NOTIFICATION',
+            # 'ENABLE_FONT_VECTOR_GLOBAL', 
+            # 'ENABLE_SHAPING',
+            'SUPPORT_CHARGER_PLUG_DETECTION_NOTIFICATION',
+            # 'SUPPORT_AT_CUSTOMUTILS',
+            'SUPPORT_BLE_SERVICE',
+            # 'SUPPORT_MAG_SERVICE',
+            # 'SUPPORT_PPG_SERVICE',
+            # 'SUPPORT_CYWEE_SERVICE',
+            'SUPPORT_BATTERY_SERVICE',
+            'FD230',
+            # 'SUPPORT_AUTO_OTA_SERVER',
+            # 'CONFIG_DFX_SUPPORT_DIAG_UP_MACHINE=1',
+            #"MEM_CHECK",
+            #'ENABLE_WEBSOCKET',
+            # 'CYWEE_MAC_ACTIVE',                      
+            #'SUPPORT_HID_SERVICE',
+            # 'SUPPORT_BAIDU_MAP',
+            'CFG_FLASH_SIZE=16',
+            'SINGLE_USER_PARTITION',
+            # 'TPTYPE_FT6X46',
+            # 'ROTARYENCODER_HX3507',
+            'NANDFLASH_DS35X',
+            'BLE_INSTRUCT',
+            # 'AILPAY_SUPPORT',
+            # 'SUPPORT_FACTORY_SERVICE',
+            # 'MEMORY_CORRUPTION',
+            
+        ],
+        #添加自定义应用
+       'ram_component': [
+                          'audio_at_service', 
+                          'media_at_service', 
+                          'bt_manager_at_service',
+                        #    "ppg_sensor_hx3695",
+                        #   "ppgBleService",
+                        #    "mag_sensor_mmc5603",
+                          "vibrator",
+                          "vibrator_service",
+                        #   "-:lwip",
+                          "cat1Service",
+                          "cat1Test",
+                          "audio_manager",
+                          "CustomUIcomponentTool",
+                          "nativeabilityfwk",
+                          "custom_utils",
+                          "custom_utilscpp",
+                          "custom_config",
+                          "rotary_encoder",
+                           "nativelauncher",
+                            # "ppg_service",
+                            # "cywee_service",
+                           "batterry_service",
+                           "bleservice",
+                           "blemoder",
+                           "transspecard",
+                        #    "factorytest_service",
+                        #    "hid_service",
+                           "producttest",
+                            # "ppg_hal",
+                            # "mag_service",
+                            # "cywee_dml",
+                            #"cyweeBleService",
+                           ],
+               'image_analysis': False,
+               'fs_image_path':'fd230',
+        'ssb_version': 'brandy-native-js-ln-ssb',
+               # 'fs_image_path':'evb',
+               'fs_image': True
+    },
+    'brandy-native-js-ln-r': {
+        'base_target_name': 'brandy-native-js-r',
+        #自定义配置项,选择硬件及功能参数
+        'defines': [
+                    'BOARD_FD230',
+                    'BOARD_LEINIAO',
+                    'FT_SINGLE_UART',
+                    'NANDFLASH_DS35X',
+                    # 'TPTYPE_FT6X46',
+                    'CFG_FLASH_SIZE=16',
+                    'FD230',
+                                       'SINGLE_USER_PARTITION'
+               ],
+               'ram_component': ["at_cmd"]
+    },
+    'brandy-native-js-ln-ssb': {
+        'base_target_name': 'brandy-ssb',
+        #自定义配置项,选择硬件及功能参数
+        'defines': [
+            'BOARD_FD230',
+            'BOARD_LEINIAO',
+            'FT_SINGLE_UART',
+            'ENABLE_ECC',
+            'CFG_DRIVERS_NANDFLASH',
+            'CFG_FLASH_SIZE=16',
+            'FD230',
+            'NANDFLASH_DS35X'
+        ]
+    },
 }
 
 target_group = {
@@ -1079,6 +1206,7 @@ target_group = {
     'pack_brandy_native_js_u8': ['brandy-native-js-u8-ssb', 'brandy-native-js-u8-r', 'brandy-native-js-u8'],
     'pack_brandy_native_js_w9': ['brandy-native-js-w9-ssb', 'brandy-native-js-w9-r', 'brandy-native-js-w9'],
     'pack_brandy_native_js_n9': ['brandy-native-js-n9-ssb', 'brandy-native-js-n9-r', 'brandy-native-js-n9'],
+    'pack_brandy_native_js_ln': ['brandy-native-js-ln-ssb', 'brandy-native-js-ln-r', 'brandy-native-js-ln'],
     'pack_brandy_native_js_lt22': ['brandy-native-js-lt22-ssb', 'brandy-native-js-lt22-r', 'brandy-native-js-lt22'],
     'pack_brandy_native_js_xts': ['brandy-native-js-xts-ssb', 'brandy-native-js-xts-r', 'brandy-native-js-xts'],
 
diff --git a/code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_native_js_ln.config b/code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_native_js_ln.config
new file mode 100644 (file)
index 0000000..b4b1e26
--- /dev/null
@@ -0,0 +1,18 @@
+# Generated by Kconfig Tool.
+# Note: !!!This file can not be modify manually!!!
+
+#
+# Main menu description, show how to use this configuration system.
+#
+
+#
+# Product
+#
+
+#
+# Config the product.
+#
+CONFIG_NORFLASH_SIZE=16
+
+CONFIG_PSRAM_DENSITY_MB=32
+# end of Product
diff --git a/code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_native_js_ln_ssb.config b/code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_native_js_ln_ssb.config
new file mode 100644 (file)
index 0000000..b4b1e26
--- /dev/null
@@ -0,0 +1,18 @@
+# Generated by Kconfig Tool.
+# Note: !!!This file can not be modify manually!!!
+
+#
+# Main menu description, show how to use this configuration system.
+#
+
+#
+# Product
+#
+
+#
+# Config the product.
+#
+CONFIG_NORFLASH_SIZE=16
+
+CONFIG_PSRAM_DENSITY_MB=32
+# end of Product
diff --git a/code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_ssb_native_js_ln.config b/code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_ssb_native_js_ln.config
new file mode 100644 (file)
index 0000000..b4b1e26
--- /dev/null
@@ -0,0 +1,18 @@
+# Generated by Kconfig Tool.
+# Note: !!!This file can not be modify manually!!!
+
+#
+# Main menu description, show how to use this configuration system.
+#
+
+#
+# Product
+#
+
+#
+# Config the product.
+#
+CONFIG_NORFLASH_SIZE=16
+
+CONFIG_PSRAM_DENSITY_MB=32
+# end of Product
diff --git a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-ln-r/libgfx_rm.a b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-ln-r/libgfx_rm.a
new file mode 100644 (file)
index 0000000..a731301
Binary files /dev/null and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-ln-r/libgfx_rm.a differ
diff --git a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-ln/libgfx_rm.a b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-ln/libgfx_rm.a
new file mode 100644 (file)
index 0000000..7337ef0
Binary files /dev/null and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-ln/libgfx_rm.a differ
diff --git a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-ln/libdisplay_gfx.a b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-ln/libdisplay_gfx.a
new file mode 100644 (file)
index 0000000..8864f8e
Binary files /dev/null and b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-ln/libdisplay_gfx.a differ
diff --git a/code/sdk/middleware/services/gui/uikit/brandy-native-js-ln/libuikit_ext.a b/code/sdk/middleware/services/gui/uikit/brandy-native-js-ln/libuikit_ext.a
new file mode 100644 (file)
index 0000000..9d278be
Binary files /dev/null and b/code/sdk/middleware/services/gui/uikit/brandy-native-js-ln/libuikit_ext.a differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln-r/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln-r/libx_vfs_private.a
new file mode 100644 (file)
index 0000000..ef8c37d
Binary files /dev/null and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln-r/libx_vfs_private.a differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln/libx_vfs_private.a
new file mode 100644 (file)
index 0000000..1c08fcb
Binary files /dev/null and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln/libx_vfs_private.a differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln-r/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln-r/libfs_yaffs2.a
new file mode 100644 (file)
index 0000000..00beb36
Binary files /dev/null and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln-r/libfs_yaffs2.a differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln/libfs_yaffs2.a
new file mode 100644 (file)
index 0000000..50e244a
Binary files /dev/null and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln/libfs_yaffs2.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-ln/libams.a b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-ln/libams.a
new file mode 100644 (file)
index 0000000..b294a76
Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-ln/libams.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libace.a b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libace.a
new file mode 100644 (file)
index 0000000..e807091
Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libace.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libace_http.a b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libace_http.a
new file mode 100644 (file)
index 0000000..cdfdb31
Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libace_http.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libnetstack_http.a b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libnetstack_http.a
new file mode 100644 (file)
index 0000000..b9c1bb0
Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libnetstack_http.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libwebsocket.a b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libwebsocket.a
new file mode 100644 (file)
index 0000000..93b5e6f
Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-ln/libwebsocket.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-ln/libbms.a b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-ln/libbms.a
new file mode 100644 (file)
index 0000000..f262ad8
Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-ln/libbms.a differ
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-ln/libjerryscript.a b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-ln/libjerryscript.a
new file mode 100644 (file)
index 0000000..bafd4fc
Binary files /dev/null and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-ln/libjerryscript.a differ
index 0931fb4..b68ad06 100644 (file)
@@ -336,15 +336,15 @@ namespace OHOS
         { \r
             if(uapi_dev_runtime_get_cat1_powerstat())\r
                 uapi_set4GCapability(false);\r
-            #ifdef FD230\r
+            #ifdef SUPPORT_FACTORY_SERVICE\r
                 factorytest_start_aging_test();\r
             #endif\r
         }\r
         if(strcmp(view.GetViewId(),"stop") == 0)\r
         { \r
-            #ifdef FD230\r
-                factorytest_stop_aging_test();\r
-            #endif\r
+#ifdef SUPPORT_FACTORY_SERVICE\r
+            factorytest_stop_aging_test();\r
+#endif\r
         }\r
         if(strcmp(view.GetViewId(),"exit") == 0)\r
         { \r
index 73f92f9..fb770f1 100644 (file)
@@ -3,7 +3,7 @@
 #include "producttest/include/testPresenter.h"
 #include "producttest/include/testgsenson.h"
 #include "cmsis_os2.h"
-#include "cywee_hal.h" 
+
 #include "producttest/include/testView.h"
 #include "math.h"
 #ifdef __cplusplus
@@ -14,6 +14,10 @@ extern "C"
 #endif
     #include "pm_veto.h"
     #include "pm.h"
+#ifdef SUPPORT_CYWEE_SERVICE
+    #include "cywee_hal.h" 
+#endif
+
 #ifdef __cplusplus
 #if __cplusplus
 }
@@ -267,10 +271,12 @@ namespace OHOS
         }
         testGsonsonScrollView->Add(title);
         /* -------------------------------------------------------------------------- */
+        char buf[124]={0};
+#ifdef SUPPORT_CYWEE_SERVICE
         gsenson_t t;
         // get_gsonsen_xyz(&t);
-        char buf[124]={0};
         sprintf(buf,"X:%.2f\nY:%.2f\nZ:%.2f",t.x,t.y,t.z);
+#endif
         Config = {
             .left = 173,
             .top = 160,
index ff47f4a..08557d6 100644 (file)
@@ -2,7 +2,6 @@
 #include "custom_utils.h"
 #include "producttest/include/testPresenter.h"
 #include "producttest/include/testmagnetic.h"
-#include "mag_service.h"
 #include "cmsis_os2.h"
 #include "producttest/include/testView.h"
 // #define TEST_BATTERY
@@ -21,6 +20,7 @@ extern "C"
     #include "pm.h"
 #ifdef SUPPORT_MAG_SERVICE
     #include "mag_hal.h" 
+    #include "mag_service.h"
 #endif
 #ifdef __cplusplus
 #if __cplusplus
index c97d331..8f7e218 100644 (file)
@@ -19,11 +19,9 @@ namespace OHOS
     static testoldView *g_pSystemAboutTheWatchView{nullptr};
     static osTimerId_t  g_aging_timer=NULL;
 
-    #ifdef FD230
+#ifdef SUPPORT_FACTORY_SERVICE
     static ble_aging_t aging_t;
-    #endif
-
-    
+#endif
 
     testoldView::testoldView()
     {
@@ -46,6 +44,7 @@ namespace OHOS
 
     void testoldView::setdata(void)
     {
+#ifdef SUPPORT_FACTORY_SERVICE
         label_flag->SetText((std::string("老化标志:" )+ std::to_string(aging_t.flag)).c_str());
         label_target_time->SetText((std::string("目标时间:") + std::to_string(aging_t.target_time)).c_str());
         label_left_time->SetText((std::string("剩余时间:" )+ std::to_string(aging_t.left_time)).c_str());
@@ -61,6 +60,7 @@ namespace OHOS
         label_mic_error->SetText((std::string("麦克风失败次数:" )+ std::to_string(aging_t.mic_error)).c_str());
         label_speaker_error->SetText((std::string("喇叭失败次数:") + std::to_string(aging_t.speaker_error)).c_str());
         label_charge_error->SetText((std::string("充电失败次数:" )+ std::to_string(aging_t.charge_error)).c_str());
+#endif
     }
 
     void testoldView::ClearAll()
@@ -264,7 +264,9 @@ namespace OHOS
     {
         do_custom_fileoperate_service_check_msg(CUSTOM_FILEOPERATE_MSG_TYPE_AGING_DATA_READ, NULL, 0);
         LOS_Msleep(500);
+#ifdef SUPPORT_FACTORY_SERVICE
         factorytest_get_aging_data(&aging_t);
+#endif
         OHOS::testoldView *pview = OHOS::testoldView::GetInstance();
         pview->setdata();
     }
index 461693b..4b8d7dc 100644 (file)
@@ -4,7 +4,9 @@
 #include "bleService.h"
 #include <errcode.h>
 #include "alipay_app.h"
+#ifdef SUPPORT_FACTORY_SERVICE
 #include "factorytestService.h"
+#endif
 #include <time.h>
 #include <cmsis_os2.h>
 #include <stdint.h>
@@ -216,7 +218,9 @@ static uint8_t send_packets_range(uint8_t type_id, void *data, uint16_t datalen,
         }
 
         // 发送数据
+#ifdef SUPPORT_FACTORY_SERVICE
         ble_factorytest_server_send_ota_report(buf, 17 + current_datalen + 1);
+    #endif
         printf("发送第 %u 个分包(总 %u 包)\n", current_packet, send_packet_total);
         msleep(PACKET_DELTA_TIMEOUT); // 增加延时,确保可以成功发送成功
 
@@ -252,7 +256,9 @@ uint8_t send_transspecard_data(uint8_t type_id, void *data, uint16_t datalen)
         }
 
         // 发送数据
+#ifdef SUPPORT_FACTORY_SERVICE
         ble_factorytest_server_send_ota_report(buf, 17 + current_datalen + 1);
+#endif
         // printf("发送第 1 个分包(总 1 包)\n");
         msleep(PACKET_DELTA_TIMEOUT); // 增加延时,确保可以成功发送成功
 
@@ -504,7 +510,9 @@ static void notify_resend(uint8_t packet_id)
     memcpy(retransmit_req + 15, &temp_32, 2); // 包数据长度
     retransmit_req[17] = packet_id;
     retransmit_req[18] = calculate_CRC_transspecard(retransmit_req, 18); // 计算CRC校验码
+#ifdef SUPPORT_FACTORY_SERVICE
     ble_factorytest_server_send_ota_report(retransmit_req, 19);
+#endif
     msleep(PACKET_DELTA_TIMEOUT); // 增加延时,确保可以成功发送成功
 
     free(retransmit_req);
index a101cde..678196f 100644 (file)
@@ -251,7 +251,6 @@ static void ListenGnssData(tiot_handle handle)
                             int current_len = strlen(pgnss_log);\r
                             int data_len = strlen(temp_buf);\r
                             if (current_len + data_len < 2047) {  // 留1字节给字符串结束符\r
-                                // strcat(pgnss_log, temp_buf);\r
                                 snprintf(pgnss_log + current_len, 2048 - current_len, "%s", temp_buf);\r
                             }\r
                         }\r
index 6709e7f..3f9a97e 100644 (file)
@@ -7,7 +7,9 @@
 #include "custom_utils.h"
 #include "debug_print.h"
 #include "custom_runtime.h"
+#ifdef SUPPORT_FACTORY_SERVICE
 #include "factorytest_protocol.h"
+#endif
 #include "los_base.h"
 #ifdef SUPPORT_CUSTOM_CONFIG
 #include "ConfigModelC.h"