1010
1111#include "lv_font.h"
1212
13- #include <rtdbg.h>
13+ #define DRV_INFO
14+ #define LOG_TAG "virtual3d"
15+ #include <drv_log.h>
1416/* 资源声明 */
1517
16-
1718LX_IMG_DECLARE (LX_ANIMATEDEMOJI_EARPHONE_NORMAL_128_128 )
1819LX_IMG_DECLARE (LX_ANIMATEDEMOJI_EARPHONE_TRANSPARENCY_128_129 )
1920LX_IMG_DECLARE (LX_ANIMATEDEMOJI_EARPHONE_DENOISE_128_128 )
@@ -312,7 +313,7 @@ lx_vglite_model_t* get_model(uint16_t index)
312313
313314 CURR_MODEL .data = NULL ;
314315 CURR_MODEL .size = 0 ;
315- LOG_E (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->get_model start index:%d \n " ,index );
316+ LOG_D (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->get_model start index:%d" ,index );
316317
317318 CURR_MODEL .data = NULL ;
318319 CURR_MODEL .size = 0 ;
@@ -322,25 +323,25 @@ lx_vglite_model_t* get_model(uint16_t index)
322323 case 0 :
323324
324325 model_cache_list [index ] = LX_LOAD_MODEL (LX_MODEL_EMOJI_00 );
325- LOG_E (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->get_model LX_MODEL_EMOJI_00 model_cache_list[0]:%d \n " ,model_cache_list [index ]);
326+ LOG_D (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->get_model LX_MODEL_EMOJI_00 model_cache_list[0]:%d" ,model_cache_list [index ]);
326327 if (model_cache_list [index ])
327328 {
328329 CURR_MODEL .data = model_cache_list [index ];
329330 CURR_MODEL .size = LX_GET_MODEL_ORIGINAL_SIZE (LX_MODEL_EMOJI_00 );
330331
331- LOG_E (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->get_model LX_MODEL_EMOJI_00 CURR_MODEL.size:%d \n " ,CURR_MODEL .size );
332+ LOG_D (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->get_model LX_MODEL_EMOJI_00 CURR_MODEL.size:%d" ,CURR_MODEL .size );
332333 }
333334
334335 break ;
335336 case 1 :
336337
337338 model_cache_list [index ] = LX_LOAD_MODEL (LX_MODEL_EMOJI_01 );
338- LOG_E (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->get_model LX_MODEL_EMOJI_01 model_cache_list[1]:%d \n " ,model_cache_list [index ]);
339+ LOG_D (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->get_model LX_MODEL_EMOJI_01 model_cache_list[1]:%d" ,model_cache_list [index ]);
339340 if (model_cache_list [index ])
340341 {
341342 CURR_MODEL .data = model_cache_list [index ];
342343 CURR_MODEL .size = LX_GET_MODEL_ORIGINAL_SIZE (LX_MODEL_EMOJI_01 );
343- LOG_E (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->get_model LX_MODEL_EMOJI_01 CURR_MODEL.size:%d \n " ,CURR_MODEL .size );
344+ LOG_D (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->get_model LX_MODEL_EMOJI_01 CURR_MODEL.size:%d" ,CURR_MODEL .size );
344345 }
345346
346347 break ;
@@ -1201,7 +1202,7 @@ void free_model(uint16_t index)
12011202{
12021203 if (model_cache_list [index ])
12031204 {
1204- LOG_E (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->free_model (uint16_t)index:%d \n " ,(uint16_t )index );
1205+ LOG_D (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->free_model (uint16_t)index:%d" ,(uint16_t )index );
12051206 LX_UNLOAD_MODEL (model_cache_list [index ]);
12061207 model_cache_list [index ] = NULL ;
12071208 }
@@ -1368,12 +1369,11 @@ static void emoji_screen_restore(void)
13681369
13691370static void touch_event_handler (lv_event_t * e ) {
13701371 lv_event_code_t code = lv_event_get_code (e );
1371- LOG_E (" lv_example_virtual3d_animated_emoji ->touch_event_handler (uint16_t)LV_HOR_RES:%d \n " ,(uint16_t )LV_HOR_RES );
1372- LOG_E (" lv_example_virtual3d_animated_emoji ->touch_event_handler (uint16_t)LV_VER_RES:%d \n " ,(uint16_t )LV_VER_RES );
1373- LOG_E (" lv_example_virtual3d_animated_emoji ->touch_event_handler (uint16_t)code:%d \n " ,(uint16_t )code );
1372+ LOG_D (" lv_example_virtual3d_animated_emoji ->touch_event_handler (uint16_t)LV_HOR_RES:%d" ,(uint16_t )LV_HOR_RES );
1373+ LOG_D (" lv_example_virtual3d_animated_emoji ->touch_event_handler (uint16_t)LV_VER_RES:%d" ,(uint16_t )LV_VER_RES );
1374+ LOG_D (" lv_example_virtual3d_animated_emoji ->touch_event_handler (uint16_t)code:%d" ,(uint16_t )code );
13741375 if (code == LV_EVENT_PRESSED ) {
13751376 lv_point_t pt = { 0 };
1376- LOG_E (" lv_example_virtual3d_animated_emoji ->touch_event_handler (uint16_t)LV_EVENT_PRESSED:%d \n" ,(uint16_t )LV_EVENT_PRESSED );
13771377 lv_indev_get_point (lv_indev_get_act (), & pt );
13781378 #if defined(__FOLLOW_DEMO_ON__ )
13791379 lv_virtual3d_set_param2 (emoji_virtual3d , "setActionLoopByName" , (uint32_t )"animate_system_standby_smartring_follow" );
@@ -1389,7 +1389,7 @@ static void touch_event_handler(lv_event_t *e) {
13891389 }
13901390 else if (code == LV_EVENT_PRESSING ) {
13911391 lv_point_t pt = { 0 };
1392- LOG_E (" lv_example_virtual3d_animated_emoji ->touch_event_handler (uint16_t)LV_EVENT_PRESSING:%d \n " ,(uint16_t )LV_EVENT_PRESSING );
1392+ LOG_D (" lv_example_virtual3d_animated_emoji ->touch_event_handler (uint16_t)LV_EVENT_PRESSING:%d" ,(uint16_t )LV_EVENT_PRESSING );
13931393 lv_indev_get_point (lv_indev_get_act (), & pt );
13941394 #if defined(__FOLLOW_DEMO_ON__ )
13951395 lv_virtual3d_set_param2 (emoji_virtual3d , "followAngle" , (uint32_t ) get_angle_from_pos (pt .x , pt .y , LV_HOR_RES , LV_VER_RES ));
@@ -1410,8 +1410,8 @@ static void touch_event_handler(lv_event_t *e) {
14101410 }
14111411 else if (code == LV_EVENT_RELEASED || code == LV_EVENT_PRESS_LOST ) {
14121412 lv_point_t pt = { 0 };
1413- LOG_E (" lv_example_virtual3d_animated_emoji ->touch_event_handler (uint16_t)LV_EVENT_RELEASED:%d \n " ,(uint16_t )LV_EVENT_RELEASED );
1414- LOG_E (" lv_example_virtual3d_animated_emoji ->touch_event_handler (uint16_t)LV_EVENT_PRESS_LOST:%d \n " ,(uint16_t )LV_EVENT_PRESS_LOST );
1413+ LOG_D (" lv_example_virtual3d_animated_emoji ->touch_event_handler (uint16_t)LV_EVENT_RELEASED:%d" ,(uint16_t )LV_EVENT_RELEASED );
1414+ LOG_D (" lv_example_virtual3d_animated_emoji ->touch_event_handler (uint16_t)LV_EVENT_PRESS_LOST:%d" ,(uint16_t )LV_EVENT_PRESS_LOST );
14151415 lv_indev_get_point (lv_indev_get_act (), & pt );
14161416 #if defined(__FOLLOW_DEMO_ON__ )
14171417 lv_virtual3d_set_param2 (emoji_virtual3d , "followRange" , (uint32_t )0 );
@@ -1529,18 +1529,18 @@ static uint32_t virtual3d_user_callback(uint16_t cmd, uint32_t param, uint32_t u
15291529 }
15301530 case LX_CMD_ID_GET_MODEL :
15311531
1532- LOG_E (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->LX_CMD_ID_GET_MODEL (uint16_t)param:%d \n " ,(uint16_t )param );
1532+ LOG_D (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->LX_CMD_ID_GET_MODEL (uint16_t)param:%d" ,(uint16_t )param );
15331533 return get_model ((uint16_t )param );
15341534
15351535 case LX_CMD_ID_FREE_MODEL :
1536- LOG_E (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->LX_CMD_ID_FREE_MODEL (uint16_t)param:%d \n " ,(uint16_t )param );
1536+ LOG_D (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->LX_CMD_ID_FREE_MODEL (uint16_t)param:%d" ,(uint16_t )param );
15371537 free_model ((uint16_t )param );
15381538
15391539 return 1 ;
15401540
15411541 case LX_CMD_ID_FREE_IMAGE :
15421542
1543- LOG_E ("LX_CMD_ID_FREE_IMAGE param:%d\n" , param );
1543+ LOG_D ("LX_CMD_ID_FREE_IMAGE param:%d\n" , param );
15441544
15451545 free_img ((uint16_t )param );
15461546
@@ -1551,7 +1551,7 @@ static uint32_t virtual3d_user_callback(uint16_t cmd, uint32_t param, uint32_t u
15511551
15521552 uint8_t percent = (uint8_t )param ;
15531553
1554- // LOG_E (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->LX_CMD_ID_UPDATE_STATUS percent:%d \n ",percent);
1554+ // LOG_D (" LX_VGWIDGET_INS_EMOJI_ANIMATION ->LX_CMD_ID_UPDATE_STATUS percent:%d",percent);
15551555
15561556 /* 删除界面处理参考
15571557 if(percent == 100)
@@ -1626,7 +1626,7 @@ lv_obj_t * lv_example_virtual3d_animated_emoji(lv_obj_t * p_container)
16261626{
16271627
16281628#if 1
1629- LOG_E ("Creating 3D :LX_VGWIDGET_INS_EMOJI_ANIMATION " );
1629+ LOG_D ("Creating 3D :LX_VGWIDGET_INS_EMOJI_ANIMATION " );
16301630 emoji_popup_mode = false;
16311631
16321632 /* 全屏模式下,隐藏其他obj对象,以免影响刷新帧率 */
@@ -1649,17 +1649,17 @@ lv_obj_t * lv_example_virtual3d_animated_emoji(lv_obj_t * p_container)
16491649 lv_obj_add_event_cb (emoji_virtual3d , touch_event_handler , LV_EVENT_PRESSING , NULL );
16501650 lv_obj_add_event_cb (emoji_virtual3d , touch_event_handler , LV_EVENT_PRESS_LOST , NULL );
16511651
1652- LOG_E ("Creating 3D :LX_VGWIDGET_INS_EMOJI_ANIMATION AAA LV_HOR_RES =%d \n " ,LV_HOR_RES );
1652+ LOG_D ("Creating 3D :LX_VGWIDGET_INS_EMOJI_ANIMATION AAA LV_HOR_RES =%d" ,LV_HOR_RES );
16531653
1654- LOG_E ("Creating 3D :LX_VGWIDGET_INS_EMOJI_ANIMATION BB LV_VER_RES =%d \n " ,LV_VER_RES );
1654+ LOG_D ("Creating 3D :LX_VGWIDGET_INS_EMOJI_ANIMATION BB LV_VER_RES =%d" ,LV_VER_RES );
16551655
16561656 /* 初始化3D效果 */
16571657 lv_virtual3d_setup (emoji_virtual3d );
16581658
1659- LOG_E ("LX_VGWIDGET_INS_EMOJI_ANIMATION created successfully" );
1659+ LOG_D ("LX_VGWIDGET_INS_EMOJI_ANIMATION created successfully" );
16601660#else
16611661 //red_background_demo();
1662- LOG_E ("Creating 3D :LX_VGWIDGET_INS_DEMO " );
1662+ LOG_D ("Creating 3D :LX_VGWIDGET_INS_DEMO " );
16631663 emoji_virtual3d = lv_virtual3d_create (lv_screen_active (),
16641664 LX_VGWIDGET_INS_DEMO ,
16651665 EMOJI_BG );
@@ -1675,7 +1675,7 @@ lv_obj_t * lv_example_virtual3d_animated_emoji(lv_obj_t * p_container)
16751675
16761676void lv_example_virtual3d_animated_emoji_popup (void )
16771677{
1678- LOG_E ("Creating 3D :LX_VGWIDGET_INS_EMOJI_ANIMATION popup" );
1678+ LOG_D ("Creating 3D :LX_VGWIDGET_INS_EMOJI_ANIMATION popup" );
16791679
16801680 emoji_popup_mode = true;
16811681
@@ -1700,7 +1700,7 @@ void lv_example_virtual3d_animated_emoji_popup(void)
17001700 //lv_virtual3d_set_param2(emoji_virtual3d, "setActionLoopByName", (uint32_t)"animate_chat_expression_fear_1");
17011701
17021702
1703- LOG_E ("LX_VGWIDGET_INS_EMOJI_ANIMATION popup created successfully" );
1703+ LOG_D ("LX_VGWIDGET_INS_EMOJI_ANIMATION popup created successfully" );
17041704}
17051705
17061706//RTT STRING
@@ -1718,37 +1718,37 @@ void lv_example_virtual3d_animated_emoji_popup(void)
17181718 switch (index )
17191719 {
17201720 case 0 : //neutral - 中性的/中立的
1721- LOG_E ("qday_show_emoji_by_rtt_info set => blink" );
1721+ LOG_D ("qday_show_emoji_by_rtt_info set => blink" );
17221722 lv_virtual3d_set_param2 (emoji_virtual3d , "setActionLoopByName" , (uint32_t )"blink" );
17231723 break ;
17241724
17251725 case 1 : //happy - 快乐的/高兴的
1726- LOG_E ("qday_show_emoji_by_rtt_info set => proud" );
1726+ LOG_D ("qday_show_emoji_by_rtt_info set => proud" );
17271727 lv_virtual3d_set_param2 (emoji_virtual3d , "setActionLoopByName" , (uint32_t )"proud" );
17281728 break ;
17291729 case 2 ://laughing - 大笑的
1730- LOG_E ("qday_show_emoji_by_rtt_info set => laugh" );
1730+ LOG_D ("qday_show_emoji_by_rtt_info set => laugh" );
17311731 lv_virtual3d_set_param2 (emoji_virtual3d , "setActionLoopByName" , (uint32_t )"laugh" );
17321732 break ;
17331733 case 3 : //funny - 有趣的/滑稽的
1734- LOG_E ("qday_show_emoji_by_rtt_info set => awkward" );
1734+ LOG_D ("qday_show_emoji_by_rtt_info set => awkward" );
17351735 lv_virtual3d_set_param2 (emoji_virtual3d , "setActionLoopByName" , (uint32_t )"awkward" );
17361736 break ;
17371737 case 4 : //sad - 悲伤的 :没有合适的 暂时用:shy
1738- LOG_E ("qday_show_emoji_by_rtt_info set => shy" );
1738+ LOG_D ("qday_show_emoji_by_rtt_info set => shy" );
17391739 lv_virtual3d_set_param2 (emoji_virtual3d , "setActionLoopByName" , (uint32_t )"shy" );
17401740 break ;
17411741 case 5 : //angry - 愤怒的
1742- LOG_E ("qday_show_emoji_by_rtt_info set => angry" );
1742+ LOG_D ("qday_show_emoji_by_rtt_info set => angry" );
17431743 lv_virtual3d_set_param2 (emoji_virtual3d , "setActionLoopByName" , (uint32_t )"angry" );
17441744 break ;
17451745
17461746 case 6 : //crying - 哭泣的
1747- LOG_E ("qday_show_emoji_by_rtt_info set => cry" );
1747+ LOG_D ("qday_show_emoji_by_rtt_info set => cry" );
17481748 lv_virtual3d_set_param2 (emoji_virtual3d , "setActionLoopByName" , (uint32_t )"cry" );
17491749 break ;
17501750 case 7 ://充满爱意
1751- LOG_E ("qday_show_emoji_by_rtt_info set => cry" );
1751+ LOG_D ("qday_show_emoji_by_rtt_info set => cry" );
17521752 lv_virtual3d_set_param2 (emoji_virtual3d , "setActionLoopByName" , (uint32_t )"cry" );
17531753 break ;
17541754 case 8 :
0 commit comments