From bbd09a8b1470e1f40423b697aabe88c75680b991 Mon Sep 17 00:00:00 2001 From: SnickerSun Date: Wed, 17 Apr 2024 10:19:13 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8Dbleservice=20=E4=B8=8D?= =?utf8?q?=E8=83=BD=E5=BC=80=E5=90=AF=E7=9A=84=E9=97=AE=EF=BC=8C=E6=81=A2?= =?utf8?q?=E5=A4=8Dkeepon=20timeout=20=E6=AF=94=E8=BE=83=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../fd230app/nativeui/config/include/ConfigModel.h | 2 +- .../service/power_manager/src/power_display_service.c | 4 ++-- code/sdk/drivers/peripheral/utils/custom_utils.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/config/include/ConfigModel.h b/code/sdk/application/wearable/fd230app/nativeui/config/include/ConfigModel.h index f98455187..79e625221 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/config/include/ConfigModel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/config/include/ConfigModel.h @@ -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启动着,则重启仍然启动,反之亦然 diff --git a/code/sdk/application/wearable/service/power_manager/src/power_display_service.c b/code/sdk/application/wearable/service/power_manager/src/power_display_service.c index 8eb1721ea..a1909dc89 100755 --- a/code/sdk/application/wearable/service/power_manager/src/power_display_service.c +++ b/code/sdk/application/wearable/service/power_manager/src/power_display_service.c @@ -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); diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.c b/code/sdk/drivers/peripheral/utils/custom_utils.c index b55ff2a00..945168641 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.c +++ b/code/sdk/drivers/peripheral/utils/custom_utils.c @@ -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; } -- 2.17.1