修复bleservice 不能开启的问,恢复keepon timeout 比较参数 24/1 24/head
authorSnickerSun <snickersun@163.com>
Wed, 17 Apr 2024 02:19:13 +0000 (10:19 +0800)
committerSnickerSun <snickersun@163.com>
Wed, 17 Apr 2024 02:19:13 +0000 (10:19 +0800)
code/sdk/application/wearable/fd230app/nativeui/config/include/ConfigModel.h
code/sdk/application/wearable/service/power_manager/src/power_display_service.c
code/sdk/drivers/peripheral/utils/custom_utils.c

index f984551..79e6252 100644 (file)
@@ -145,7 +145,7 @@ namespace OHOS
     private:
         configmodel_item configmodel_item_key_name[CONFIGMODEL_ITEM_MAX] =
         {
-            {ConfigDataType::DATATYPE_BOOL,     "ClassicBT_Service_On",     "false"  },//CONFIGMODEL_ITEM_CLASSIC_BT_SERVICE_ON, //关机前经典蓝牙服务状态,启动时仍然恢复其当时状态
+            {ConfigDataType::DATATYPE_BOOL,     "ClassicBT_Service_On",     "true"  },//CONFIGMODEL_ITEM_CLASSIC_BT_SERVICE_ON, //关机前经典蓝牙服务状态,启动时仍然恢复其当时状态
             {ConfigDataType::DATATYPE_INT,      "ScreenBrightness",         "255"    },//CONFIGMODEL_ITEM_SCREEN_BRIGHTNESS_VALUE,
             {ConfigDataType::DATATYPE_INT,      "ScreenOffTimeoutValue",    "5000"  },//CONFIGMODEL_ITEM_SCREEN_OFF_TIMEOUT_VALUE, 自动息屏时间,默认5秒 5000ms
             {ConfigDataType::DATATYPE_BOOL,     "Cat1_Service_On",          "false" },//CONFIGMODEL_ITEM_CAT1_SERVICE_ON, // 关机前Cat1 Service启动着,则重启仍然启动,反之亦然
index 8eb1721..a1909dc 100755 (executable)
@@ -131,8 +131,8 @@ static errcode_t power_display_set_auto_timeout_function(bool enable)
 
 static errcode_t power_display_set_keepon_timeout(uint32_t time)
 {
-    // if (g_screen_context.keep_on_timeout != 0 && time != 0) 
-    if (g_screen_context.keep_on_timeout != 0 ) 
+    if (g_screen_context.keep_on_timeout != 0 && time != 0) 
+    // if (g_screen_context.keep_on_timeout != 0 ) 
     {
         POWER_DISPLAY_PRINT_ERR(0, "current has been set %u,need to wait for timeout or set 0 to cancel. \r\n",
             g_screen_context.keep_on_timeout);
index b55ff2a..9451686 100644 (file)
@@ -161,9 +161,9 @@ bool is_doing_shutdown_or_reboot(void)
 bool start_custom_ble_service(void)
 {
 #ifdef SUPPORT_BLE_SERVICE
-        // openBle();
+        openBle();
         PRINT("start custom protocol classic bt ble service !\r\n");
-        bool ret = enable_bt_stack();
+        // bool ret = enable_bt_stack();
 #endif 
     return true;
 }
@@ -171,9 +171,9 @@ bool stop_custom_ble_service(void)
 {
 #ifdef SUPPORT_BLE_SERVICE
         PRINT("start custom protocol classic bt ble service !\r\n");
-        // ble_unregist_server();
-        // closeBle();
-        bool ret = disable_bt_stack();
+        ble_unregist_server();
+        closeBle();
+        // bool ret = disable_bt_stack();
 #endif 
     return true;
 }