From 93ce51c6c389841b7133b287eadb5be41274a155 Mon Sep 17 00:00:00 2001 From: xiaojiazhu Date: Thu, 7 Dec 2023 17:08:10 +0800 Subject: [PATCH] Fixed bug about sending show. --- .../UIFlowLVGL/UIFlowMovie/UIFlowMovieEventCallback.c | 2 +- .../UIFlowLVGL/UIFlowPhoto/UIFlowPhotoEventCallback.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMovie/UIFlowMovieEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMovie/UIFlowMovieEventCallback.c index 380c689db..b86e78514 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMovie/UIFlowMovieEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMovie/UIFlowMovieEventCallback.c @@ -397,7 +397,7 @@ static void update_rec_time(void) lv_obj_set_hidden(label_maxtime_scr_uiflowmovie,true); } - lv_label_set_text_fmt(label_rec_time_scr_uiflowmovie, "%02d:%02d:%02d", rec_sec / 3600, (rec_sec % 3600) / 60, (rec_sec % 3600) % 60); + lv_label_set_text_fmt(label_rec_time_scr_uiflowmovie, "%02d:%02d:%02d", rec_sec / 3600, (rec_sec % 3600) / 60, (rec_sec % 3600) % 60 + 1); } static void update_wifi(void) diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoEventCallback.c index 8f55d3f48..e510b7058 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoEventCallback.c @@ -59,6 +59,7 @@ static void task_update_icons_timer_cb(lv_task_t* task); #define LONG_PRESS_INTERVAL 500 static unsigned long KeyLeftPressingTimeMs = 0; static unsigned long KeyDownPressingTimeMs = 0; +static int gSendingStatus = FILE_SENDING_GUI_END; #define SENDING_KEEP_SHOW -1 #define SENDING_NOT_SHOW 0 @@ -607,6 +608,10 @@ static void update_4g_module_icon(void) lv_obj_set_hidden(label_sim_scr_uiflowphoto, true); } } + // if(sf_cardv_4G_status_get() == SF_4G_SENDING) + // { + + // } const int EMPTY_IMAGE = 0; lv_plugin_res_id res[] = { EMPTY_IMAGE, @@ -1699,6 +1704,7 @@ void UIFlowPhoto_UpdateInfo(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* msg) static void sf_show_send_text(lv_obj_t* obj, const unsigned short status) { #define SENDING_KEEP_SHOW_TIME_S 3 + gSendingStatus = FILE_SENDING_GUI_END; switch (status) { case FILE_SENDING_GUI_START_SENDING: @@ -1706,6 +1712,7 @@ static void sf_show_send_text(lv_obj_t* obj, const unsigned short status) lv_obj_set_hidden(label_sim_scr_uiflowphoto, false); lv_label_set_text(label_sim_scr_uiflowphoto, "Sending ... "); SendMsgShow = SENDING_KEEP_SHOW; + gSendingStatus = FILE_SENDING_GUI_START_SENDING; break; } case FILE_SENDING_GUI_STOP_SENDING: @@ -2028,7 +2035,7 @@ void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event) case LV_EVENT_KEY: { - if (PHOTO_ST_CAPTURE == gPhotoData.State) + if (PHOTO_ST_CAPTURE == gPhotoData.State || FILE_SENDING_GUI_START_SENDING == gSendingStatus) { printf("PHOTO_ST_CAPTURE not handl key event.\n"); break; @@ -2041,7 +2048,7 @@ void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event) } case LV_USER_EVENT_KEY_RELEASE: { - if (PHOTO_ST_CAPTURE == gPhotoData.State) + if (PHOTO_ST_CAPTURE == gPhotoData.State || FILE_SENDING_GUI_START_SENDING == gSendingStatus) { printf("PHOTO_ST_CAPTURE not handl key event.\n"); break;