Merge branch 'branch_s550_gui' into branch_s550_fast

This commit is contained in:
xiaojiazhu 2023-11-10 19:07:42 +08:00
commit de5a8e8e3c
11 changed files with 145 additions and 12 deletions

@ -1 +1 @@
Subproject commit d1b456a005d163d4716388c97d54a79fbe251e1c
Subproject commit 8e5bc42200744278717e429ce6c35bb951939535

View File

@ -270,11 +270,19 @@ typedef enum {
/* INSERT NEW EVENT HRER */
//Event post from WifTask CB
UIAPPPHOTO_CB_UCTRL_UPDATE_UI = 0x14002f40,
NVT_SIFAR_MSG_SCREEN,
/* INSERT NEW EVENT HRER */
NVTEVT_PHOTO_EVT_END = APPUSER_PHOTO_BASE + 0x1000 - 1, ///< Max value = 0x14002fff
}
CUSTOM_PHOTO_EVENT;
// typedef enum {
// NVT_SIFAR_START = NVTEVT_PHOTO_EVT_END,
// NVT_SIFAR_MSG_SCREEN,
// NVT_SIFAR_END
// } NVT_SIFAR_EVENT;
#define UIAPPPHOTO_CB_MAX UIAPPPHOTO_CB_NULL
#if(PHOTO_MODE==ENABLE)

View File

@ -911,7 +911,10 @@ static void update_Camera_Info_msg(lv_obj_t* obj)
strcat(CamInfoStr, tmpStr);
}
else if(!CameraInfoisHidden)
strcat(CamInfoStr, SF_BASE_VERSION);
{
sprintf(tmpStr, "%s\n",SF_BASE_VERSION);
strcat(CamInfoStr, tmpStr);
}
else
strcat(CamInfoStr, "\n");
break;

View File

@ -585,7 +585,10 @@ static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu)
lv_plugin_img_set_src(image_option_1_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT1);
}
//#NT#2023/11/03#Eric - end
lv_plugin_label_set_text(label_option_1_scr_uiflowmenucommonitem, pOption->TextId);
if(pItem->ItemId == IDM_NETWORK_SELECTION)
lv_plugin_label_set_text(label_option_1_scr_uiflowmenucommonitem, IDS_END);
else
lv_plugin_label_set_text(label_option_1_scr_uiflowmenucommonitem, pOption->TextId);
lv_plugin_label_update_font(label_option_1_scr_uiflowmenucommonitem, LV_OBJ_PART_MAIN);
lv_obj_set_hidden(container_option_1_scr_uiflowmenucommonitem, false);
}else if(i == 1){

View File

@ -55,6 +55,10 @@ static void task_update_icons_timer_cb(lv_task_t* task);
static unsigned long KeyLeftPressingTimeMs = 0;
static unsigned long KeyDownPressingTimeMs = 0;
#define SENDING_KEEP_SHOW -1
#define SENDING_NOT_SHOW 0
static int SendMsgShow = SENDING_NOT_SHOW;
static BOOL g_PhotoBgInitFileSys = FALSE;
@ -388,7 +392,15 @@ static void update_4g_module_icon(void)
{
// Nothing changed.
// printf(" nothing changed.\n");
}
}
if (SENDING_NOT_SHOW < SendMsgShow)
{
SendMsgShow--;
if (SENDING_NOT_SHOW == SendMsgShow)
{
lv_obj_set_hidden(label_sim_scr_uiflowphoto, true);
}
}
const int EMPTY_IMAGE = 0;
lv_plugin_res_id res[] = {
EMPTY_IMAGE,
@ -1430,7 +1442,42 @@ void UIFlowPhoto_UpdateInfo(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* msg)
return ;
}
static void sf_show_send_text(lv_obj_t* obj, const unsigned short status)
{
#define SENDING_KEEP_SHOW_TIME_S 3
switch (status)
{
case FILE_SENDING_GUI_START_SENDING:
{
lv_obj_set_hidden(label_sim_scr_uiflowphoto, false);
lv_label_set_text(label_sim_scr_uiflowphoto, "Sending ... ");
SendMsgShow = SENDING_KEEP_SHOW;
break;
}
case FILE_SENDING_GUI_STOP_SENDING:
{
lv_obj_set_hidden(label_sim_scr_uiflowphoto, true);
SendMsgShow = SENDING_NOT_SHOW;
break;
}
case FILE_SENDING_GUI_SEND_SUCCEED:
{
lv_obj_set_hidden(label_sim_scr_uiflowphoto, false);
lv_label_set_text(label_sim_scr_uiflowphoto, "Success");
SendMsgShow = SENDING_KEEP_SHOW_TIME_S;
break;
}
case FILE_SENDING_GUI_SEND_FAILED:
{
lv_obj_set_hidden(label_sim_scr_uiflowphoto, false);
lv_label_set_text(label_sim_scr_uiflowphoto, "Fail");
SendMsgShow = SENDING_KEEP_SHOW_TIME_S;
break;
}
default:
break;
}
}
static void UIFlowPhoto_NVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* msg)
{
@ -1480,6 +1527,11 @@ static void UIFlowPhoto_NVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* m
break;
}
}
case NVT_SIFAR_MSG_SCREEN:
{
sf_show_send_text(obj, msg->paramArray[0]);
break;
}
default:
break;

View File

@ -1450,6 +1450,33 @@ static void UIFlowPlay_OnKeySelect(lv_obj_t* obj)
static void UIFlowPlay_Exit(lv_obj_t* obj)
{
// Ux_SendEvent(&UISetupObjCtrl, NVTEVT_PREVIEWMODE, 0);
if(PLB_ST_PLAY_MOV == g_PlbData.State)
{
printf("now stop play the video.\n");
g_PlbData.State = PLB_ST_FULL;
lv_plugin_img_set_src(image_play_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_STOP);
lv_label_set_text_fmt(label_playtime_scr_uiflowplay, "%02d:%02d", 0, 0);
g_PlbData.VideoPBSpeed = PLB_FWD_MOV_1x;
// Close MoviePlay module.
Ux_SendEvent(0, NVTEVT_EXE_CLOSEPLAY, 0);
Ux_SetActiveApp(&CustomPlayObjCtrl);
// Wakeup playback task and ImageApp_Play module.
Ux_SendEvent(0, NVTEVT_EXE_OPEN, 0);
KeyScan_EnableMisc(TRUE);
if (gphUIFlowMovPlay_Filehdl)
{
FileSys_CloseFile(gphUIFlowMovPlay_Filehdl);
gphUIFlowMovPlay_Filehdl = NULL;
}
PBView_DrawErrorView();
// Play 1st video frame image
UIPlay_PlaySingle(PB_SINGLE_CURR);
update_playicons(g_PlbData.State);
// return;
}
UINT32 uiChangeTo;
uiChangeTo = System_GetBootFirstMode();
UINT32 uiCurrMode;

View File

@ -17,6 +17,7 @@
* Ver: 1.0.0 2021.04.12
* Description: creat
**************************************************************************/
#include "NvtUser/NvtUser.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -179,7 +179,7 @@ static void create_qrcode(void)
{
SF_CHAR version[12] = {0};
SF_CHAR iccidStr[22] = {0};
SF_PDT_PARAM_STATISTICS_S *pStaticParam = sf_statistics_param_get();
UIMenuStoreInfo *pStaticParam = sf_app_ui_para_get();
sf_sys_software_version_get(version);
if(pStaticParam->SimType == SF_SIM_OTHER)
{
@ -187,12 +187,12 @@ static void create_qrcode(void)
}
else
{
sprintf(iccidStr, "%s", pStaticParam->SimID);
sprintf(iccidStr, "%s", pStaticParam->SimIccid);
}
printf(" create_qrcode\n");
sf_qrcode_create(pStaticParam->IMEI, iccidStr, version);
sf_sys_camera_about();
sf_qrcode_create(pStaticParam->ModuleImei, iccidStr, version);
// sf_sys_camera_about();
}
}

View File

@ -23,6 +23,7 @@
#include "sf_log.h"
#include "sf_base64.h"
#include "sf_qrcode.h"
#include "sf_4g_lpa.h"
#ifdef __cplusplus
#if __cplusplus
@ -95,7 +96,7 @@ SINT16 sf_qrcode_create(SF_CHAR *pIMEI,SF_CHAR *pSimID ,SF_CHAR* pVersion)
SLOGE("the current Version is null!!!\n");
return SF_FAILURE;
}
#if 0
sprintf(qrsrc_Str, "m2m-%s-%s-%s-%s-T11000001", pIMEI, pSimID,ACCESS_KEY,pVersion);
MLOGI("qrStr = %s\n",qrsrc_Str);
@ -105,6 +106,15 @@ SINT16 sf_qrcode_create(SF_CHAR *pIMEI,SF_CHAR *pSimID ,SF_CHAR* pVersion)
sf_qrcode_encode(qrdst_Str, strlen(qrdst_Str), "/mnt/mmc/addCam.bmp");
MLOGI("addCam.bmp have existed \n");
#endif
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
sprintf(qrsrc_Str, "{\"imei\":\"%s\",\"verizonICCID\":\"%s\",\"attICCID\":\"%s\",\"isEsim\":%s}",
puiPara->ModuleImei, puiPara->SimIccidV, puiPara->SimIccidA, sf_is_esim_card() ? "true" : "false");
MLOGI("qrStr = %s\n",qrsrc_Str);
sf_qrcode_encode(qrsrc_Str, strlen(qrsrc_Str), "/mnt/sd/QR.BMP");
MLOGI("QR.BMP have existed \n");
return ret;
}

View File

@ -23,6 +23,14 @@ typedef enum sfBLE_STATUS_E
SF_BLE_BUTT,
} SF_BLE_STATUS_E;
typedef enum{
FILE_SENDING_GUI_START_SENDING = 0,
FILE_SENDING_GUI_STOP_SENDING,
FILE_SENDING_GUI_SEND_SUCCEED,
FILE_SENDING_GUI_SEND_FAILED,
FILE_SENDING_GUI_END
} FILE_SENDING_GUI_E;
void sf_mode_detect(void);
int sf_pir_statu_read(void);
void sf_set_pir_power_off_flag(BOOL flag);
@ -110,6 +118,7 @@ UINT8 sf_cardv_get_is_esim(void);
void sf_cardv_set_operationSelectResp(UINT8 resp);
UINT8 sf_cardv_get_operationSelectResp(void);
void sf_set_send_statu(BOOL is);
void sf_ui_sending_show(unsigned short status);
BOOL sf_get_send_statu(void);
void sf_cardv_set_mcu_rtc_flag(void);
void sf_hd_flag_init(void);

View File

@ -1780,6 +1780,9 @@ static SINT32 sf_cardv_proccess_cmd_file(SF_MESSAGE_BUF_S *pMessageBuf)
case SF_PARA_CMD_UPDATE:
sf_share_mem_file_init();
sf_set_send_statu(FALSE);
#define SEND_SUCCEED 0
#define SEND_FAILED -1
sf_ui_sending_show(SEND_SUCCEED == pMessageBuf->arg1 ? FILE_SENDING_GUI_SEND_SUCCEED : FILE_SENDING_GUI_SEND_FAILED);
if(sf_get_mode_flag())
{
sf_wifi_server_stop_shoot_respond((UINT8)pMessageBuf->arg2);
@ -2010,8 +2013,25 @@ BOOL sf_is_preview(void)
void sf_set_send_statu(BOOL is)
{
IsSend = is;
if (TRUE == is)
{
sf_ui_sending_show(FILE_SENDING_GUI_START_SENDING);
}
else
{
sf_ui_sending_show(FILE_SENDING_GUI_STOP_SENDING);
}
printf("[%s]:%d IsSend:%d\n", __FUNCTION__, __LINE__,IsSend);
}
void sf_ui_sending_show(unsigned short status)
{
// #define GUI_SHOW_SENDING 1
// if (TRUE == is)
{
Ux_PostEvent(NVT_SIFAR_MSG_SCREEN, 1, status);
// Ux_PostEvent(NVTEVT_CB_ZOOM, 1, status);
}
}
BOOL sf_get_send_statu(void)
{
@ -2555,7 +2575,7 @@ void sf_save_camera_info(void)
return;
fristRun = 0;
temp = malloc(200);
temp = malloc(300);
if (temp == NULL) {
MLOGE("temp malloc err\n");
return;
@ -2580,7 +2600,7 @@ void sf_save_camera_info(void)
}*/
sf_get_wifi_ssid(wifissid);
SF_SPRINTF(temp, "IMEI:%s\r\nSoftwareVER:%s\r\nModuleVER:%s\r\nMcuVER:%s\r\nICCID:%s\r\nICCID-A:%s\r\nICCID-V:%s\r\nSSID:%s\r\nBLE:%s\r\n",
snprintf(temp, 300, "IMEI:%s\r\nSoftwareVER:%s\r\nModuleVER:%s\r\nMcuVER:%s\r\nICCID:%s\r\nICCID-A:%s\r\nICCID-V:%s\r\nSSID:%s\r\nBLE:%s\r\n",
puiPara->ModuleImei, localver, puiPara->ModuleSubver, mcuver, puiPara->SimIccid, puiPara->SimIccidA, puiPara->SimIccidV, wifissid,puiPara->BluSsid);
if(access((char*)SF_CAMERA_INFO_FILENAME, F_OK) == 0)