From: snickersun@163.com Date: Wed, 17 Apr 2024 02:20:20 +0000 (+0000) Subject: Merge #24 into xts_origin from refs/changes/24/head X-Git-Tag: release_V1.2.70_20241020_135402~1179 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=0e931bd46f7ac07a4c4fac6a453b5d297b295fcb;p=mirrors%2FFD230.git Merge #24 into xts_origin from refs/changes/24/head 修复bleservice 不能开启的问,恢复keepon timeout 比较参数 * refs/changes/24/head: (1 commits squashed) - 修复bleservice 不能开启的问,恢复keepon timeout 比较参数 Signed-off-by: snickersun@163.com Reviewed-by: snickersun@163.com Merged-by: snickersun@163.com CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/24 --- 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; }