From: penglei <1624952103@qq.com> Date: Thu, 11 Jul 2024 13:03:04 +0000 (+0800) Subject: 关闭放腕灭屏,修改屏幕亮度为百分之80,增加func键点亮屏幕功能。 X-Git-Tag: release_V1.2.70_20241020_135402~826^2^2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F508%2F1;p=mirrors%2FFD230.git 关闭放腕灭屏,修改屏幕亮度为百分之80,增加func键点亮屏幕功能。 --- diff --git a/code/sdk/drivers/peripheral/config/include/ConfigModel.h b/code/sdk/drivers/peripheral/config/include/ConfigModel.h index cbc68b6d2..543282422 100644 --- a/code/sdk/drivers/peripheral/config/include/ConfigModel.h +++ b/code/sdk/drivers/peripheral/config/include/ConfigModel.h @@ -275,7 +275,7 @@ namespace OHOS configmodel_item configmodel_item_key_name[CONFIGMODEL_ITEM_MAX] = { {ConfigDataType::DATATYPE_BOOL, "classicbt_service_on", "true" },// CONFIGMODEL_ITEM_CLASSIC_BT_SERVICE_ON, //关机前经典蓝牙服务状态,启动时仍然恢复其当时状态 - {ConfigDataType::DATATYPE_INT, "screen_brightness", "255" },//CONFIGMODEL_ITEM_SCREEN_BRIGHTNESS_VALUE, //屏幕亮度 + {ConfigDataType::DATATYPE_INT, "screen_brightness", "204" },//CONFIGMODEL_ITEM_SCREEN_BRIGHTNESS_VALUE, //屏幕亮度 {ConfigDataType::DATATYPE_INT, "screenoff_timeout_value", "5000" },//CONFIGMODEL_ITEM_SCREEN_OFF_TIMEOUT_VALUE, //屏幕自动息屏时间 默认 5秒 5000ms {ConfigDataType::DATATYPE_BOOL, "cat1_service_on", "false" },//CONFIGMODEL_ITEM_CAT1_SERVICE_ON, // 关机前Cat1 Service启动着,则重启仍然启动,反之亦然 {ConfigDataType::DATATYPE_STRING, "cat1_imei", "" },//CONFIGMODEL_ITEM_CAT1_IMEI, diff --git a/code/sdk/drivers/peripheral/cywee/src/main_dml.c b/code/sdk/drivers/peripheral/cywee/src/main_dml.c index 11efc91e3..e5814b9a9 100644 --- a/code/sdk/drivers/peripheral/cywee/src/main_dml.c +++ b/code/sdk/drivers/peripheral/cywee/src/main_dml.c @@ -616,17 +616,20 @@ void CWM_AP_SensorListen(pSensorEVT_t sensorEVT) { if ((int)sensorEVT->fData[1] == 2) { #if defined(SUPPORT_POWER_MANAGER) - display_api->set_screen_set_keepon_timeout(0); + //display_api->set_screen_set_keepon_timeout(0); CWM_OS_dbgPrintf("[cwyee] turn_off_screen"); #endif }else if ((int)sensorEVT->fData[1] == 1) { #if defined(SUPPORT_POWER_MANAGER) - if (display_api->get_screen_state() != SCREEN_ON) { + if (display_api->get_screen_state() != SCREEN_ON) + { CWM_OS_dbgPrintf("[cwyee] turn_on_screen"); display_api->turn_on_screen(); } - display_api->set_screen_set_keepon_timeout(5000); + // display_api->set_screen_set_keepon_timeout(0); + // display_api->set_screen_set_keepon_timeout(1000); + // uapi_setScreenDuration(1000); #endif } break; diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.c b/code/sdk/drivers/peripheral/utils/custom_utils.c index ae59e87ac..85c6042c3 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.c +++ b/code/sdk/drivers/peripheral/utils/custom_utils.c @@ -312,6 +312,7 @@ void startup_post_init_task(void) power_off_cat1(); } uapi_gei_btmac_and_chipinfo(); + uapi_func_lcd_on(); } void startup_post_init(void) @@ -2335,3 +2336,14 @@ void uapi_gei_btmac_and_chipinfo(void) wstp_print("^^^^ BTMAC=%s ^^^^ CyweeChipInfo=%s\n",btaddr_str,chipinfo); } + +static void func_button_callback_press(void) +{ + const power_display_svr_api_t *display_api = power_display_svr_get_api(); + display_api->turn_on_screen(); +} + +void uapi_func_lcd_on(void) +{ + uapi_button_register_event_cb(func_button_callback_press, 24); +} \ No newline at end of file diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.h b/code/sdk/drivers/peripheral/utils/custom_utils.h index 27f9a39c5..588f10166 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.h +++ b/code/sdk/drivers/peripheral/utils/custom_utils.h @@ -228,7 +228,7 @@ void uapi_factorytest_hide_test_tp_button(void); void uapi_efuse_test_write(uint8_t *data,uint32_t byte_number,uint8_t len); void uapi_efuse_test_read(uint32_t byte_number,uint8_t len); void uapi_gei_btmac_and_chipinfo(void); - +void uapi_func_lcd_on(void); #include "custom_utilscpp.h"