#666 优化抬腕亮屏时间
authorSnickerSun <snickersun@163.com>
Fri, 27 Sep 2024 02:04:35 +0000 (10:04 +0800)
committerSnickerSun <snickersun@163.com>
Fri, 27 Sep 2024 02:04:35 +0000 (10:04 +0800)
code/sdk/application/wearable/service/power_manager/src/actions/display_action.c
code/sdk/drivers/peripheral/rotary_encoder/rotary_encoder_drv.c
code/sdk/drivers/peripheral/utilscpp/custom_utilscpp.cpp
code/sdk/drivers/peripheral/utilscpp/custom_utilscpp.h

index 3f48dde..6a72785 100755 (executable)
@@ -161,12 +161,13 @@ static uint32_t action_display_lcd_on()
 #ifdef SUPPORT_CAT1_SERVICE
     uapi_cat1_resume();
 #endif
-
+    
 #if defined(ENABLE_UIKIT) || defined(ENABLE_LVGL)
     NotifyScreenOn(); // Instruct the uikit to start the display operation.
 #endif
     if ((g_pms_lcd_on_first_flag == false) && (g_pms_dpu_ready == false)) {
-        touch_screen_resume(); // open touch
+        // touch_screen_resume();// open touch/
+        post_func_to_graphic(touch_screen_resume); // open touch 太耗时,放到GraphicService里延迟执行,加快亮屏速度。
         rotary_encoder_resume();
     }
 #ifdef CONFIG_CLDO1PD_SUPPORT
index 9a28d59..2032988 100644 (file)
@@ -462,13 +462,13 @@ void rotary_encoder_resume(void)
 
 void encoder_suspend_for_i2c(void)
 {
-    re_err("encoder_suspend_for_i2c ----------succ!!!\n");
+    // re_err("encoder_suspend_for_i2c ----------succ!!!\n");
     // i2c_save_reg(TOUCH_I2C_BUS);
 }
 
 void encoder_resume_for_i2c(void)
 {
-    re_err("encoder_resume_for_i2c ----------succ!!!\n");
+    // re_err("encoder_resume_for_i2c ----------succ!!!\n");
 
     // i2c_recovery_reg(TOUCH_I2C_BUS);
 }
index ecad631..d69ebce 100644 (file)
@@ -326,6 +326,26 @@ void custom_set_volume(uint8_t channel,int32_t sounding)
 }
 
 
+/**
+ * input: 
+ *     func  函数指针
+ * return:
+ *      ERRCODE_FAIL
+ *      ERRCODE_SUCC
+*/
+errcode_t post_func_to_graphic(void (*func)(void))
+{
+
+  if (func == NULL)
+  {
+    return ERRCODE_FAIL;
+  }
+
+  GraphicService::GetInstance()->PostGraphicEvent(func);
+  
+  return ERRCODE_SUCC;
+
+}
 
 #ifdef __cplusplus
 }
index b418686..cf97323 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * @Author: penglei 1624952103@qq.com
  * @Date: 2024-07-09 20:22:54
- * @LastEditors: penglei 1624952103@qq.com
- * @LastEditTime: 2024-08-10 12:13:13
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2024-09-27 09:40:39
  * @FilePath: /FD230/code/sdk/drivers/peripheral/utilscpp/custom_utilscpp.h
  * @Description: 
  * 
@@ -29,6 +29,18 @@ void uapi_dump_meminfo(void);
 
 void CustomEventPublish(uint16_t topic, uint8_t *data , uint32_t size);
 void custom_set_volume(uint8_t channel,int32_t sounding);
+
+
+
+/**
+ * input: 
+ *     func  函数指针
+ * return:
+ *      ERRCODE_FAIL
+ *      ERRCODE_SUCC
+*/
+errcode_t post_func_to_graphic(void (*func)(void));
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */