diff --git a/code/application/source/cardv/SrcCode/System/SysMain_Exe.c b/code/application/source/cardv/SrcCode/System/SysMain_Exe.c index e52e84f72..a13a8cc02 100755 --- a/code/application/source/cardv/SrcCode/System/SysMain_Exe.c +++ b/code/application/source/cardv/SrcCode/System/SysMain_Exe.c @@ -422,6 +422,7 @@ BOOL System_GetShutdownBegin(void) INT32 System_OnShutdown(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { UINT32 displayShow = SHOW_POWER_OFF; + BOOL isMenu = sf_is_menu_open(); if ( paramNum >= 2) { DBG_DUMP("^MOn Shutdown begin paramNum:%d paramArray[0]:%d paramArray[1]:%d\r\n",paramNum, paramArray[0], paramArray[1]); @@ -479,11 +480,24 @@ INT32 System_OnShutdown(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) if(sf_get_mode_flag() && SHOW_POWER_OFF == displayShow) #endif { - GxDisplay_Set(LAYER_OSD1, LAYER_STATE_ENABLE, 0); //turn off OSD1 - GxDisplay_Flush(LAYER_OSD1); - - Display_ShowSplash(SPLASH_POWEROFF); - SwTimer_DelayMs(500); + if (FALSE == isMenu) + { + GxDisplay_Set(LAYER_OSD1, LAYER_STATE_ENABLE, 0); //turn off OSD1 + GxDisplay_Flush(LAYER_OSD1); + Display_ShowSplash(SPLASH_POWEROFF); + SwTimer_DelayMs(500); + } + else + { + Display_ShowSplash(SPLASH_POWEROFF); + SwTimer_DelayMs(500); + GxDisplay_Set(LAYER_OSD1, LAYER_STATE_ENABLE, 0); //turn off OSD1 + GxDisplay_Flush(LAYER_OSD1); + } + // Display_ShowSplash(SPLASH_POWEROFF); + // SwTimer_DelayMs(500); + // GxDisplay_Set(LAYER_OSD1, LAYER_STATE_ENABLE, 0); //turn off OSD1 + // GxDisplay_Flush(LAYER_OSD1); } #endif } 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 12877c431..f72e1e722 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 @@ -642,6 +642,14 @@ static void update_gps_status(void) sf_show_send_text(UIFlowPhoto, FILE_SENDING_GUI_START_SENDING); return; } + if (FTP_CONNECTING_FTP_CONNECTING == sf_cardv_get_ftp_status()) + { + sf_show_send_text(UIFlowPhoto, FTP_CONNECTING_FTP_CONNECTING); + return; + } + else if (FTP_CONNECTING_END != sf_cardv_get_ftp_status()) { + sf_show_send_text(UIFlowPhoto, sf_cardv_get_ftp_status()); + } SF_GPS_STATUS_E status = sf_cardv_get_gps_status(); switch (status) { @@ -1375,6 +1383,8 @@ void UIFlowPhoto_OnBatteryLow(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* ms static void UIFlowPhoto_ScrOpen(lv_obj_t* obj) { + lv_obj_set_hidden(container_photo_scr_uiflowphoto, false); + lv_obj_set_hidden(label_line_scr_uiflowphoto, false); set_indev_keypad_group(obj); update_fd_frame(); //#NT#2016/10/04#Lincy Lin -begin @@ -1390,7 +1400,7 @@ static void UIFlowPhoto_ScrOpen(lv_obj_t* obj) /* never closed */ gPhotoData.State = PHOTO_ST_WARNING_MENU; - UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRID_PLEASE_INSERT_SD, 1000); + // UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRID_PLEASE_INSERT_SD, 1000); // UIFlowMenuCommonConfirmAPI_Open(IDM_FORMAT); // return; #endif @@ -1481,6 +1491,8 @@ static void UIFlowPhoto_ScrClose(lv_obj_t* obj) /* Reset key press/release/continue mask to default */ Ux_FlushEventByRange(NVTEVT_KEY_EVT_START, NVTEVT_KEY_EVT_END); + lv_obj_set_hidden(container_photo_scr_uiflowphoto, true); + lv_obj_set_hidden(label_line_scr_uiflowphoto, true); return; } @@ -1764,6 +1776,19 @@ static void sf_show_send_text(lv_obj_t* obj, const unsigned short status) SendMsgShow = SENDING_KEEP_SHOW_TIME_S; break; } + case FTP_CONNECTING_FTP_CONNECTING: + { + lv_obj_set_hidden(label_sim_scr_uiflowphoto, false); + lv_label_set_text(label_sim_scr_uiflowphoto, "Connecting ... "); + SendMsgShow = SENDING_KEEP_SHOW; + break; + } + case FTP_CONNECTING_FTP_CONNECT_SUCCESSFUL: + case FTP_CONNECTING_FTP_CONNECT_FAILED: + { + SendMsgShow = SENDING_NOT_SHOW; + break; + } default: break; } diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c index c9dc59fba..d1b0a01c1 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c @@ -110,12 +110,17 @@ static void UIFlowPlay_IconImageSize(BOOL bShow) } else { OriImgHeight = (UINT32)hd_vdoframe_info.dim.h; } + if (uiFileFmt & (PBFMT_MOVMJPG | PBFMT_AVI | PBFMT_MP4 | PBFMT_TS)) { + lv_obj_set_hidden(container_play_scr_uiflowplay, false); + } else { + lv_obj_set_hidden(container_play_scr_uiflowplay, true); + } //hide icon if (bShow == FALSE) { // UxCtrl_SetShow(&UIFlowWndPlay_StaticTXT_SizeCtrl, FALSE); lv_obj_set_hidden(label_file_size_scr_uiflowplay, true); - lv_obj_set_hidden(container_play_scr_uiflowplay, true); + // lv_obj_set_hidden(container_play_scr_uiflowplay, true); return; } //show icon @@ -988,6 +993,7 @@ static void UIFlowPlay_ScrOpen(lv_obj_t* obj) update_playicons(g_PlbData.State); // Ux_SendEvent(0, NVTEVT_SYSTEM_MODE, 1, PRIMARY_MODE_PHOTO); UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRING_NO_FILE, 3000); + lv_obj_set_hidden(container_play_scr_uiflowplay, true); return; } @@ -2017,16 +2023,26 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key) break; } case LV_USER_KEY_LEFT: + { + UINT32 uiFileSeq; + PB_GetParam(PBPRMID_CURR_FILESEQ, &uiFileSeq); + if (0 != uiFileSeq) { stop_play(); UIFlowPlay_OnKeyUp(obj); - break; + } + break; } case LV_USER_KEY_RIGHT: + { + UINT32 uiFileSeq; + PB_GetParam(PBPRMID_CURR_FILESEQ, &uiFileSeq); + if (0 != uiFileSeq) { stop_play(); UIFlowPlay_OnKeyDown(obj); - break; + } + break; } case LV_USER_KEY_UP: @@ -2039,13 +2055,18 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key) case LV_USER_KEY_DOWN: case LV_USER_KEY_NEXT: { + UINT32 uiFileSeq; + PB_GetParam(PBPRMID_CURR_FILESEQ, &uiFileSeq); + if (0 != uiFileSeq) + { stop_play(); UIFlowMenuCommonConfirmAPI_Open(IDM_DELETE_THIS); break; UIFlowPlay_OnKeyNext(obj); break; } - + break; + } case LV_USER_KEY_ZOOMIN: { break; diff --git a/code/application/source/sf_app/code/include/sf_commu_mcu_reg.h b/code/application/source/sf_app/code/include/sf_commu_mcu_reg.h index 168b4f990..315c88769 100755 --- a/code/application/source/sf_app/code/include/sf_commu_mcu_reg.h +++ b/code/application/source/sf_app/code/include/sf_commu_mcu_reg.h @@ -357,11 +357,15 @@ void sf_set_module_sleep_flag(UINT8 flag); UINT8 sf_get_module_sleep_flag(void); int sf_app_while_flag(void); void sf_set_sim_insert(INT32 sim); - #define GPS_SEARCHING_START 0 - #define GPS_SEARCHING_STOP 1 - #define GPS_SEARCHING_SUCCESSFUL 2 - #define GPS_SEARCHING_FAILED 3 +#define GPS_SEARCHING_START 0 +#define GPS_SEARCHING_STOP 1 +#define GPS_SEARCHING_SUCCESSFUL 2 +#define GPS_SEARCHING_FAILED 3 void sf_set_gps_status(const short status); +#define FTP_CONNECTING 4 +#define FTP_CONNECT_SUCCESSFUL 5 +#define FTP_CONNECT_FAILED 6 +void sf_set_ftp_status(const short status); void sf_set_usb_init(int flag); UINT32 sf_get_sim_insert(void); int sf_get_signal_ready(void); diff --git a/code/application/source/sf_app/code/include/sf_param_enum.h b/code/application/source/sf_app/code/include/sf_param_enum.h index 17ca545c8..516c77a2b 100755 --- a/code/application/source/sf_app/code/include/sf_param_enum.h +++ b/code/application/source/sf_app/code/include/sf_param_enum.h @@ -488,6 +488,7 @@ typedef enum sf_PARA_MESSAGE_TYPE_E SF_PARA_CMD_ISESIM = 0x1F07, SF_PARA_CMD_USB_INIT = 0x1F08, SF_PARA_CMD_GPS_STATUS = 0X1F09, + SF_PARA_CMD_FTP_CONNECT_STATUS= 0X1F0A, }SF_PARA_MESSAGE_TYPE_E; typedef enum sf_WIFI_MESSAGE_TYPE_E diff --git a/code/application/source/sf_app/code/source/4gMng/sf_ftp.c b/code/application/source/sf_app/code/source/4gMng/sf_ftp.c index e2b2a439f..066aa20dd 100755 --- a/code/application/source/sf_app/code/source/4gMng/sf_ftp.c +++ b/code/application/source/sf_app/code/source/4gMng/sf_ftp.c @@ -1422,6 +1422,7 @@ SINT32 sf_4g_module_ota_ftp(void) *************************************************/ SINT32 sf_connect_ftps_server(void) { + sf_set_ftp_status(FTP_CONNECTING); SINT32 ret = SF_SUCCESS;//0:success; else:fail; UINT8 ssl = 0; UINT8 gprsMode = 0; @@ -1448,8 +1449,13 @@ SINT32 sf_connect_ftps_server(void) if(FTP_MANAGER_SERVICE_AVAILABLE == result) { FtpOpenOk = SUCCESS; + sf_set_ftp_status(FTP_CONNECT_SUCCESSFUL); } - //ret = sf_ftp_stop(ssl, gprsMode); + else + { + sf_set_ftp_status(FTP_CONNECT_FAILED); + } + ret = sf_ftp_stop(ssl, gprsMode); //SF_FTP_CONNECT_END: //printf("[%s:%d]ret:[0x%08X]\n\n", __FUNCTION__, __LINE__, ret); diff --git a/code/application/source/sf_app/code/source/systemMng/sf_commu_mcu_reg.c b/code/application/source/sf_app/code/source/systemMng/sf_commu_mcu_reg.c index 2a37a9032..128eb6cd4 100755 --- a/code/application/source/sf_app/code/source/systemMng/sf_commu_mcu_reg.c +++ b/code/application/source/sf_app/code/source/systemMng/sf_commu_mcu_reg.c @@ -1261,6 +1261,14 @@ void sf_set_gps_status(const short status) sf_com_message_send_to_cardv(&stMessageBuf); } } +void sf_set_ftp_status(const short status) +{ + SF_MESSAGE_BUF_S stMessageBuf = {0}; + stMessageBuf.arg2 = status; + stMessageBuf.arg1 = SF_PARA_CMD_FTP_CONNECT_STATUS; + stMessageBuf.cmdId = CMD_PARA; + sf_com_message_send_to_cardv(&stMessageBuf); +} void sf_set_usb_init(int flag) { SF_MESSAGE_BUF_S stMessageBuf = {0}; diff --git a/code/lib/source/sifar/code/include/sf_common.h b/code/lib/source/sifar/code/include/sf_common.h index 47409f9ca..4694c25be 100755 --- a/code/lib/source/sifar/code/include/sf_common.h +++ b/code/lib/source/sifar/code/include/sf_common.h @@ -40,6 +40,12 @@ typedef enum{ FILE_SENDING_GUI_SEND_FAILED, FILE_SENDING_GUI_END } FILE_SENDING_GUI_E; +typedef enum{ + FTP_CONNECTING_FTP_CONNECTING = FILE_SENDING_GUI_END, + FTP_CONNECTING_FTP_CONNECT_SUCCESSFUL, + FTP_CONNECTING_FTP_CONNECT_FAILED, + FTP_CONNECTING_END +} FTP_CONNECTING_E; #define DEFAULT_GO_TO_WORK_MODE_TIME_S 85 #define PASSWORD_SCREEN_GO_TO_WORK_MODE_TIME_S 61 #define MENU_SCREEN_GO_TO_WORK_MODE_TIME_S 60 @@ -126,6 +132,8 @@ BOOL sf_is_preview(void); short sf_cardv_get_cq_signal(void); void sf_cardv_set_gps_status(const SF_GPS_STATUS_E status); const SF_GPS_STATUS_E sf_cardv_get_gps_status(void); +void sf_cardv_set_ftp_status(const FTP_CONNECTING_E status); +const FTP_CONNECTING_E sf_cardv_get_ftp_status(void); void sf_cardv_4G_status_set(UINT8 status); UINT8 sf_cardv_4G_status_get(void); void sf_cardv_set_sim_insert(INT8 sim); diff --git a/code/lib/source/sifar/code/source/common/sf_common.c b/code/lib/source/sifar/code/source/common/sf_common.c index 8cce8ce65..74a8cd2c6 100755 --- a/code/lib/source/sifar/code/source/common/sf_common.c +++ b/code/lib/source/sifar/code/source/common/sf_common.c @@ -100,6 +100,7 @@ static UINT8 UiparaFlag = 0; static SF_BLE_STATUS_E BleStatus = SF_BLE_OK; static UINT8 McuUpdateFlag = 0; static SF_GPS_STATUS_E gGpsSearching = SF_GPS_SEARCHING_UNKNOW; +static FTP_CONNECTING_E gFtpConnectingStatus = FTP_CONNECTING_END; static char CamMode = 0; static CHAR netGeneration = SF_NET_NO; static SF_THREAD_S UpgradeTskParam = @@ -1542,6 +1543,15 @@ const SF_GPS_STATUS_E sf_cardv_get_gps_status(void) { return gGpsSearching; } +void sf_cardv_set_ftp_status(const FTP_CONNECTING_E status) +{ + printf("sf_cardv_set_ftp_status = %d\n", status); + gFtpConnectingStatus = status; +} +const FTP_CONNECTING_E sf_cardv_get_ftp_status(void) +{ + return gFtpConnectingStatus; +} /************************************************* Function: sf_cardv_adc_value_get @@ -1784,6 +1794,9 @@ static SINT32 sf_cardv_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf) break; case SF_PARA_CMD_GPS_STATUS: sf_cardv_set_gps_status(pMessageBuf->arg2); + break; + case SF_PARA_CMD_FTP_CONNECT_STATUS: + sf_cardv_set_ftp_status(pMessageBuf->arg2); break; default: break; @@ -2005,7 +2018,6 @@ void sf_cardv_message_thread_init(void) void sf_set_menu_open(BOOL is) { IsMenu = is; - //printf("[%s]:%d IsMenu:%d\n", __FUNCTION__, __LINE__, IsMenu); } BOOL sf_is_menu_open(void)