xiugai
authorCCC <2393524978@qq.com>
Fri, 26 May 2023 09:17:09 +0000 (17:17 +0800)
committerCCC <2393524978@qq.com>
Fri, 26 May 2023 09:17:09 +0000 (17:17 +0800)
13 files changed:
2.sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_reset.c
2.sdk/gui/lv_watch/lv_apps/restart_and_reset/restart_and_reset.c
2.sdk/gui/lv_watch/lv_apps/shutdown/shutdown.c
2.sdk/gui/lv_watch/lv_apps/sos/sos.c
2.sdk/gui/lv_watch/lv_apps/wechat/wechat.h
2.sdk/gui/lv_watch/lv_apps/wechat/wechat_ui.c
2.sdk/gui/lv_watch/mmi_location/mmi_location.c
2.sdk/gui/lv_watch/mmi_location/mmi_location.h
2.sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.c
2.sdk/gui/lv_watch/mmi_sundry/mmi_sundry.c
2.sdk/gui/lv_watch/mmi_sundry/mmi_sundry.h
2.sdk/gui/lvgl/src/lv_core/lv_indev.c
2.sdk/product/craneg_modem/lv_gui_main.c

index 4d8ab08..823a480 100644 (file)
@@ -214,6 +214,11 @@ static void factoryreset_yes_btn_event_cb(lv_obj_t * btn, lv_event_t e)
 {
     if(LV_EVENT_CLICKED == e)
     {
+       #ifdef __MMI_ZHSX_SUPPORT__
+               mmi_protocol_action_unbind();
+               uos_sleep(10);
+       #endif
+       
         lv_obj_t * par = lv_obj_get_parent(btn);
         lv_obj_clean(par);
         lv_obj_t * label = lv_label_create(par, NULL);
@@ -253,16 +258,7 @@ void mmi_watch_reset(lv_obj_t * activity_obj)
 
        uos_sleep(10);
        
-       //app_adaptor_wake_up_short_time();
-    if(0 == Hal_Pm_Get_State()) 
-       {
-        Hal_Pm_WakeUp();
-    } 
-       else 
-       {
-        watch_set_lcd_status(true);
-        watch_wakeup_time_reset();
-    }
+    mmi_watch_wake_up();    
 
     if(NULL == activity_obj) 
        {
index aa46035..7e342ea 100644 (file)
@@ -103,11 +103,11 @@ lv_obj_t * restart_and_reset_create(lv_obj_t * activity_obj)
     lv_obj_set_width(label_reset, LV_HOR_RES * 2 / 3);
 
     if(lv_obj_get_base_dir(obj) == LV_BIDI_DIR_RTL){
-        lv_obj_align(btn_restart, obj, LV_ALIGN_CENTER, 20, -40); // -20);
-        lv_obj_align(btn_reset, btn_restart, LV_ALIGN_OUT_BOTTOM_RIGHT, 0, 30); // 10);
+        lv_obj_align(btn_restart, obj, LV_ALIGN_CENTER, 20, -50); // -20);
+        lv_obj_align(btn_reset, btn_restart, LV_ALIGN_OUT_BOTTOM_RIGHT, 0, 40); // 10);
     } else {
-        lv_obj_align(btn_restart, obj, LV_ALIGN_CENTER, -20, -40); // -20);
-        lv_obj_align(btn_reset, btn_restart, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 30); // 10);
+        lv_obj_align(btn_restart, obj, LV_ALIGN_CENTER, -20, -50); // -20);
+        lv_obj_align(btn_reset, btn_restart, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 40); // 10);
     }
 
     return obj;
@@ -355,16 +355,8 @@ void restart_no_btn_action(lv_obj_t * btn, lv_event_t event)
 #ifdef __MMI_ZHSX_SUPPORT__
 void mmi_watch_restart(void)
 {
-       //app_adaptor_wake_up_short_time();
-    if(0 == Hal_Pm_Get_State()) 
-       {
-        Hal_Pm_WakeUp();
-    } 
-       else 
-       {
-        watch_set_lcd_status(true);
-        watch_wakeup_time_reset();
-    }
+    mmi_watch_wake_up();    
+
        lv_watch_go_home();
 #if USE_LV_BLUETOOTH != 0
        bt_power_off();
index 38c7582..399ece4 100644 (file)
@@ -218,16 +218,7 @@ void mmi_watch_power_off(void)
 {
        printf("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
        
-       //app_adaptor_wake_up_short_time();
-    if(0 == Hal_Pm_Get_State()) 
-       {
-        Hal_Pm_WakeUp();
-    } 
-       else 
-       {
-        watch_set_lcd_status(true);
-        watch_wakeup_time_reset();
-    }
+    mmi_watch_wake_up();    
        shutdown_confirm_btn_action(NULL, LV_EVENT_CLICKED);
 }
 #endif
index e7f3590..f93cae4 100644 (file)
@@ -232,8 +232,6 @@ lv_obj_t * sos_create(lv_obj_t * activity_obj)
        s_sos_dial_index = 0;
     ext->gif_task_p = lv_task_create(sos_task, 100, LV_TASK_PRIO_MID, (void *)ext->gif_info);
 
-    app_adaptor_send_sos_info_req();
-
     return activity_obj;
 }
 
@@ -257,6 +255,8 @@ lv_res_t sos_btn_action(lv_obj_t * btn)
         lv_watch_go_home();
         lv_watch_png_cache_all_free();
 
+               mmi_protocol_action_sos();
+
         lv_obj_t * obj = sos_create(NULL);
         if(obj == NULL) 
                        return LV_RES_OK;
index 77a51a9..14a6682 100644 (file)
@@ -45,8 +45,8 @@ extern "C" {
 typedef enum
 {
        WECHAT_CREATED_FROM_APP,
-       WECHAT_CREATED_FROM_ALBUM,
-       WECHAT_CREATED_FROM_IMGVIEWER,
+       //WECHAT_CREATED_FROM_ALBUM,
+       //WECHAT_CREATED_FROM_IMGVIEWER,
        WECHAT_CREATED_FROM_MAX,
 }lv_wechat_created_from_e;
 
@@ -89,7 +89,7 @@ typedef struct
        lv_obj_t * cont;
        lv_obj_t * list; // chat list
        lv_obj_t * label_no_msg; // mo msg prompt
-       lv_obj_t * img_emo;
+       //lv_obj_t * img_emo;
        lv_obj_t * img_record; // record button
        lv_obj_t * delete_bg; // delete msg
        
index 1a2e60b..0ac3702 100644 (file)
@@ -238,6 +238,18 @@ bool wechat_msg_voice_is_recording(void)
        return result;
 }
 
+bool wechat_msg_item_is_sending(void)
+{
+       bool result = false;
+       
+       if(lv_watch_get_activity_obj(ACT_ID_WECHAT_SENDING)) 
+       {
+               result = true;
+       }
+
+       return result;
+}
+
 void wechat_receive_audio_play_audio_ctrl_callback(AUDIO_CTRL_PRIORITY priority)
 {
        WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: priority=%d\n", __FUNCTION__, __LINE__, priority);
@@ -250,6 +262,7 @@ void wechat_receive_audio_play_audio_ctrl_callback(AUDIO_CTRL_PRIORITY priority)
     {
                Hal_NFFS_File_Play_End();
                Hal_Audio_Manage_End_Ind(AUDIO_CTRL_PRIORITY_5);
+               Hal_Vibrator_Play_End();
     }
 }
 
@@ -259,6 +272,7 @@ void wechat_receive_audio_play_over_cb(void *para)
        
        Hal_NFFS_File_Play_End();
        Hal_Audio_Manage_End_Ind(AUDIO_CTRL_PRIORITY_5);
+       Hal_Vibrator_Play_End();
 }
 
 bool wechat_msg_receive_from_server(char * data_buff, int data_buff_len, nv_wechat_msg_type_e type)
@@ -323,14 +337,14 @@ bool wechat_msg_receive_from_server(char * data_buff, int data_buff_len, nv_wech
        if(false == mmi_active_screen_is_prohibit_interrupted() 
                && false == wechat_msg_voice_is_playing() 
                && false == wechat_msg_voice_is_recording()
+               && false == wechat_msg_item_is_sending()
                )
        {
-               //prompt 
-               app_adaptor_wake_up_short_time();
+               mmi_watch_wake_up();            
                
                if(AUDIO_CTRL_PRIORITY_5 == Hal_Audio_Manage_Start_Req(AUDIO_CTRL_PRIORITY_5, wechat_receive_audio_play_audio_ctrl_callback))
                {
-                       Hal_NFFS_File_Play_Onetime(AUDIO_WECHAT_RECEIVE, (HAL_SPEAKER_GAIN)query_current_volume(), wechat_receive_audio_play_over_cb, 0);
+                       Hal_NFFS_File_Play_Onetime(AUDIO_WECHAT_RECEIVE, (HAL_SPEAKER_GAIN)query_current_volume(), wechat_receive_audio_play_over_cb, NULL);
                }
        
                Hal_Vibrator_Play_Onetime(NULL, 1000);
@@ -339,6 +353,10 @@ bool wechat_msg_receive_from_server(char * data_buff, int data_buff_len, nv_wech
                {
                        wechat_main_screen_refresh();
                }
+               else
+               {
+                       wechat_create_event_cb(NULL, LV_EVENT_CLICKED);
+               }
        }
 
        return true;
@@ -699,27 +717,6 @@ void wechat_msg_recording_anim(lv_anim_t * a)
     }
 }
 
-void wechat_msg_same_priority_task_end(void)
-{
-#if 0
-    bool wakeup = false;
-
-    if(wakeup) 
-       {
-               if(0 == Hal_Pm_Get_State()) 
-               {
-                       Hal_Pm_WakeUp();
-                       watch_set_lcd_status(true);
-               } 
-               else 
-               {
-                       watch_set_lcd_status(true);
-                       watch_wakeup_time_reset();
-               }
-    }
-#endif
-}
-
 void wechat_msg_recording_audio_ctrl_callback(AUDIO_CTRL_PRIORITY priority)
 {
        WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: priority=%d\n", __FUNCTION__, __LINE__, priority);
@@ -1271,11 +1268,15 @@ lv_obj_t * wechat_chat_list_msg_item_add(lv_obj_t * list_page, nv_watch_wechat_m
        lv_wechat_msg_list_ext_t * list_page_ext = lv_obj_get_ext_attr(list_page);
        lv_obj_t * scrl = lv_page_get_scrl(list_page);
        lv_obj_t * last_obj = lv_obj_get_child(scrl, NULL);
-       lv_coord_t obj_h = lv_obj_get_style_pad_top(scrl, LV_STATE_DEFAULT);
+       lv_coord_t obj_y = 0;
        
        if(NULL != last_obj) 
        {
-               obj_h = lv_obj_get_y(last_obj) + lv_obj_get_height(last_obj) + lv_obj_get_style_pad_inner(scrl, LV_STATE_DEFAULT);
+               obj_y = lv_obj_get_y(last_obj) + lv_obj_get_height(last_obj) + lv_obj_get_style_pad_inner(scrl, LV_STATE_DEFAULT);
+       }
+       else
+       {
+               obj_y = lv_obj_get_style_pad_top(scrl, LV_STATE_DEFAULT);
        }
        
        if(0 != strlen(time_str))
@@ -1285,18 +1286,19 @@ lv_obj_t * wechat_chat_list_msg_item_add(lv_obj_t * list_page, nv_watch_wechat_m
                //lv_obj_set_base_dir(obj, LV_BIDI_DIR_LTR);
                lv_label_set_text(obj, time_str);
                lv_obj_add_style(obj, LV_LABEL_PART_MAIN, &list_page_ext->style_label_time);
-               lv_obj_align(obj, scrl, LV_ALIGN_IN_TOP_MID, 0, obj_h);
+               lv_obj_align(obj, scrl, LV_ALIGN_IN_TOP_MID, 0, obj_y);
 
                last_obj = obj;
-               obj_h = lv_obj_get_y(last_obj) + lv_obj_get_height(last_obj) + lv_obj_get_style_pad_inner(scrl, LV_STATE_DEFAULT);
+               obj_y = lv_obj_get_y(last_obj) + lv_obj_get_height(last_obj) + lv_obj_get_style_pad_inner(scrl, LV_STATE_DEFAULT);
        }
        
-       WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: msg_type=%d, file=%s, size=%d\n", __FUNCTION__, __LINE__, 
-                                       msg_item->msg_type, msg_item->msg_data_full_file_name, msg_item->msg_data_size);
+       WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: msg_type=%d,file=%s,size=%d,obj_y=%d\n", __FUNCTION__, __LINE__, 
+                                       msg_item->msg_type, msg_item->msg_data_full_file_name, msg_item->msg_data_size, obj_y);
        
        switch(msg_item->msg_type)
        {
                case WECHAT_MSG_TYPE_VOICE:
+                       lv_obj_t * unread_img = lv_img_create(list_page, NULL);
                        obj = lv_img_create(list_page, NULL);
                        lv_wechat_msg_list_item_ext_t * list_item_ext = lv_obj_allocate_ext_attr(obj, sizeof(lv_wechat_msg_list_item_ext_t));
                        list_item_ext->item_index = i;
@@ -1336,19 +1338,20 @@ lv_obj_t * wechat_chat_list_msg_item_add(lv_obj_t * list_page, nv_watch_wechat_m
                        {
                                lv_obj_add_style(len_label, LV_LABEL_PART_MAIN, &list_page_ext->style_label_len_ui);
                                lv_img_set_src(obj, ICON_WECHAT_MY_VOICE_ITEM_BG);
-                               lv_obj_align(obj, scrl, LV_ALIGN_IN_TOP_RIGHT, -10, obj_h);
+                               lv_obj_align(obj, scrl, LV_ALIGN_IN_TOP_RIGHT, -10, obj_y);
                                if(0 < duration) 
                                {
                                        lv_img_set_src(play_img, ICON_WECHAT_MY_VOICE_ITEM_PLAYING3);
                                }
                                lv_obj_align(play_img, obj, LV_ALIGN_IN_LEFT_MID, 15, 0);
                                lv_obj_align(len_label, play_img, LV_ALIGN_OUT_RIGHT_MID, 25, 0);
+                               lv_obj_del(unread_img);
                        }
                        else // msg from other
                        {
                                lv_obj_add_style(len_label, LV_LABEL_PART_MAIN, &list_page_ext->style_label_len_other);
                                lv_img_set_src(obj, ICON_WECHAT_OTHER_VOICE_ITEM_BG);
-                               lv_obj_align(obj, scrl, LV_ALIGN_IN_TOP_LEFT, 10, obj_h);
+                               lv_obj_align(obj, scrl, LV_ALIGN_IN_TOP_LEFT, 10, obj_y);
                                if(0 < duration) 
                                {
                                        lv_img_set_src(play_img, ICON_WECHAT_OTHER_VOICE_ITEM_PLAYING3);
@@ -1357,9 +1360,13 @@ lv_obj_t * wechat_chat_list_msg_item_add(lv_obj_t * list_page, nv_watch_wechat_m
                                lv_obj_align(len_label, play_img, LV_ALIGN_OUT_LEFT_MID, -25, 0);
                                if(1 == msg_item->unread_flag) 
                                {
-                                       list_item_ext->unread_img = lv_img_create(list_page, NULL);
-                                       lv_img_set_src(list_item_ext->unread_img, ICON_WECHAT_UNREAD_FLAG);
-                                       lv_obj_align(list_item_ext->unread_img, obj, LV_ALIGN_OUT_RIGHT_MID, 5, 0);
+                                       lv_img_set_src(unread_img, ICON_WECHAT_UNREAD_FLAG);
+                                       lv_obj_align(unread_img, obj, LV_ALIGN_OUT_RIGHT_MID, 5, 0);
+                                       list_item_ext->unread_img = unread_img;
+                               }
+                               else
+                               {
+                                       lv_obj_del(unread_img);
                                }
                        }
                        
index 68a38c9..e191bfd 100644 (file)
@@ -108,8 +108,9 @@ void mmi_watch_location_mission_list_data_send(void)
                                mmi_protocol_action_send_get_weather(&s_watch_location_data);
                                break;
                                
-                       case MMI_WATCH_LOCATION_ALERT:
-
+                       case MMI_WATCH_LOCATION_WARNING:
+                               LOCATION_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
+                               mmi_protocol_action_send_warning_info(&s_watch_location_data);
                                break;
                                
                        default:
@@ -383,28 +384,38 @@ void mmi_watch_location_mission_start(void)
        }
 }
 
-void mmi_watch_location_mission_timed_location_action(void)
+static void mmi_watch_location_mission_action(MMI_WATCH_LOCATION_TYPE_E location_type)
 {
-       LOCATION_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
-       
-       mmi_watch_location_mission_list_node_add(MMI_WATCH_LOCATION_UD);
+       LOCATION_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: type=%d\n", __FUNCTION__, __LINE__, location_type);
+
+       if(MMI_WATCH_LOCATION_NONE >= location_type || MMI_WATCH_LOCATION_MAX <= location_type)
+       {
+               LOCATION_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
+               return;
+       }
+
+       mmi_watch_location_mission_list_node_add(location_type);
        mmi_watch_location_mission_start();
 }
 
+void mmi_watch_location_mission_timed_location_action(void)
+{
+       mmi_watch_location_mission_action(MMI_WATCH_LOCATION_UD);
+}
+
 void mmi_watch_location_mission_current_location_action(void)
 {
-       LOCATION_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
-       
-       mmi_watch_location_mission_list_node_add(MMI_WATCH_LOCATION_CRUD);
-       mmi_watch_location_mission_start();
+       mmi_watch_location_mission_action(MMI_WATCH_LOCATION_CRUD);
 }
 
 void mmi_watch_location_mission_get_weather_action(void)
 {
-       LOCATION_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
-       
-       mmi_watch_location_mission_list_node_add(MMI_WATCH_LOCATION_WT);
-       mmi_watch_location_mission_start();
+       mmi_watch_location_mission_action(MMI_WATCH_LOCATION_WT);
+}
+
+void mmi_watch_location_mission_warning_action(void)
+{
+       mmi_watch_location_mission_action(MMI_WATCH_LOCATION_WARNING);
 }
 
 #endif
index 7a8e0d5..588d4c9 100644 (file)
@@ -99,7 +99,8 @@ typedef enum
        MMI_WATCH_LOCATION_UD, // ud
        MMI_WATCH_LOCATION_CRUD, // crud
        MMI_WATCH_LOCATION_WT, //weather
-       MMI_WATCH_LOCATION_ALERT, // alert
+       MMI_WATCH_LOCATION_WARNING, // warning
+
        MMI_WATCH_LOCATION_MAX,
 }MMI_WATCH_LOCATION_TYPE_E;
 
@@ -109,7 +110,7 @@ void mmi_watch_location_mission_list_init(void);
 void mmi_watch_location_mission_timed_location_action(void);
 void mmi_watch_location_mission_current_location_action(void);
 void mmi_watch_location_mission_get_weather_action(void);
-
+void mmi_watch_location_mission_warning_action(void);
 
 
 
index a833199..113fd60 100644 (file)
@@ -1441,6 +1441,7 @@ bool mmi_protocol_fzd_parse_ACTION_TALK_MESSAGE(unsigned char * next_buff, unsig
        bool result = false;
        MMI_PROTOCOL_FZD_ACTION_ENUM action = MMI_FZD_ACTION_TALK_MESSAGE;
 
+/*
        if(NULL == next_buff || 0 == next_buff_len)
        {
                PROTOCOL_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
@@ -1454,6 +1455,7 @@ bool mmi_protocol_fzd_parse_ACTION_TALK_MESSAGE(unsigned char * next_buff, unsig
        
        mmi_unicode_hex_str_to_utf8_str(next_buff, next_buff_len, t_buff, &t_len);
        result = wechat_msg_receive_from_server(t_buff, t_len, WECHAT_MSG_TYPE_TEXT);
+*/
        
        return result;
 }
index b6e9b6c..0b3b9f3 100644 (file)
@@ -18,17 +18,30 @@ bool mmi_active_screen_is_prohibit_interrupted(void)
                return true;
        }
 
+    if(NULL != lv_watch_get_activity_obj(ACT_ID_SHUTDOWN))
+       {
+               return true;
+       }
+
+       if(NULL != lv_watch_get_activity_obj(ACT_ID_RESTART))
+       {
+               return true;
+       }
+
+       if(NULL != lv_watch_get_activity_obj(ACT_ID_ALARM))
+       {
+               return true;
+       }
+
 #if USE_LV_WATCH_SOS != 0
-       obj = lv_watch_get_activity_obj(ACT_ID_SOS);
-    if(NULL != obj)
+       if(NULL != lv_watch_get_activity_obj(ACT_ID_SOS))
        {
                return true;
        }
 #endif
        
 #if USE_LV_WATCH_UPGRADE != 0
-       obj = lv_watch_get_activity_obj(ACT_ID_UPGRADE);
-    if(NULL != obj)
+    if(NULL != lv_watch_get_activity_obj(ACT_ID_UPGRADE))
        {
                return true;
        }
@@ -37,6 +50,14 @@ bool mmi_active_screen_is_prohibit_interrupted(void)
        return false;
 }
 
+void mmi_watch_wake_up(void)
+{
+    if(0 == Hal_Pm_Get_State()) {
+        Hal_Pm_WakeUp();
+    } else {
+        watch_wakeup_lcd(false);
+    }
+}
 
 
 static TIMER_ID s_watch_search_timer_id = NULL;
@@ -102,7 +123,7 @@ void mmi_watch_search_screen_event_cb(lv_obj_t * obj, lv_event_t e)
 {
        SUNDRY_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: event=%d\n", __FUNCTION__, __LINE__, e);
        
-    if(LV_EVENT_PRESSED == e || LV_EVENT_CLICKED == e) 
+    if(LV_EVENT_CLICKED == e)
        {
                mmi_watch_search_screen_destroy(); // lv_watch_del_interface(ACT_ID_WATCH_SEARCHING);
     }
@@ -117,6 +138,7 @@ lv_obj_t * mmi_watch_server_search_screen_create(lv_obj_t * activity_obj)
                return NULL;
        }
        
+       lv_watch_png_cache_all_free();
     if(NULL == activity_obj) 
        {
         lv_watch_activity_ext_t activity_ext = {0};
@@ -156,17 +178,7 @@ lv_obj_t * mmi_watch_server_search_screen_create(lv_obj_t * activity_obj)
        
        mmi_watch_search_timer_start();
 
-       //watch_wakeup_lcd(true);
-    if(0 == Hal_Pm_Get_State()) 
-       {
-        Hal_Pm_WakeUp();
-        watch_set_lcd_status(true);
-    } 
-       else 
-       {
-        watch_set_lcd_status(true);
-        watch_wakeup_time_reset();
-    }
+    mmi_watch_wake_up();
        watch_set_suspend_enable(false, ACT_ID_WATCH_SEARCHING, 0);
        
        return obj;
index a8f9a64..4567a80 100644 (file)
@@ -29,6 +29,7 @@ extern "C"
 
 bool mmi_active_screen_is_prohibit_interrupted(void);
 
+void mmi_watch_wake_up(void);
 
 
 #define MMI_WATCH_SEARCH_DURATION      (1000 * 60) // ms
index 4583978..f60e644 100644 (file)
@@ -440,6 +440,8 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data)
  */
 static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
 {
+       printf("[@CHENG_DEBUG][%s][%d]: key=%d\n", __FUNCTION__, __LINE__, data->key);
+       
 #if LV_USE_GROUP
     if(data->state == LV_INDEV_STATE_PR && i->proc.wait_until_release) return;
 
index f94752f..0cd2fb9 100644 (file)
@@ -945,6 +945,8 @@ static void keypad_watch_cb(struct keypad_param *arg)
             lv_watch_go_back();
         }
     }
+
+       printf("[@CHENG_DEBUG][%s][%d]: key=%d,event=%d\n", __FUNCTION__, __LINE__, arg->data.key, arg->key_event);
 }
 
 lv_indev_t *keypad_dev;